Changeset: 6db225e870ac for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6db225e870ac
Modified Files:
        buildtools/autogen/autogen/am.py
        buildtools/autogen/autogen/msc.py
        clients/examples/C/Makefile.ag
        clients/examples/php/Makefile.ag
        clients/examples/python/Makefile.ag
        clients/odbc/samples/Makefile.ag
        clients/perl/Tests/Makefile.ag
        geom/monetdb4/Makefile.ag
        geom/monetdb5/Makefile.ag
        monetdb4/modules/calibrator/Makefile.ag
        monetdb4/modules/contrib/Makefile.ag
        monetdb4/modules/mapi/Makefile.ag
        monetdb4/modules/mnetcdf/Makefile.ag
        monetdb4/modules/plain/Makefile.ag
        monetdb4/monet/Makefile.ag
        monetdb4/scripts/tools/Makefile.ag
        monetdb5/extras/compiler/Makefile.ag
        monetdb5/extras/crackers/Makefile.ag
        monetdb5/extras/rdf/Makefile.ag
        monetdb5/extras/sphinx/Makefile.ag
        monetdb5/extras/xml/Makefile.ag
        monetdb5/mal/Makefile.ag
        monetdb5/modules/atoms/Makefile.ag
        monetdb5/modules/kernel/Makefile.ag
        monetdb5/modules/mal/Makefile.ag
        monetdb5/optimizer/Makefile.ag
        monetdb5/scheduler/Makefile.ag
        monetdb5/tools/Makefile.ag
        monetdb5/tools/monetdb-embeddedclient.pc.in
        monetdb5/tools/monetdb-mal.pc.in
        pathfinder/modules/geoxml/Makefile.ag
        pathfinder/modules/pftijah/Makefile.ag
        pathfinder/modules/probxml/Makefile.ag
        pathfinder/runtime/Makefile.ag
        pathfinder/runtime5/Makefile.ag
        sql/backends/monet5/Makefile.ag
        sql/backends/monet5/monetdb-embeddedsql.pc.in
        sql/backends/monet5/vaults/Makefile.ag
        sql/sql/Makefile.ag
Branch: default
Log Message:

change installation of files

Introduced CONDINST for binaries, such that tests need not to be
installed when --disable-testing is given, but make check still works.

Only install headers that are actually useful for an external consumer.
In principle, these are only the headers that are connected to a library
that we install in ${libdir}.

Only install public consumable libs in ${libdir}, the rest under
${libdir}/monetdb*/(lib)?.

Install public headers in include/monetdb.

Lowercase the directories being used.


diffs (truncated from 1282 to 300 lines):

diff -r 80bff76d3f23 -r 6db225e870ac buildtools/autogen/autogen/am.py
--- a/buildtools/autogen/autogen/am.py  Sat Jan 15 14:45:58 2011 +0100
+++ b/buildtools/autogen/autogen/am.py  Sat Jan 15 21:10:37 2011 +0100
@@ -577,6 +577,26 @@
         for condname in binmap['COND']:
             fd.write("endif\n")
         cname = "$(C_" + name + ")"
+    elif binmap.has_key('CONDINST'):
+        for condname in binmap['CONDINST']:
+            fd.write("if %s\n" % condname)
+        cond = '#' + '+'.join(binmap['CONDINST'])
+        fd.write(" C_inst_%s = %s\n" % (name, name))
+        fd.write(" C_noinst_%s = \n" % (name))
+        for condname in binmap['CONDINST']:
+            fd.write("endif\n")
+
+        for condname in binmap['CONDINST']:
+            fd.write("if !%s\n" % condname)
+        fd.write(" C_inst_%s = \n" % (name))
+        fd.write(" C_noinst_%s = %s\n" % (name, name))
+        for condname in binmap['CONDINST']:
+            fd.write("endif\n")
+        cname = "$(C_inst_" + name + ")"
+        am['BINS'].append(cname)
+        cname = "$(C_noinst_" + name + ")"
+        am['NBINS'].append(cname)
+        cname = ''
     elif binmap.has_key('NOINST'):
         am['NBINS'].append(binname)
     else:
@@ -649,12 +669,33 @@
         bin, ext = split_filename(binsrc)
         am['EXTRA_DIST'].append(binsrc)
 
-        if binsmap.has_key("DIR"):
-            lbins.append(bin)
+        if binsmap.has_key('CONDINST'):
+            for condname in binsmap['CONDINST']:
+                fd.write("if %s\n" % condname)
+            cond = '#' + '+'.join(binsmap['CONDINST'])
+            fd.write(" C_inst_%s = %s\n" % (bin, bin))
+            fd.write(" C_noinst_%s = \n" % (bin))
+            for condname in binsmap['CONDINST']:
+                fd.write("endif\n")
+
+            for condname in binsmap['CONDINST']:
+                fd.write("if !%s\n" % condname)
+            cond = '#!' + '+'.join(binsmap['CONDINST'])
+            fd.write(" C_inst_%s = \n" % (bin))
+            fd.write(" C_noinst_%s = %s\n" % (bin, bin))
+            for condname in binsmap['CONDINST']:
+                fd.write("endif\n")
+            cname = "$(C_inst_" + bin + ")"
+            am['BINS'].append(cname)
+            cname = "$(C_noinst_" + bin + ")"
+            am['NBINS'].append(cname)
+            cname = ''
         elif binsmap.has_key('NOINST'):
             am['NBINS'].append(bin)
         else:
             am['BINS'].append(bin)
+            if binsmap.has_key("DIR"):
+                lbins.append(bin)
 
         if binsmap.has_key(bin + "_LIBS"):
             fd.write(am_additional_libs(bin, "", "BIN", binsmap[bin + 
"_LIBS"], am))
diff -r 80bff76d3f23 -r 6db225e870ac buildtools/autogen/autogen/msc.py
--- a/buildtools/autogen/autogen/msc.py Sat Jan 15 14:45:58 2011 +0100
+++ b/buildtools/autogen/autogen/msc.py Sat Jan 15 21:10:37 2011 +0100
@@ -612,6 +612,18 @@
         fd.write('!IF %s\n' % condname)
         fd.write('C_%s_exe = %s.exe\n' % (binname2, binname))
         msc['BINS'].append((binname, '$(C_%s_exe)' % binname2, condname))
+    elif binmap.has_key('CONDINST'):
+        condname = 'defined(' + ') && defined('.join(binmap['CONDINST']) + ')'
+        fd.write('!IF %s\n' % condname)
+        fd.write('C_inst_%s_exe = %s.exe\n' % (binname2, binname))
+        fd.write('C_noinst_%s_exe = \n' % (binname2))
+        fd.write('!ELSE\n')
+        fd.write('C_inst_%s_exe = \n' % (binname2))
+        fd.write('C_noinst_%s_exe = %s.exe\n' % (binname2, binname))
+        fd.write('!ENDIF\n')
+        msc['BINS'].append((binname, '$(C_inst_%s_exe)' % binname2, condname))
+        condname = '!defined(' + ') && !defined('.join(binmap['CONDINST']) + 
')'
+        msc['NBINS'].append((binname, '$(C_noinst_%s_exe)' % binname2, 
condname))
     else:
         condname = ''
         if binmap.has_key('NOINST'):
@@ -697,13 +709,26 @@
         bin, ext = split_filename(binsrc)
         #if ext not in automake_ext:
         msc['EXTRA_DIST'].append(binsrc)
+        bin2 = bin.replace('-','_')
 
         if binsmap.has_key("DIR"):
             bd = binsmap["DIR"][0] # use first name given
-            fd.write("%sdir = %s\n" % (bin.replace('-','_'), 
msc_translate_dir(bd,msc)) );
+            fd.write("%sdir = %s\n" % (bin2, msc_translate_dir(bd,msc)) );
         else:
-            fd.write("%sdir = $(bindir)\n" % (bin.replace('-','_')) );
+            fd.write("%sdir = $(bindir)\n" % (bin2) );
 
+        if binsmap.has_key('CONDINST'):
+            condname = 'defined(' + ') && defined('.join(binsmap['CONDINST']) 
+ ')'
+            fd.write('!IF %s\n' % condname)
+            fd.write('C_inst_%s_exe = %s.exe\n' % (bin2, bin))
+            fd.write('C_noinst_%s_exe = \n' % (bin2))
+            fd.write('!ELSE\n')
+            fd.write('C_inst_%s_exe = \n' % (bin2))
+            fd.write('C_noinst_%s_exe = %s.exe\n' % (bin2, bin))
+            fd.write('!ENDIF\n')
+            msc['BINS'].append((bin, '$(C_inst_%s_exe)' % bin2, condname))
+            condname = '!defined(' + ') && 
!defined('.join(binsmap['CONDINST']) + ')'
+            msc['NBINS'].append((bin, '$(C_noinst_%s_exe)' % bin2, condname))
         if binsmap.has_key('NOINST'):
             msc['NBINS'].append((bin, bin, ''))
         else:
@@ -1375,3 +1400,5 @@
             for h in tHDRS:
                 fd.write('\t$(INSTALL) "%s" "$(%sincludedir)"\n' % 
(h,name.replace('-','_')))
     fd.write("\n")
+
+# vim:ts=4 sw=4 expandtab:
diff -r 80bff76d3f23 -r 6db225e870ac clients/examples/C/Makefile.ag
--- a/clients/examples/C/Makefile.ag    Sat Jan 15 14:45:58 2011 +0100
+++ b/clients/examples/C/Makefile.ag    Sat Jan 15 21:10:37 2011 +0100
@@ -21,9 +21,10 @@
 MAPI_LIBS = $(SOCKET_LIBS) 
 
 BINS = {
-       DIR = libdir/MonetDB/Tests
+       CONDINST = HAVE_TESTING
+       DIR = libdir/monetdb/tests
        SOURCES = sample0.c sample1.c sample2.c sample3.c sample4.c \
-               smack00.c  smack01.c
+               smack00.c smack01.c
        LIBS = $(MAPI_LIBS) ../../mapilib/libmapi \
                ../../../common/options/libmoptions \
                $(curl_LIBS)
diff -r 80bff76d3f23 -r 6db225e870ac clients/examples/php/Makefile.ag
--- a/clients/examples/php/Makefile.ag  Sat Jan 15 14:45:58 2011 +0100
+++ b/clients/examples/php/Makefile.ag  Sat Jan 15 21:10:37 2011 +0100
@@ -18,6 +18,7 @@
 MTSAFE
 
 scripts_php = {
-       DIR = libdir/MonetDB/Tests
+       COND = HAVE_TESTING
+       DIR = libdir/monetdb/tests
        SOURCES = sqlsample.php xquerysample.php
 }
diff -r 80bff76d3f23 -r 6db225e870ac clients/examples/python/Makefile.ag
--- a/clients/examples/python/Makefile.ag       Sat Jan 15 14:45:58 2011 +0100
+++ b/clients/examples/python/Makefile.ag       Sat Jan 15 21:10:37 2011 +0100
@@ -18,6 +18,7 @@
 MTSAFE
 
 scripts_py = {
-       DIR = libdir/MonetDB/Tests
+       COND = HAVE_TESTING
+       DIR = libdir/monetdb/tests
        SOURCES = sqlsample.py.in
 }
diff -r 80bff76d3f23 -r 6db225e870ac clients/odbc/samples/Makefile.ag
--- a/clients/odbc/samples/Makefile.ag  Sat Jan 15 14:45:58 2011 +0100
+++ b/clients/odbc/samples/Makefile.ag  Sat Jan 15 21:10:37 2011 +0100
@@ -18,7 +18,8 @@
 MTSAFE
 
 BINS = {
-       DIR = libdir/MonetDB/Tests
+       CONDINST = HAVE_TESTING
+       DIR = libdir/monetdb/tests
        SOURCES = odbcsample1.c testgetinfo.c
        LIBS = ../driver/libMonetODBC ../../mapilib/libmapi $(curl_LIBS)
 }
diff -r 80bff76d3f23 -r 6db225e870ac clients/perl/Tests/Makefile.ag
--- a/clients/perl/Tests/Makefile.ag    Sat Jan 15 14:45:58 2011 +0100
+++ b/clients/perl/Tests/Makefile.ag    Sat Jan 15 21:10:37 2011 +0100
@@ -18,7 +18,8 @@
 MTSAFE
 
 scripts_pl = {
-       DIR = libdir/MonetDB/Tests
+       COND = HAVE_TESTING
+       DIR = libdir/monetdb/tests
        SOURCES = sqlsample.pl.in milsample.pl.in malsample.pl.in
 }
 
diff -r 80bff76d3f23 -r 6db225e870ac geom/monetdb4/Makefile.ag
--- a/geom/monetdb4/Makefile.ag Sat Jan 15 14:45:58 2011 +0100
+++ b/geom/monetdb4/Makefile.ag Sat Jan 15 21:10:37 2011 +0100
@@ -28,7 +28,7 @@
                   $(GEOS_INCS)
 
 lib__geom = {
-       DIR = libdir/MonetDB4
+       DIR = libdir/monetdb4
        SOURCES = geom.mx
        LIBS = ../lib/libgeom \
                   ../../gdk/libbat \
@@ -38,6 +38,6 @@
 }
 
 scripts_mil = {
-       DIR = libdir/MonetDB4
+       DIR = libdir/monetdb4
        SOURCES = geom.mx
 }
diff -r 80bff76d3f23 -r 6db225e870ac geom/monetdb5/Makefile.ag
--- a/geom/monetdb5/Makefile.ag Sat Jan 15 14:45:58 2011 +0100
+++ b/geom/monetdb5/Makefile.ag Sat Jan 15 21:10:37 2011 +0100
@@ -30,7 +30,7 @@
                   $(GEOS_INCS)
 
 lib__geom = {
-       DIR = libdir/MonetDB5
+       DIR = libdir/monetdb5
        SOURCES = geom.mx
        LIBS = ../lib/libgeom \
                   ../../gdk/libbat \
@@ -41,13 +41,13 @@
 
 headers_mal = {
        HEADERS = mal
-       DIR = libdir/MonetDB5
+       DIR = libdir/monetdb5
        SOURCES = geom.mx
 }
 
 headers_autoload = {
        HEADERS = mal
-       DIR = libdir/MonetDB5/autoload
+       DIR = libdir/monetdb5/autoload
        SOURCES = 50_geom.mal
 }
 
diff -r 80bff76d3f23 -r 6db225e870ac monetdb4/modules/calibrator/Makefile.ag
--- a/monetdb4/modules/calibrator/Makefile.ag   Sat Jan 15 14:45:58 2011 +0100
+++ b/monetdb4/modules/calibrator/Makefile.ag   Sat Jan 15 21:10:37 2011 +0100
@@ -25,7 +25,7 @@
        calib_common.c   calib_plot.c  calib_smp.c
 
 LIBS = {
-       DIR = libdir/MonetDB4
+       DIR = libdir/monetdb4
        SEP = _
        SOURCES = calib.mx 
        #SCRIPTS = mil ""
@@ -33,12 +33,6 @@
                $(SOCKET_LIBS) $(MALLOC_LIBS) $(PTHREAD_LIBS) $(DL_LIBS) 
$(MATH_LIBS)
 }
 
-HEADERS = {
-       DIR = includedir/MonetDB4/calibrator
-       SOURCES = calib.mx
-       HEADERS = h m
-}
-
 BINS = {
        SOURCES = calibrator.c
        LIBS = $(MATH_LIBS)
@@ -46,6 +40,6 @@
 
 headers_mil = {
        HEADERS = mil
-       DIR = libdir/MonetDB4
+       DIR = libdir/monetdb4
        SOURCES = calib.mx
 }
diff -r 80bff76d3f23 -r 6db225e870ac monetdb4/modules/contrib/Makefile.ag
--- a/monetdb4/modules/contrib/Makefile.ag      Sat Jan 15 14:45:58 2011 +0100
+++ b/monetdb4/modules/contrib/Makefile.ag      Sat Jan 15 21:10:37 2011 +0100
@@ -24,7 +24,7 @@
 MTSAFE
 
 LIBS = {
-       DIR = libdir/MonetDB4
+       DIR = libdir/monetdb4
        SEP = _
        SOURCES = \
                bitset.mx malalgebra.mx \
@@ -42,24 +42,9 @@
                $(MALLOC_LIBS) $(PTHREAD_LIBS) $(DL_LIBS) $(MATH_LIBS)
 }
 
-headers_contrib = {
-       DIR = includedir/MonetDB4/contrib
-       SOURCES = \
-               bitset.mx malalgebra.mx \
-               mel.mx uchr.mx salgebra.mx vector.mx \
-               wisc.mx \
-               bat_mmath.mx bat_cast.mx array.mx color.mx \
-               image.mx txtsim.mx
-
-               # bitvector.mx ddbench.mx iterator.mx oo7.mx qt.mx
-       HEADERS = h proto.h m
-}
-
-# mprof.mx
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to