Changeset: 48bf8dbc0a80 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=48bf8dbc0a80
Modified Files:
buildtools/autogen/autogen/am.py
buildtools/conf/MonetDB.m4
pathfinder/configure.ag
sql/src/server/Makefile.ag
Branch: default
Log Message:
Merge with Oct2010 branch.
diffs (truncated from 563 to 300 lines):
diff -r cd4cc69f2beb -r 48bf8dbc0a80 buildtools/autogen/autogen/am.py
--- a/buildtools/autogen/autogen/am.py Tue Nov 23 13:54:09 2010 +0100
+++ b/buildtools/autogen/autogen/am.py Wed Nov 24 10:20:59 2010 +0100
@@ -20,8 +20,16 @@
from codegen import find_org
#automake_ext = ['c', 'h', 'y', 'l', 'glue.c']
-automake_ext = ['o', 'lo', 'c', 'h', 'tab.c', 'tab.h', 'yy.c', 'glue.c',
'proto.h', 'php.c', 'py.c', 'pm.c', 'ruby.c', 'def', '']
-buildtools_ext = ['mx', 'm', 'y', 'l', 'brg', 't']
+automake_ext = ['', 'c', 'def', 'glue.c', 'h', 'lo', 'o', 'php.c', 'pm.c',
+ 'proto.h', 'py.c', 'ruby.c', 'tab.c', 'tab.h', 'yy.c']
+
+# buildtools_ext contains the extensions of files from which sources
+# are generated by rules that are specified in rules.mk in
+# buildtools/conf. The generated sources should therefore be included
+# in the tar ball and not be removed with `make distclean' when
+# running "in" said tar ball.
+buildtools_ext = ['brg', 'l', 'm', 'mx', 'php.i', 'pm.i', 'py.i',
+ 'ruby.i', 'syms', 't', 'tcl.i', 'y']
am_assign = "+="
@@ -139,8 +147,12 @@
def am_list2string(l, pre, post):
res = ""
- for i in l:
+ prev = None
+ for i in sorted(l):
+ if i == prev:
+ continue
res = res + pre + i + post
+ prev = i
return res
def am_find_srcs(target, deps, am, cond):
@@ -149,8 +161,10 @@
f = target
pf = f
while ext != "h" and deps.has_key(f):
+ b, ext = split_filename(deps[f][0])
+ if ext in buildtools_ext and f not in am['EXTRA_DIST']:
+ am['EXTRA_DIST'].append(f)
f = deps[f][0]
- b, ext = split_filename(f)
if ext in automake_ext:
pf = f
@@ -162,6 +176,10 @@
if pfext in automake_ext:
dist = None
am['BUILT_SOURCES'].append(pf)
+ if sfext in buildtools_ext:
+ am['MXCLEAN'].append(pf)
+ else:
+ am['CLEAN'].append(pf)
b, ext = split_filename(pf)
if ext in automake_ext:
return (dist,pf)
@@ -275,12 +293,15 @@
return 0
def am_dep(fd, t, deplist, am, pref = ''):
+ rv = []
t = t.replace('\\', '/')
n = t.replace('.o', '.lo', 1)
f,ext = rsplit_filename(n)
if t != n and not pref:
fd.write(t + " ")
+ rv.append(t)
fd.write(pref + n + ":")
+ rv.append(pref + n)
for d in deplist:
if not os.path.isabs(d):
fd.write(" " + am_translate_dir(d, am))
@@ -290,13 +311,15 @@
if ext == 'mil': # a bit of a hack ....
am['MILHACK'][n] = " $(%s_LTLIBRARIES)" % os.path.basename(f)
fd.write("\n")
+ return rv
-def am_deps(fd, deps, objext, am):
+def am_deps(fd, deps, am):
if not am['DEPS']:
fd.write("if NEED_MX\n")
for t, deplist in deps.items():
if needbuildtool(deplist):
- am_dep(fd, t, deplist, am)
+ rv = am_dep(fd, t, deplist, am)
+ am['MXCLEAN'].extend(rv)
fd.write("endif\n")
for t, deplist in deps.items():
if not needbuildtool(deplist):
@@ -358,6 +381,7 @@
fd.write("endif\n")
if not os.path.exists(os.path.join(am['CWDRAW'], script)):
am['BUILT_SOURCES'].append("$(C_" +mkname+ ")")
+ am['CLEAN'].append("$(C_" +mkname+ ")")
am['EXTRA_DIST'].append(script)
elif os.path.exists(os.path.join(am['CWDRAW'], script)):
am['EXTRA_DIST'].append(script)
@@ -386,7 +410,7 @@
am['InstallList'].append("\t"+sd+"/"+script+cond+"\n")
am_find_ins(am, scripts)
- am_deps(fd, scripts['DEPS'], "\.o", am)
+ am_deps(fd, scripts['DEPS'], am)
# return the unique elements of the argument list
def uniq(l):
@@ -441,10 +465,13 @@
am['UNINSTALL'].append(h)
if header not in headers['SOURCES']:
am['BUILT_SOURCES'].append(h)
+ am['MXCLEAN'].append(h)
+ if h[-4:] == '.mil':
+ am['MXCLEAN'].append(h[:-3] + 'tmpmil')
am['InstallList'].append("\t"+sd+"/"+header+cond+"\n")
am_find_ins(am, headers)
- am_deps(fd, headers['DEPS'], "\.o", am)
+ am_deps(fd, headers['DEPS'], am)
for src in headers['SOURCES']:
am['EXTRA_DIST'].append(src)
@@ -485,7 +512,7 @@
am['UNINSTALL'].append(name)
am_find_ins(am, docmap)
- am_deps(fd, docmap['DEPS'], "\.o", am)
+ am_deps(fd, docmap['DEPS'], am)
def am_normalize(name):
return string.replace(name, '-', '_')
@@ -526,6 +553,7 @@
fd.write("all-local-%s: %s\n" % (name, src))
fd.write("\t-$(RM) %s\n" % name)
fd.write("\t$(LN_S) %s %s\n\n" % (src, name))
+ am['CLEAN'].append(name)
if cond:
fd.write('else\n')
fd.write("install-exec-local-%s:\n" % name)
@@ -612,7 +640,7 @@
am_find_hdrs(am, binmap)
am_find_ins(am, binmap)
- am_deps(fd, binmap['DEPS'], ".o", am)
+ am_deps(fd, binmap['DEPS'], am)
def am_bins(fd, var, binsmap, am):
@@ -692,7 +720,7 @@
am['EXTRA_DIST'].append(target)
am_find_ins(am, binsmap)
- am_deps(fd, binsmap['DEPS'], ".o", am)
+ am_deps(fd, binsmap['DEPS'], am)
def am_mods_to_libs(fd, var, modmap, am):
modname = var[:-4]+"LIBS"
@@ -825,7 +853,7 @@
am_find_hdrs(am, libmap)
am_find_ins(am, libmap)
- am_deps(fd, libmap['DEPS'], ".lo", am)
+ am_deps(fd, libmap['DEPS'], am)
def am_libs(fd, var, libsmap, am):
@@ -922,7 +950,7 @@
am['EXTRA_DIST'].append(target)
am_find_ins(am, libsmap)
- am_deps(fd, libsmap['DEPS'], ".lo", am)
+ am_deps(fd, libsmap['DEPS'], am)
def am_gem(fd, var, gem, am):
rd = 'RUBY_DIR'
@@ -940,14 +968,19 @@
am['INSTALL'].append(sf)
am['UNINSTALL'].append(sf)
fd.write('%s: %s\n' % (f[:-4], f))
- fd.write('\td=$(dir $<); [ "$$d" -ef . ] || (cd "$$d"; tar cf - %s
`sed -n \'/.*\.files *= *\[ */{s///;s/ *\].*//;s/"//g;s/ *, */ /g;p;}\' "%s"`)
| tar xf -\n' % (f, f))
+ fd.write('\td=$(dir $<); [ "$$d" -ef . ] || (cd "$$d"; tar cf - %s
`sed -n \'/.*\.files *= *\[ */{s///;s/ *\].*//;s/"//g;s/ *, */ /g;p;}\' "%s"`)
| tar xvf - > files-to-be-cleaned\n' % (f, f))
fd.write('\tgem build %s\n' % f)
+ fd.write('mostlyclean-local: mostlyclean-local-%s\n' % sf)
+ fd.write('.PHONY: mostlyclean-local-%s\n' % sf)
+ fd.write('mostlyclean-local-%s:\n' % sf)
+ fd.write('\t[ ! -f files-to-be-cleaned ] || rm -f `cat
files-to-be-cleaned` files-to-be-cleaned\n')
fd.write('install-exec-local-%s: %s\n' % (sf, f[:-4]))
fd.write('\tmkdir -p $(DESTDIR)%s\n' % rd)
fd.write('\tgem install --local --install-dir $(DESTDIR)%s --force
--rdoc %s\n' % (rd, f[:-4]))
fd.write('uninstall-exec-local-%s: %s\n' % (sf, f[:-4]))
fd.write('\tgem uninstall --install-dir $(DESTDIR)%s %s\n' % (rd,
f[:-4]))
am['BUILT_SOURCES'].append(f[:-4])
+ am['CLEAN'].append(f[:-4])
fd.write('else\n')
for f in gem['FILES']:
sf = f.replace('.', '_')
@@ -1128,6 +1161,8 @@
am['CWD'] = cwd[len(topdir)+1:].replace('\\', '/')+'/'
am['CWDRAW'] = cwd
am['BUILT_SOURCES'] = []
+ am['MXCLEAN'] = [] # files created when NEED_MX is set
+ am['CLEAN'] = [] # files to be cleaned with make clean
am['EXTRA_DIST'] = []
am['LIBS'] = [] # all libraries (am_libs and am_library)
am['NLIBS'] = [] # all libraries which are not installed
@@ -1163,11 +1198,13 @@
elif i != 'TARGETS':
am_assignment(fd, i, v, am)
+ if am['MXCLEAN']:
+ fd.write('if NEED_MX\nMXCLEAN =%s\nelse\nMXCLEAN =\nendif\n' %
am_list2string(am['MXCLEAN'], ' ', ''))
fd.write("BUILT_SOURCES =%s\n" % am_list2string(am['BUILT_SOURCES'], " ",
""))
# the BUILT_SOURCES should be cleaned up by make (mostly)clean
- fd.write("MOSTLYCLEANFILES =%s\n" % am_list2string(am['BUILT_SOURCES'], "
", ""))
+ fd.write("MOSTLYCLEANFILES =%s $(MXCLEAN)\n" % am_list2string(am['CLEAN'],
' ', ''))
- fd.write("EXTRA_DIST = Makefile.msc%s " % \
+ fd.write("EXTRA_DIST = Makefile.msc%s" % \
am_list2string(am['EXTRA_DIST'], " ", ""))
fd.write(" $(BUILT_SOURCES)\n")
@@ -1239,12 +1276,22 @@
fd.write("nodist_%sinclude_HEADERS = %s %s\n" % (name,
am_list2string(am['HDRS'], " ", ""), incs))
fd.write('''
+# When building from a tar ball (HAVE_BUILDTOOLS is false), don\'t
+# include rules.mk, and don\'t remove bison-generated files. By
+# default, bison-generated files are removed by automake, and we
+# will do the same if building from Mercurial sources.
if HAVE_BUILDTOOLS
include $(BUILDTOOLS_CONFDIR)/rules.mk
+ REMOVE_BISON_FILES = -rm -f *.tab.c
+else
+ REMOVE_BISON_FILES = @:
endif
if HAVE_EXTRA_MK
include $(top_builddir)/extra.mk
endif
+
+distclean-compile:
+\t$(REMOVE_BISON_FILES)
''')
if cwd == topdir:
fd.write('include $(top_builddir)/rpm.mk\n')
diff -r cd4cc69f2beb -r 48bf8dbc0a80 buildtools/autogen/autogen/msc.py
--- a/buildtools/autogen/autogen/msc.py Tue Nov 23 13:54:09 2010 +0100
+++ b/buildtools/autogen/autogen/msc.py Wed Nov 24 10:20:59 2010 +0100
@@ -402,10 +402,12 @@
(split_filename(msc_basename(src))[0], name, name, t,
src))
if ext == 'py' and deplist[0].endswith('.py.i'):
fd.write('\t$(SWIG) -python $(SWIGFLAGS) -outdir . -o dummy.c "%s"\n'
% src)
+ fd.write('\t$(DEL) dummy.c\n')
if ext == 'py.c' and deplist[0].endswith('.py.i'):
fd.write('\t$(SWIG) -python $(SWIGFLAGS) -outdir . -o "$@" "%s"\n' %
src)
if ext == 'pm' and deplist[0].endswith('.pm.i'):
fd.write('\t$(SWIG) -perl $(SWIGFLAGS) -outdir . -o dummy.c "%s"\n' %
src)
+ fd.write('\t$(DEL) dummy.c\n')
if ext == 'pm.c' and deplist[0].endswith('.pm.i'):
fd.write('\t$(SWIG) -perl $(SWIGFLAGS) -outdir . -o "$@" "%s"\n' % src)
if ext == 'res':
diff -r cd4cc69f2beb -r 48bf8dbc0a80 buildtools/conf/MonetDB.m4
--- a/buildtools/conf/MonetDB.m4 Tue Nov 23 13:54:09 2010 +0100
+++ b/buildtools/conf/MonetDB.m4 Wed Nov 24 10:20:59 2010 +0100
@@ -19,7 +19,7 @@
AC_DEFUN([AM_MONETDB_DEFAULTS],
[
if test -f "$srcdir"/vertoo.data; then
- dnl Developers compiling from CVS:
+ dnl Developers compiling from Mercurial:
dnl default is --enable-strict --enable-assert --enable-debug
--disable-optimize
dft_strict=yes
dft_assert=yes
@@ -3142,7 +3142,7 @@
if test -f "$srcdir"/vertoo.data; then
dnl check for Mx if we find the not distributed vertoo.data
- dnl having (this) file means we're compiling from CVS
+ dnl having (this) file means we're compiling from Mercurial
dnl and not from the distribution tar ball
dnl check for Monet and some basic utilities
@@ -3185,7 +3185,7 @@
have_mel=""
if test -f "$srcdir"/vertoo.data; then
dnl check for mel if we find the not distributed vertoo.data
- dnl having (this) file means we're compiling from CVS
+ dnl having (this) file means we're compiling from Mercurial
dnl and not from the distribution tar ball
MEL=""
diff -r cd4cc69f2beb -r 48bf8dbc0a80 buildtools/conf/rules.mk
--- a/buildtools/conf/rules.mk Tue Nov 23 13:54:09 2010 +0100
+++ b/buildtools/conf/rules.mk Wed Nov 24 10:20:59 2010 +0100
@@ -21,6 +21,73 @@
MV=mv
HIDE=1
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list