Update of /cvsroot/monetdb/buildtools/autogen/autogen
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv27558/autogen/autogen
Modified Files:
am.py msc.py
Log Message:
Make it possible to have conditional symlinks.
Index: am.py
===================================================================
RCS file: /cvsroot/monetdb/buildtools/autogen/autogen/am.py,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- am.py 31 Aug 2007 15:41:18 -0000 1.45
+++ am.py 4 Sep 2007 12:30:14 -0000 1.46
@@ -450,7 +450,14 @@
for i in binmap:
am['InstallList'].append("\t$(bindir)/"+i+"\n")
else: # link
- src = binmap[0][4:]
+ binmap = binmap[0]
+ if '?' in binmap:
+ cond, binmap = binmap.split('?', 1)
+ else:
+ cond = ''
+ src = binmap[4:]
+ if cond:
+ fd.write('if %s\n' % cond)
fd.write("install-exec-local-%s: %s\n" % (name, src))
fd.write("\t-mkdir -p $(DESTDIR)$(bindir)\n")
fd.write("\t-$(RM) $(DESTDIR)$(bindir)/%s\n" % name)
@@ -464,6 +471,12 @@
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))
+ if cond:
+ fd.write('else\n')
+ fd.write("install-exec-local-%s:\n" % name)
+ fd.write("uninstall-local-%s:\n" % name)
+ fd.write("all-local-%s:\n" % name)
+ fd.write('endif\n')
am['ALL'].append(name)
return
Index: msc.py
===================================================================
RCS file: /cvsroot/monetdb/buildtools/autogen/autogen/msc.py,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- msc.py 31 Aug 2007 15:41:18 -0000 1.34
+++ msc.py 4 Sep 2007 12:30:14 -0000 1.35
@@ -492,16 +492,28 @@
fd.write('\t$(INSTALL) "$(SRCDIR)\\%s" "%s"\n' % (i, i))
msc['INSTALL'][i] = i, '', '$(bindir)', '', ''
else: # link
- src = binmap[0][4:]
+ binmap = binmap[0]
+ if '?' in binmap:
+ cond, binmap = binmap.split('?', 1)
+ condname = 'defined(%s)' % cond
+ else:
+ cond = condname = ''
+ src = binmap[4:]
+ if cond:
+ fd.write('!IF %s\n' % condname)
fd.write('%s: "%s"\n' % (name, src))
fd.write('\t$(CP) "%s" "%s"\n\n' % (src, name))
+ if cond:
+ fd.write('!ELSE\n')
+ fd.write('%s:\n' % name)
+ fd.write('!ENDIF\n')
n_nme, n_ext = split_filename(name)
s_nme, s_ext = split_filename(src)
if n_ext and s_ext and n_ext == s_ext:
ext = ''
else:
ext = '.exe'
- msc['INSTALL'][name] = src + ext, ext, '$(bindir)', '', ''
+ msc['INSTALL'][name] = src + ext, ext, '$(bindir)', '', condname
msc['SCRIPTS'].append(name)
return
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins