# HG changeset patch # User John W. Eaton # Date 1296014046 28800 # Node ID c9f42acd84e27d9738f0611d3c82138b6dbfb5f0 # Parent 1c5ecdda4e9a7cc85635dcfe083854fbbdf1bc97 Use Makefile rules based on timestamp files for src/DLD-FUNCTIONS/*.oct diff -r 1c5ecdda4e9a -r c9f42acd84e2 src/ChangeLog --- a/src/ChangeLog Tue Jan 25 13:40:26 2011 -0800 +++ b/src/ChangeLog Tue Jan 25 19:54:06 2011 -0800 @@ -4,6 +4,15 @@ load-save.cc: Make docstrings static by removing documentation depending on #ifdef configuration variables. +2011-01-25 John W. Eaton + + * Makefile.am (OCT_STAMP_FILES): New variable. + (DISTCLEANFILES): Add $(OCT_STAMP_FILES) to the list. + (all-local): Depend on $(OCT_STAMP_FILES) instead of $(OCT_FILES). + + * DLD-FUNCTIONS/config-module.awk: Create stamp files when + creating .oct file links. + 2011-01-25 Konstantinos Poulios * src/graphics.cc (text::properties::update_text_extent): diff -r 1c5ecdda4e9a -r c9f42acd84e2 src/DLD-FUNCTIONS/config-module.awk --- a/src/DLD-FUNCTIONS/config-module.awk Tue Jan 25 13:40:26 2011 -0800 +++ b/src/DLD-FUNCTIONS/config-module.awk Tue Jan 25 19:54:06 2011 -0800 @@ -10,31 +10,38 @@ } { files[++nfiles] = $1; } END { + print "DLD_FUNCTIONS_SRC = \\"; + for (i = 1; i <= nfiles; i++) { + if (i == nfiles) + sep = "\n"; + printf (" DLD-FUNCTIONS/%s%s", files[i], sep); + } + print ""; + sep = " \\\n"; - print "DLD_FUNCTIONS_LIBS = \\"; + print "DLD_FUNCTIONS_LIBS = $(DLD_FUNCTIONS_SRC:.cc=.la)"; + print ""; + print "octlib_LTLIBRARIES += $(DLD_FUNCTIONS_LIBS)"; + print ""; + print "if AMCOND_ENABLE_DYNAMIC_LINKING"; + print ""; + print "## Use stamp files to avoid problems with checking timestamps"; + print "## of symbolic links"; + print ""; for (i = 1; i <= nfiles; i++) { basename = files[i]; sub (/\.cc$/, "", basename); - if (i == nfiles) - sep = "\n"; - printf (" DLD-FUNCTIONS/%s.la%s", basename, sep); - } - print "" - print "octlib_LTLIBRARIES += $(DLD_FUNCTIONS_LIBS)"; - print "" - print "if AMCOND_ENABLE_DYNAMIC_LINKING"; - for (i = 1; i <= nfiles; i++) { - basename = files[i]; - sub (/\.cc$/, "", basename); - printf ("DLD-FUNCTIONS/%s.oct: DLD-FUNCTIONS/%s.la\n", basename, basename); - print "\trm -f $@"; - print "\tla=`echo $< | $(SED) 's,DLD-FUNCTIONS/,,'` && \\"; - print "\t of=`echo $@ | $(SED) 's,DLD-FUNCTIONS/,,'` && \\"; + printf ("DLD-FUNCTIONS/.%s.oct-stamp: DLD-FUNCTIONS/%s.la\n", basename, basename); + print "\trm -f $(<:.la=.oct)"; + print "\tla=$(