From 6e7cce1b98437a22d66bac7f35cbdefde95e0db9 Mon Sep 17 00:00:00 2001 From: Artur Frysiak Date: Mon, 22 Sep 2003 14:36:17 +0000 Subject: [PATCH] - working version Changed files: bakefile-empy.patch -> 1.2 --- bakefile-empy.patch | 455 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 451 insertions(+), 4 deletions(-) diff --git a/bakefile-empy.patch b/bakefile-empy.patch index f50ee8c..0fb2bd8 100644 --- a/bakefile-empy.patch +++ b/bakefile-empy.patch @@ -1,11 +1,14 @@ ---- bakefile-0.1.1.20030921/src/writer.py.wiget 2003-09-22 10:52:08.000000000 +0200 -+++ bakefile-0.1.1.20030921/src/writer.py 2003-09-22 10:53:18.000000000 +0200 -@@ -174,10 +174,10 @@ +--- bakefile-0.1.1.20030922/src/writer.py.wiget 2003-09-13 21:55:35.000000000 +0200 ++++ bakefile-0.1.1.20030922/src/writer.py 2003-09-22 16:35:10.000000000 +0200 +@@ -174,10 +174,13 @@ return (rulesdir, template) def invoke_em(writer, file, method): - import empy.em -+ import em ++ try: ++ import em ++ except ImportError: ++ from empy import em rulesdir, template = __findWriter(writer) filename = tempfile.mktemp('bakefile') - empy.em.invoke(['-I','mk', @@ -13,3 +16,447 @@ '-I','writer', '-I','utils', '-I','os,os.path', +--- bakefile-0.1.1.20030922/output/_hdr_makefile.empy.wiget 2003-06-10 23:56:50.000000000 +0200 ++++ bakefile-0.1.1.20030922/output/_hdr_makefile.empy 2003-09-22 16:29:11.000000000 +0200 +@@ -1,8 +1,8 @@ +-@[ if 'HeaderIncluded' not in locals() :@ ++@[if 'HeaderIncluded' not in locals()] + # ========================================================================= + # This makefile was generated by + # Bakefile @BAKEFILE_VERSION (http://bakefile.sourceforge.net) + # Do not modify, all changes will be overwritten! + # ========================================================================= + @{HeaderIncluded=1}@ +-]@ ++@[end if] +--- bakefile-0.1.1.20030922/output/autoconf-macros.empy.wiget 2003-08-09 12:55:54.000000000 +0200 ++++ bakefile-0.1.1.20030922/output/autoconf-macros.empy 2003-09-22 16:29:11.000000000 +0200 +@@ -2,18 +2,18 @@ + dnl Bakefile @BAKEFILE_VERSION (http://bakefile.sourceforge.net) + dnl Do not modify, all changes will be overwritten! + +-@[ for check in AUTOCONF_CHECKS.split() :@ ++@[for check in AUTOCONF_CHECKS.split()] + dnl ### begin block 0_@check ### + @check +-]@ ++@[end for] + + dnl Conditions: + +-@[ for cond in conditions :@ ++@[for cond in conditions] + dnl ### begin block 1_COND_@cond.name ### + COND_@cond.name="#" + if test @utils.condition2string(cond, utils.CONDSTR_UNIXTEST) ; then + COND_@cond.name="" + fi + AC_SUBST(COND_@cond.name) +-]@ ++@[end for] +--- bakefile-0.1.1.20030922/output/autoconf.empy.wiget 2003-07-26 21:57:22.000000000 +0200 ++++ bakefile-0.1.1.20030922/output/autoconf.empy 2003-09-22 16:29:11.000000000 +0200 +@@ -6,48 +6,48 @@ + specialOptions = ['prefix', 'exec_prefix', 'INSTALL'] + normalOptions = [x for x in options if x.name not in specialOptions] + }@ +-@[ for o in specialOptions :@ ++@[for o in specialOptions] + @o = @@@o@@ +-]@ +-@[ for o in normalOptions :@ ++@[end for] ++@[for o in normalOptions] + @o.name = @@@o.name@@ +-]@ ++@[end for] + + ### Variables: ### + +-@[ for v in make_vars :@ ++@[for v in make_vars] + @utils.wrapLongLine('%s = ' % v.name, v.value, ' \\', variable=v.name) +-]@ ++@[end for] + + ### Conditionally set variables: ### + +-@[ for c in cond_vars :@ +-@[ for v in c.values :@ +-@[if len(v.value) < 75:@ ++@[for c in cond_vars] ++@[for v in c.values] ++@[if len(v.value) < 75] + @utils.wrapLongLine('@COND_%s@%s = ' % (v.cond.name, c.name), v.value, ' \\', indent='@COND_%s@\t' % v.cond.name, variable=v.cond.name) +-]@ +-@[if len(v.value) >= 75:@ ++@[end if] ++@[if len(v.value) >= 75] + @utils.wrapLongLine('COND_%s_%s = ' % (v.cond.name, c.name), v.value, ' \\', variable=c.name) + @@COND_@v.cond.name@@@c.name = $(COND_@(v.cond.name)_@c.name) +-]@ +-]@ +-]@ ++@[end if] ++@[end for] ++@[end for] + + ### Targets: ### +-@[ for t in targets : ++@[for t in targets] + @{ + if t.cond == None: condstr='' + else: condstr='@COND_%s@' % t.cond.name + }@ + @condstr@t.__targetdir@t.__targetname: @t.__deps +-@[ for cmd in t.__command.splitlines():@ ++@[for cmd in t.__command.splitlines()] + @condstr@\t@cmd.strip() +-]@ +-]@ ++@[end for] ++@[end for] + +-@[ for f in fragments : ++@[for f in fragments] + @f.content +-]@ ++@[end for] + + # Include dependency info, if present: + @@IF_GNU_MAKE@@-include .deps/*.d +--- bakefile-0.1.1.20030922/output/borland-opts.empy.wiget 2003-07-31 13:48:47.000000000 +0200 ++++ bakefile-0.1.1.20030922/output/borland-opts.empy 2003-09-22 16:29:11.000000000 +0200 +@@ -4,10 +4,10 @@ + # These are configurable options: + # ------------------------------------------------------------------------- + +-@[ for o in options :@ ++@[for o in options] + # @o.descStr.replace('\n','\n# ') @o.valuesStr + !ifndef @o.name + @o.name = @o.defaultStr + !endif + +-]@ ++@[end for] +--- bakefile-0.1.1.20030922/output/borland.empy.wiget 2003-08-08 13:09:32.000000000 +0200 ++++ bakefile-0.1.1.20030922/output/borland.empy 2003-09-22 16:29:11.000000000 +0200 +@@ -3,11 +3,10 @@ + BCCDIR = $(MAKEDIR)\.. + !endif + +-@[if OPTIONS_FILE != '':!include @OPTIONS_FILE +-]@ +-@[if OPTIONS_FILE == '':@ ++@[if OPTIONS_FILE != '']!include @OPTIONS_FILE@[end if] ++@[if OPTIONS_FILE == ''] + @empy.include(os.path.join(RULESDIR, 'borland-opts.empy')) +-]@ ++@[end if] + + # ------------------------------------------------------------------------- + # Do not modify the rest of this file! +@@ -19,36 +18,36 @@ + + ### Variables: ### + +-@[ for v in make_vars :@ ++@[for v in make_vars] + @utils.wrapLongLine('%s = ' % v.name, v.value, ' \\', variable=v.name) +-]@ ++@[end for] + + ### Conditionally set variables: ### + +-@[ for c in cond_vars :@ +-@[ for v in c.values :@ ++@[for c in cond_vars] ++@[for v in c.values] + !if @utils.condition2string(v.cond, utils.CONDSTR_MSVC) + @utils.wrapLongLine('%s = ' % c.name, v.value, ' \\', variable=c.name) + !endif +-]@ +-]@ ++@[end for] ++@[end for] + +-@[ if BUILDDIR != '.' : ++@[if BUILDDIR != '.'] + all: @BUILDDIR + @BUILDDIR: + @\t-if not exist @BUILDDIR mkdir @BUILDDIR +-]@ ++@[end if] + + ### Targets: ### +-@[ for t in targets : +-@[ if t.cond != None :@ ++@[for t in targets] ++@[if t.cond != None] + !if @utils.condition2string(t.cond, utils.CONDSTR_MSVC) +-]@ ++@[end if] + @t.__targetdir@t.__targetname: @t.__deps +-@[ for cmd in t.__command.splitlines():@ ++@[for cmd in t.__command.splitlines()] + @(cmd.strip()=='|' ? '|' : '\t'+cmd.strip()) +-]@ +-@[ if t.cond != None :@ ++@[end for] ++@[if t.cond != None] + !endif +-]@ +-]@ ++@[end if] ++@[end for] +--- bakefile-0.1.1.20030922/output/mingw-opts.empy.wiget 2003-07-31 13:48:47.000000000 +0200 ++++ bakefile-0.1.1.20030922/output/mingw-opts.empy 2003-09-22 16:29:11.000000000 +0200 +@@ -4,8 +4,8 @@ + # These are configurable options: + # ------------------------------------------------------------------------- + +-@[ for o in options :@ ++@[for o in options] + # @o.descStr.replace('\n','\n# ') @o.valuesStr + @o.name = @o.defaultStr + +-]@ ++@[end for] +--- bakefile-0.1.1.20030922/output/mingw.empy.wiget 2003-08-08 13:09:32.000000000 +0200 ++++ bakefile-0.1.1.20030922/output/mingw.empy 2003-09-22 16:29:11.000000000 +0200 +@@ -12,11 +12,11 @@ + return s.strip() + }@ + @empy.include(os.path.join(RULESDIR, '_hdr_makefile.empy')) +-@[if OPTIONS_FILE != '':include @OPTIONS_FILE +-]@ +-@[if OPTIONS_FILE == '':@ ++@[if OPTIONS_FILE != '']include @OPTIONS_FILE ++@[end if] ++@[if OPTIONS_FILE == ''] + @empy.include(os.path.join(RULESDIR, 'mingw-opts.empy')) +-]@ ++@[end if] + + # ------------------------------------------------------------------------- + # Do not modify the rest of this file! +@@ -24,36 +24,36 @@ + + ### Variables: ### + +-@[ for v in make_vars :@ ++@[for v in make_vars] + @utils.wrapLongLine('%s = ' % v.name, v.value, ' \\', variable=v.name) +-]@ ++@[end for] + + ### Conditionally set variables: ### + +-@[ for c in cond_vars :@ +-@[ for v in c.values :@ ++@[for c in cond_vars] ++@[for v in c.values] + @makeCondBegin(v.cond) + @utils.wrapLongLine('%s = ' % c.name, v.value, ' \\', variable=c.name) + @makeCondEnd(v.cond) +-]@ +-]@ ++@[end for] ++@[end for] + +-@[ if BUILDDIR != '.' : ++@[if BUILDDIR != '.'] + all: @BUILDDIR + @BUILDDIR: + @\t-if not exist @BUILDDIR mkdir @BUILDDIR +-]@ ++@[end if] + + ### Targets: ### +-@[ for t in targets : +-@[ if t.cond != None :@makeCondBegin(t.cond) +-]@ ++@[for t in targets] ++@[if t.cond != None]makeCondBegin(t.cond) ++@[end if] + @t.__targetdir@t.__targetname: @t.__deps +-@[ for cmd in t.__command.splitlines():@ ++@[for cmd in t.__command.splitlines()] + @(cmd.strip()=='|' ? '|' : '\t'+cmd.strip()) +-]@ +-@[ if t.cond != None :@makeCondEnd(t.cond) +-]@ +-]@ ++@[end for] ++@[if t.cond != None]makeCondEnd(t.cond) ++@[end if] ++@[end for] + + .PHONY: @(' '.join([t.__targetdir+t.__targetname for t in targets if t.__is_phony=='1'])) +--- bakefile-0.1.1.20030922/output/msvc-opts.empy.wiget 2003-07-31 13:48:47.000000000 +0200 ++++ bakefile-0.1.1.20030922/output/msvc-opts.empy 2003-09-22 16:29:11.000000000 +0200 +@@ -4,8 +4,8 @@ + # These are configurable options: + # ------------------------------------------------------------------------- + +-@[ for o in options :@ ++@[for o in options] + # @o.descStr.replace('\n','\n# ') @o.valuesStr + @o.name = @o.defaultStr + +-]@ ++@[end for] +--- bakefile-0.1.1.20030922/output/msvc.empy.wiget 2003-07-26 21:57:22.000000000 +0200 ++++ bakefile-0.1.1.20030922/output/msvc.empy 2003-09-22 16:29:11.000000000 +0200 +@@ -1,9 +1,9 @@ + @empy.include(os.path.join(RULESDIR, '_hdr_makefile.empy')) +-@[if OPTIONS_FILE != '':!include <@OPTIONS_FILE> +-]@ +-@[if OPTIONS_FILE == '':@ ++@[if OPTIONS_FILE != '']!include <@OPTIONS_FILE> ++@[end if] ++@[if OPTIONS_FILE == ''] + @empy.include(os.path.join(RULESDIR, 'watcom-opts.empy')) +-]@ ++@[end if] + + # ------------------------------------------------------------------------- + # Do not modify the rest of this file! +@@ -11,36 +11,36 @@ + + ### Variables: ### + +-@[ for v in make_vars :@ ++@[for v in make_vars] + @utils.wrapLongLine('%s = ' % v.name, v.value, ' \\', variable=v.name) +-]@ ++@[end for] + + ### Conditionally set variables: ### + +-@[ for c in cond_vars :@ +-@[ for v in c.values :@ ++@[for c in cond_vars] ++@[for v in c.values] + !if @utils.condition2string(v.cond, utils.CONDSTR_MSVC) + @utils.wrapLongLine('%s = ' % c.name, v.value, ' \\', variable=c.name) + !endif +-]@ +-]@ ++@[end for] ++@[end for] + +-@[ if BUILDDIR != '.' : ++@[if BUILDDIR != '.'] + all: @BUILDDIR + @BUILDDIR: + @\t-if not exist @BUILDDIR mkdir @BUILDDIR +-]@ ++@[end if] + + ### Targets: ### +-@[ for t in targets : +-@[ if t.cond != None :@ ++@[for t in targets] ++@[if t.cond != None] + !if @utils.condition2string(t.cond, utils.CONDSTR_MSVC) +-]@ ++@[end if] + @t.__targetdir@t.__targetname: @t.__deps +-@[ for cmd in t.__command.splitlines():@ ++@[for cmd in t.__command.splitlines()] + @(cmd.strip()[:2]=='<<' ? '<<' : '\t'+cmd.strip()) +-]@ +-@[ if t.cond != None :@ ++@[end for] ++@[if t.cond != None] + !endif +-]@ +-]@ ++@[end if] ++@[end for] +--- bakefile-0.1.1.20030922/output/watcom-opts.empy.wiget 2003-07-31 13:48:47.000000000 +0200 ++++ bakefile-0.1.1.20030922/output/watcom-opts.empy 2003-09-22 16:29:11.000000000 +0200 +@@ -4,8 +4,8 @@ + # These are configurable options: + # ------------------------------------------------------------------------- + +-@[ for o in options :@ ++@[for o in options] + # @o.descStr.replace('\n','\n# ') @o.valuesStr + @o.name = @o.defaultStr + +-]@ ++@[end for] +--- bakefile-0.1.1.20030922/output/watcom.empy.wiget 2003-08-08 13:09:32.000000000 +0200 ++++ bakefile-0.1.1.20030922/output/watcom.empy 2003-09-22 16:29:11.000000000 +0200 +@@ -12,11 +12,11 @@ + return s.strip() + }@ + @empy.include(os.path.join(RULESDIR, '_hdr_makefile.empy')) +-@[if OPTIONS_FILE != '':!include @OPTIONS_FILE +-]@ +-@[if OPTIONS_FILE == '':@ ++@[if OPTIONS_FILE != '']!include @OPTIONS_FILE ++@[end if] ++@[if OPTIONS_FILE == ''] + @empy.include(os.path.join(RULESDIR, 'watcom-opts.empy')) +-]@ ++@[end if] + + # ------------------------------------------------------------------------- + # Do not modify the rest of this file! +@@ -39,35 +39,35 @@ + + ### Conditionally set variables: ### + +-@[ for c in cond_vars :@ ++@[for c in cond_vars] + @c.name = +-@[ for v in c.values :@ ++@[for v in c.values] + @makeCondBegin(v.cond) + @utils.wrapLongLine('%s = ' % c.name, v.value, ' &', variable=c.name) + @makeCondEnd(v.cond) +-]@ +-]@ ++@[end for] ++@[end for] + + ### Variables: ### + +-@[ for v in make_vars :@ ++@[for v in make_vars] + @utils.wrapLongLine('%s = ' % v.name, v.value, ' &', variable=v.name) +-]@ ++@[end for] + +-@[ if BUILDDIR != '.' : ++@[if BUILDDIR != '.'] + all : @BUILDDIR + @BUILDDIR : + @\t-if not exist @BUILDDIR mkdir @BUILDDIR +-]@ ++@[end if] + + ### Targets: ### +-@[ for t in targets : +-@[ if t.cond != None :@makeCondBegin(t.cond) +-]@ +-@t.__targetdir@t.__targetname : @[if t.__is_phony=='1':.SYMBOLIC] @t.__deps +-@[ for cmd in t.__command.splitlines():@ ++@[for t in targets] ++@[if t.cond != None]makeCondBegin(t.cond) ++@[end if] ++@t.__targetdir@t.__targetname : @[if t.__is_phony=='1'].SYMBOLIC@[end if] @t.__deps ++@[for cmd in t.__command.splitlines()] + @(cmd.strip()=='|' ? '|' : '\t'+cmd.strip()) +-]@ +-@[ if t.cond != None :@makeCondEnd(t.cond) +-]@ +-]@ ++@[end for] ++@[if t.cond != None]makeCondEnd(t.cond) ++@[end if] ++@[end for] -- 2.43.0