Changeset: 930858f76e41 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=930858f76e41 Modified Files: NT/rules.msc buildtools/autogen/autogen/msc.py Branch: default Log Message:
Merge with Mar2011 branch. diffs (253 lines): diff --git a/NT/Makefile b/NT/Makefile --- a/NT/Makefile +++ b/NT/Makefile @@ -18,27 +18,27 @@ # All Rights Reserved. TOPDIR = . -SRCDIR = $(TOPDIR)\.. +srcdir = $(TOPDIR)\.. prefix = $(MAKEDIR) !INCLUDE "$(TOPDIR)\..\NT\rules.msc" -all: "$(SRCDIR)\Makefile.msc" monetdb_config.h unistd.h inttypes.h .monetdb - $(MAKE) /nologo /f "$(SRCDIR)\Makefile.msc" "prefix=$(prefix)" "bits=$(bits)" all +all: "$(srcdir)\Makefile.msc" monetdb_config.h unistd.h inttypes.h .monetdb + $(MAKE) /nologo /f "$(srcdir)\Makefile.msc" "prefix=$(prefix)" "bits=$(bits)" all install: targetdirs all - $(MAKE) /nologo /f "$(SRCDIR)\Makefile.msc" "prefix=$(prefix)" "bits=$(bits)" install + $(MAKE) /nologo /f "$(srcdir)\Makefile.msc" "prefix=$(prefix)" "bits=$(bits)" install $(INSTALL) .monetdb "$(sysconfdir)" $(INSTALL) ..\NT\installer$(bits)\*.sln "$(prefix)" $(INSTALL) ..\NT\installer$(bits)\*.vdproj "$(prefix)" -if exist "C:\Program Files (x86)" if $(bits)==32 cd "$(prefix)"&&C:\cygwin\bin\sed.exe -i "s/Program Files/Program Files (x86)/" *.vdproj -$(SRCDIR)\Makefile.msc: "$(SRCDIR)\Makefile.ag" - cd "$(SRCDIR)"&&set PYTHONPATH=buildtools\autogen&&python buildtools\autogen\autogen.py +$(srcdir)\Makefile.msc: "$(srcdir)\Makefile.ag" + cd "$(srcdir)"&&set PYTHONPATH=buildtools\autogen&&python buildtools\autogen\autogen.py -monetdb_config.h: "$(SRCDIR)\NT\monetdb_config.h.in" - $(CONFIGURE) "$(SRCDIR)\NT\monetdb_config.h.in" > monetdb_config.h +monetdb_config.h: "$(srcdir)\NT\monetdb_config.h.in" + $(CONFIGURE) "$(srcdir)\NT\monetdb_config.h.in" > monetdb_config.h unistd.h: $(ECHO) #ifndef UNISTD_H > unistd.h diff --git a/NT/rules.msc b/NT/rules.msc --- a/NT/rules.msc +++ b/NT/rules.msc @@ -397,19 +397,19 @@ CONFIG_H = monetdb_config.h -{$(SRCDIR)}.mx.h: +{$(srcdir)}.mx.h: $(MX) $(MXFLAGS) -l -x h $< .mx.h: $(MX) $(MXFLAGS) -l -x h $< -{$(SRCDIR)}.mx.c: +{$(srcdir)}.mx.c: $(MX) $(MXFLAGS) -x c $< .mx.c: $(MX) $(MXFLAGS) -x c $< -{$(SRCDIR)}.mx.mal: +{$(srcdir)}.mx.mal: $(MX) $(MXFLAGS) -l -x mal $< if not exist .libs $(MKDIR) .libs $(INSTALL) $@ .libs\$@ @@ -419,25 +419,25 @@ if not exist .libs $(MKDIR) .libs $(INSTALL) $@ .libs\$@ -{$(SRCDIR)}.mx.sql: +{$(srcdir)}.mx.sql: $(MX) $(MXFLAGS) -l -x sql $< .mx.sql: $(MX) $(MXFLAGS) -l -x sql $< -{$(SRCDIR)}.mx.y: +{$(srcdir)}.mx.y: $(MX) $(MXFLAGS) -x y $< .mx.y: $(MX) $(MXFLAGS) -x y $< -{$(SRCDIR)}.c.obj: +{$(srcdir)}.c.obj: $(CC) $(CFLAGS) -c $< .c.obj: $(CC) $(CFLAGS) -c $< -{$(SRCDIR)}.syms.def: +{$(srcdir)}.syms.def: echo EXPORTS > $@ type $< >> $@ diff --git a/buildtools/autogen/autogen/msc.py b/buildtools/autogen/autogen/msc.py --- a/buildtools/autogen/autogen/msc.py +++ b/buildtools/autogen/autogen/msc.py @@ -69,8 +69,8 @@ fd.write('%s-%d-all: "%s-%d-dir" "%s-%d-Makefile"\n' % (n, i, n, i, n, i)) fd.write('\t$(CD) "%s" && $(MAKE) /nologo $(MAKEDEBUG) "prefix=$(prefix)" "bits=$(bits)" all \n' % vv) fd.write('%s-%d-dir: \n\tif not exist "%s" $(MKDIR) "%s"\n' % (n, i, vv, vv)) - fd.write('%s-%d-Makefile: "$(SRCDIR)\\%s\\Makefile.msc"\n' % (n, i, v)) - fd.write('\t$(INSTALL) "$(SRCDIR)\\%s\\Makefile.msc" "%s\\Makefile"\n' % (v, v)) + fd.write('%s-%d-Makefile: "$(srcdir)\\%s\\Makefile.msc"\n' % (n, i, v)) + fd.write('\t$(INSTALL) "$(srcdir)\\%s\\Makefile.msc" "%s\\Makefile"\n' % (v, v)) fd.write('%s-%d-check:\n' % (n, i)) fd.write('\t$(CD) "%s" && $(MAKE) /nologo $(MAKEDEBUG) "prefix=$(prefix)" "bits=$(bits)" check\n' % vv) @@ -153,7 +153,7 @@ if dir[0] == '$': return "" elif not os.path.isabs(dir): - dir = "$(SRCDIR)/" + dir + dir = "$(srcdir)/" + dir else: return "" return prefix+string.replace(dir, '/', '\\') @@ -170,7 +170,7 @@ elif dir == "builddir": dir = "." elif dir == "srcdir": - dir = "$(SRCDIR)" + dir = "$(srcdir)" elif dir in ('bindir', 'builddir', 'datadir', 'includedir', 'infodir', 'libdir', 'libexecdir', 'localstatedir', 'mandir', 'oldincludedir', 'pkgbindir', 'pkgdatadir', 'pkgincludedir', @@ -184,7 +184,7 @@ def msc_translate_file(path, msc): if os.path.isfile(os.path.join(msc['cwd'], path)): - return "$(SRCDIR)\\" + path + return "$(srcdir)\\" + path return path def msc_space_sep_list(l): @@ -410,7 +410,7 @@ if msc['INSTALL'].has_key(script): continue if os.path.isfile(os.path.join(msc['cwd'], script+'.in')): - inf = '$(SRCDIR)\\%s.in' % script + inf = '$(srcdir)\\%s.in' % script if inf not in msc['_IN']: # TODO # replace this hack by something like configure ... @@ -418,8 +418,8 @@ fd.write('\t$(CONFIGURE) "%s" > "%s"\n' % (inf, script)) msc['_IN'].append(inf) elif os.path.isfile(os.path.join(msc['cwd'], script)): - fd.write('%s: "$(SRCDIR)\\%s"\n' % (script, script)) - fd.write('\t$(INSTALL) "$(SRCDIR)\\%s" "%s"\n' % (script, script)) + fd.write('%s: "$(srcdir)\\%s"\n' % (script, script)) + fd.write('\t$(INSTALL) "$(srcdir)\\%s" "%s"\n' % (script, script)) if scripts.has_key('COND'): condname = 'defined(' + ') && defined('.join(scripts['COND']) + ')' mkname = script.replace('.', '_').replace('-', '_') @@ -467,7 +467,7 @@ h, ext = split_filename(header) if ext in hdrs_ext: if os.path.isfile(os.path.join(msc['cwd'], header+'.in')): - inf = '$(SRCDIR)\\%s.in' % header + inf = '$(srcdir)\\%s.in' % header if inf not in msc['_IN']: # TODO # replace this hack by something like configure ... @@ -475,10 +475,10 @@ fd.write('\t$(CONFIGURE) "%s" > "%s"\n' % (inf, header)) msc['_IN'].append(inf) elif os.path.isfile(os.path.join(msc['cwd'], header)): - fd.write('%s: "$(SRCDIR)\\%s"\n' % (header, header)) -## fd.write('\t$(INSTALL) "$(SRCDIR)\\%s" "%s"\n' % (header, header)) -## fd.write('\tif not exist "%s" if exist "$(SRCDIR)\\%s" $(INSTALL) "$(SRCDIR)\\%s" "%s"\n' % (header, header, header, header)) - fd.write('\t$(INSTALL) "$(SRCDIR)\\%s" "%s"\n' % (header, header)) + fd.write('%s: "$(srcdir)\\%s"\n' % (header, header)) +## fd.write('\t$(INSTALL) "$(srcdir)\\%s" "%s"\n' % (header, header)) +## fd.write('\tif not exist "%s" if exist "$(srcdir)\\%s" $(INSTALL) "$(srcdir)\\%s" "%s"\n' % (header, header, header, header)) + fd.write('\t$(INSTALL) "$(srcdir)\\%s" "%s"\n' % (header, header)) if headers.has_key('COND'): condname = 'defined(' + ') && defined('.join(headers['COND']) + ')' mkname = header.replace('.', '_').replace('-', '_') @@ -509,11 +509,11 @@ if os.path.isfile(os.path.join(msc['cwd'], i+'.in')): # TODO # replace this hack by something like configure ... - fd.write('%s: "$(SRCDIR)\\%s.in"\n' % (i, i)) - fd.write('\t$(CONFIGURE) "$(SRCDIR)\\%s.in" > "%s"\n' % (i, i)) + fd.write('%s: "$(srcdir)\\%s.in"\n' % (i, i)) + fd.write('\t$(CONFIGURE) "$(srcdir)\\%s.in" > "%s"\n' % (i, i)) elif os.path.isfile(os.path.join(msc['cwd'], i)): - fd.write('%s: "$(SRCDIR)\\%s"\n' % (i, i)) - fd.write('\t$(INSTALL) "$(SRCDIR)\\%s" "%s"\n' % (i, i)) + fd.write('%s: "$(srcdir)\\%s"\n' % (i, i)) + fd.write('\t$(INSTALL) "$(srcdir)\\%s" "%s"\n' % (i, i)) msc['INSTALL'][i] = i, '', '$(bindir)', '', '' else: # link binmap = binmap[0] @@ -977,7 +977,7 @@ msc_deps(fd, libsmap['DEPS'], ".obj", msc) def msc_includes(fd, var, values, msc): - incs = "-I$(SRCDIR)" + incs = "-I$(srcdir)" for i in values: # replace all occurrences of @XXX@ with $(XXX) i = re.sub('@([A-Z_]+)@', r'$(\1)', i) @@ -1006,11 +1006,11 @@ fd.write('\tgem build %s\n' % f) for src in srcs: src = src.replace('/', '\\') - fd.write('%s: "$(SRCDIR)\\%s"\n' % (src, src)) + fd.write('%s: "$(srcdir)\\%s"\n' % (src, src)) if '\\' in src: d = src[:src.rfind('\\')] fd.write('\tif not exist "%s" $(MKDIR) "%s"\n' % (d, d)) - fd.write('\t$(INSTALL) "$(SRCDIR)\\%s" "%s"\n' % (src, src)) + fd.write('\t$(INSTALL) "$(srcdir)\\%s" "%s"\n' % (src, src)) msc['INSTALL'][f] = f, '', '', '', 'defined(HAVE_RUBYGEM)' fd.write('install_%s: "%s" "%s"\n' % (f, f[:-4], rd)) fd.write('\tgem install "%s" --local --install-dir "%s" --force --rdoc\n' % (f[:-4], rd)) @@ -1031,11 +1031,11 @@ fd.write('target_python_%s: %s %s\n' % (f, ' '.join(srcs), f)) fd.write('\t$(PYTHON) %s build\n' % f) for src in srcs: - fd.write('%s: "$(SRCDIR)\\%s"\n' % (src, src)) + fd.write('%s: "$(srcdir)\\%s"\n' % (src, src)) fd.write('\tif not exist "%s" $(MKDIR) "%s"\n' % (src, src)) - fd.write('\t$(INSTALL) "$(SRCDIR)\\%s"\\*.py "%s"\n' % (src, src)) - fd.write('%s: "$(SRCDIR)\\%s"\n' % (f, f)) - fd.write('\t$(INSTALL) "$(SRCDIR)\\%s" "%s"\n' % (f, f)) + fd.write('\t$(INSTALL) "$(srcdir)\\%s"\\*.py "%s"\n' % (src, src)) + fd.write('%s: "$(srcdir)\\%s"\n' % (f, f)) + fd.write('\t$(INSTALL) "$(srcdir)\\%s" "%s"\n' % (f, f)) msc['INSTALL'][f] = f, '', '', '', '' fd.write('install_%s:\n' % f) fd.write('\t$(PYTHON) %s install --prefix "$(prefix)"\n' % f) @@ -1068,7 +1068,7 @@ fd.write("callant%d.bat:\n" % callantno) fd.write("\techo @set thisdir=%%~dp0>callant%d.bat\n" % callantno) fd.write("\techo @set thisdir=%%thisdir:~0,-1%%>>callant%d.bat\n" % callantno) - fd.write("\techo @$(ANT) -f $(SRCDIR)\\build.xml \"-Dbuilddir=%%thisdir%%\" \"-Djardir=%%thisdir%%\" %s>>callant%d.bat\n" % (target, callantno)) + fd.write("\techo @$(ANT) -f $(srcdir)\\build.xml \"-Dbuilddir=%%thisdir%%\" \"-Djardir=%%thisdir%%\" %s>>callant%d.bat\n" % (target, callantno)) fd.write("%s_ant_target: callant%d.bat\n" % (target, callantno)) fd.write("\tcallant%d.bat\n" % callantno) callantno = callantno + 1 @@ -1156,7 +1156,7 @@ d, t = os.path.split(d) fd.write("TOPDIR = %s\n" % string.replace(reldir, '/', '\\')) - fd.write("SRCDIR = $(TOPDIR)\\..%s\n" % string.replace(srcdir, '/', '\\')) + fd.write("srcdir = $(TOPDIR)\\..%s\n" % string.replace(srcdir, '/', '\\')) fd.write("!INCLUDE $(TOPDIR)\\..\\NT\\rules.msc\n") if tree.has_key("SUBDIRS"): fd.write("all: all-recursive all-msc\n") _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list