changeset 19832:925fdd91abba

create .oct files directly instead of using stamp files (bug #44329) * libinterp/Makefile.am (OCT_STAMP_FILES): Delete variable. (all_local): Depend on $(OCT_FILES) instead of $(OCT_STAMP_FILES). * libinterp/dldfcn/config-module.awk: Generate pattern rule for .oct files.
author John W. Eaton <jwe@octave.org>
date Fri, 20 Feb 2015 19:36:35 -0500
parents ab1185e08273
children a9952a647d52
files libinterp/Makefile.am libinterp/dldfcn/config-module.awk
diffstat 2 files changed, 4 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/Makefile.am	Fri Feb 20 14:59:43 2015 -0800
+++ b/libinterp/Makefile.am	Fri Feb 20 19:36:35 2015 -0500
@@ -156,11 +156,9 @@
 
 if AMCOND_ENABLE_DYNAMIC_LINKING
   OCT_FILES = $(DLDFCN_LIBS:.la=.oct)
-  OCT_STAMP_FILES = $(subst dldfcn/,dldfcn/$(am__leading_dot),$(DLDFCN_LIBS:.la=.oct-stamp))
   DLD_LIBOCTINTERP_LIBADD = liboctinterp.la
 else
   OCT_FILES =
-  OCT_STAMP_FILES =
   DLD_LIBOCTINTERP_LIBADD =
 endif
 
@@ -325,9 +323,9 @@
 	$(top_srcdir)/build-aux/move-if-change $@ DOCSTRINGS && \
 	touch $@
 
-all-local: $(OCT_STAMP_FILES) $(DLDFCN_PKG_ADD_FILE) .DOCSTRINGS
+all-local: $(OCT_FILES) $(DLDFCN_PKG_ADD_FILE) .DOCSTRINGS
 else
-all-local: $(OCT_STAMP_FILES) $(DLDFCN_PKG_ADD_FILE)
+all-local: $(OCT_FILES) $(DLDFCN_PKG_ADD_FILE)
 endif
 
 if AMCOND_BUILD_DOCS
@@ -389,7 +387,6 @@
   DOCSTRINGS \
   $(BUILT_NODISTFILES) \
   $(OCT_FILES) \
-  $(OCT_STAMP_FILES) \
   $(TST_FILES)
 
 MAINTAINERCLEANFILES = \
--- a/libinterp/dldfcn/config-module.awk	Fri Feb 20 14:59:43 2015 -0800
+++ b/libinterp/dldfcn/config-module.awk	Fri Feb 20 19:36:35 2015 -0500
@@ -38,23 +38,9 @@
   print "## Use stamp files to avoid problems with checking timestamps";
   print "## of symbolic links";
   print "";
-  print "define gen-oct-stamp-file"
-  print "  rm -f $(<:.la=.oct)";
-  print "  la=$(<F) && \\";
-  print "    of=$(<F:.la=.oct) && \\";
-  print "    cd dldfcn && \\";
-  print "    $(LN_S) .libs/`$(SED) -n -e \"s/dlname='\\([^']*\\)'/\\1/p\" < $$la` $$of && \\";
-  print "    touch $(@F)";
-  print "endef"
+  print "%.oct : %.la"
+  print "	$(AM_V_GEN)$(INSTALL_PROGRAM) dldfcn/.libs/$(shell $(SED) -n -e \"s/dlname='\\([^']*\\)'/\\1/p\" < $<) $@"
   print ""
-
-    for (i = 1; i <= nfiles; i++) {
-    basename = files[i];
-    sub (/\.cc$/, "", basename);
-    printf ("dldfcn/$(am__leading_dot)%s.oct-stamp: dldfcn/%s.la\n", basename, basename);
-    print "\t$(AM_GEN_V)$(gen-oct-stamp-file)"
-    print "";
-  }
   print "else";
   print "";
   print "noinst_LTLIBRARIES += $(DLDFCN_LIBS)";