]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
build: port to non-GNU make
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 17 Jul 2014 20:08:36 +0000 (13:08 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 17 Jul 2014 20:11:46 +0000 (13:11 -0700)
This fixes a problem with native Solaris 'make', which does not
grok '-include' lines (a GNU extension to POSIX 'make').
* configure.ac (man/dynamic-deps.mk): Create it, with an old
time stamp, if doing dynamic dependency tracking.
* man/local.mk (DISTCLEANFILES): Put man/dynamic-deps.mk here,
rather than in CLEANFILES.
(man/dynamic-deps.mk): Don't create it read-only, so that we
can easily touch it later.
Include it with '@AMDEP_TRUE@@am__include@', not with '-include',
as '-include' does not work with native Solaris 'make'.

configure.ac
man/local.mk

index b50f6e14c067c1fb44afee7a4c25eaa1e8857258..ae78cb1877477635829a0f29f52539c1150a52b9 100644 (file)
@@ -587,6 +587,15 @@ AM_GNU_GETTEXT_VERSION([0.18.1])
 # For a test of uniq: it uses the $LOCALE_FR envvar.
 gt_LOCALE_FR
 
+# If doing dynamic dependency checking, create man/dynamic-deps.mk so
+# that 'make' doesn't complain about its being absent.  Use an old
+# time stamp, so that 'make' thinks it is older than 'Makefile'.
+# Use time stamp 1, since some 'make' implementations treat 0 specially.
+# Use 'touch -t', since older 'touch' implementations don't grok -d.
+AC_CONFIG_COMMANDS([man/dynamic-deps.mk],
+  [test -n "$AMDEP_TRUE" ||
+   TZ=UTC0 touch -t 197001010000.01 man/dynamic-deps.mk])
+
 AC_CONFIG_FILES(
   Makefile
   po/Makefile.in
index a4117b110e7591acfd9ac5fd78eeb7de1c9cfd8f..f4b213f7e825322c2a3105928a64b62a968d5434 100644 (file)
@@ -57,7 +57,7 @@ $(ALL_MANS): $(mandeps)
 # are handled by converting $name to $prog on the following code.
 # $(ALL_MANS) includes the $(EXTRA_MANS) so even the programs that are not
 # being installed will have the right dependency for the manpages.
-CLEANFILES += man/dynamic-deps.mk
+DISTCLEANFILES += man/dynamic-deps.mk
 man/dynamic-deps.mk: Makefile
        $(AM_V_GEN)rm -f $@ $@-t
        $(AM_V_at)for man in $(ALL_MANS); do                            \
@@ -75,11 +75,10 @@ man/dynamic-deps.mk: Makefile
                                echo $$man: src/$$prog$(EXEEXT);;       \
                esac                                                    \
        done > $@-t                                                     \
-       && chmod a-w $@-t                                               \
        && mv $@-t $@
 
 # Include the generated man dependencies.
--include man/dynamic-deps.mk
+@AMDEP_TRUE@@am__include@ man/dynamic-deps.mk
 
 .x.1:
        $(AM_V_GEN)name=`echo $@ | sed 's|.*/||; s|\.1$$||'` || exit 1; \