Update of /cvsroot/monetdb/buildtools/autogen/autogen
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19913

Modified Files:
        am.py 
Log Message:
Implemented conditional for headers.


Index: am.py
===================================================================
RCS file: /cvsroot/monetdb/buildtools/autogen/autogen/am.py,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- am.py       13 Sep 2007 14:00:08 -0000      1.54
+++ am.py       17 Sep 2007 07:52:54 -0000      1.55
@@ -378,20 +378,31 @@
     hdrs_ext = headers['HEADERS']
     for header in headers['TARGETS']:
         h, ext = split_filename(header)
-        if ext in hdrs_ext:
-            fd.write("install-exec-local-%s: %s\n" % (header, header))
-            fd.write("\t-mkdir -p $(DESTDIR)%s\n" % sd)
-            fd.write("\t-$(RM) $(DESTDIR)%s/%s\n" % (sd, header))
-            fd.write("\t$(INSTALL_DATA) $< $(DESTDIR)%s/%s\n\n" % (sd, header))
-            fd.write("uninstall-local-%s: \n" % header)
-            fd.write("\t$(RM) $(DESTDIR)%s/%s\n\n" % (sd, header))
-            am['INSTALL'].append(header)
-            am['UNINSTALL'].append(header)
-            am['BUILT_SOURCES'].append(header)
-            cond = ''
-            if headers.has_key('COND'):
-                cond = '#' + string.join(headers['COND'], '+')
-            am['InstallList'].append("\t"+sd+"/"+header+cond+"\n")
+        if ext not in hdrs_ext:
+            continue
+        cond = ''
+        h = header
+        if headers.has_key('COND'):
+            mkname = am_normalize(string.replace(header, '.', '_'))
+            for condname in headers['COND']:
+                fd.write('if %s\n' % condname)
+            fd.write('C_%s = %s\n' % (mkname, header))
+            h = '$(C_%s)' % mkname
+            for condname in headers['COND']:
+                fd.write('endif\n')
+        fd.write("install-exec-local-%s: %s\n" % (header, header))
+        fd.write("\t-mkdir -p $(DESTDIR)%s\n" % sd)
+        fd.write("\t-$(RM) $(DESTDIR)%s/%s\n" % (sd, header))
+        fd.write("\t$(INSTALL_DATA) $< $(DESTDIR)%s/%s\n\n" % (sd, header))
+        fd.write("uninstall-local-%s: \n" % header)
+        fd.write("\t$(RM) $(DESTDIR)%s/%s\n\n" % (sd, header))
+        am['INSTALL'].append(h)
+        am['UNINSTALL'].append(h)
+        am['BUILT_SOURCES'].append(h)
+        cond = ''
+        if headers.has_key('COND'):
+            cond = '#' + string.join(headers['COND'], '+')
+        am['InstallList'].append("\t"+sd+"/"+header+cond+"\n")
 
     am_find_ins(am, headers)
     am_deps(fd, headers['DEPS'], "\.o", am)


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to