# HG changeset patch # User John W. Eaton # Date 1296014046 28800 # Node ID e88ac08bf70e3f94ce6b9b42826bb48afab6e191 # Parent a7f545d110fda2d5fa805d0cea629b86be4a0350 Use Makefile rules based on timestamp files for src/DLD-FUNCTIONS/*.oct diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -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 --git a/src/DLD-FUNCTIONS/config-module.awk b/src/DLD-FUNCTIONS/config-module.awk --- a/src/DLD-FUNCTIONS/config-module.awk +++ b/src/DLD-FUNCTIONS/config-module.awk @@ -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=$(