]> Savannah Git Hosting - gnulib.git/commitdiff
snippets: work around GNU Make 3.82 VPATH
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 14 Mar 2017 08:20:11 +0000 (01:20 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 14 Mar 2017 08:21:00 +0000 (01:21 -0700)
When using 'gnulib-tool --gnu-make' on Emacs, and building
the resulting tarball on Solaris 10 which bundles GNU Make 3.82,
an out-of-source (VPATH) build failed because the sans-copyright
snippet file was not built before the file that used it.
Presumably this is some sort of VPATH thing.  Work around the
problem by using the original snippet, i.e., don’t bother to
remove its copyright notice.
* modules/snippet/_Noreturn, modules/snippet/link-warning:
Don’t assume Automake in comments.  Omit long-incorrect comment.
* modules/snippet/arg-nonnull (BUILT_SOURCES, arg-nonnull.h)
(MOSTLYCLEANFILES):
* modules/snippet/c++defs (BUILT_SOURCES, c++defs.h)
(MOSTLYCLEANFILES):
* modules/snippet/unused-parameter (BUILT_SOURCES, unused-parameter.h)
(MOSTLYCLEANFILES):
* modules/snippet/warn-on-use (BUILT_SOURCES, warn-on-use.h)
(MOSTLYCLEANFILES):
Remove.
* modules/snippet/arg-nonnull (ARG_NONNULL_H):
* modules/snippet/c++defs (CXXDEFS_H):
* modules/snippet/unused-parameter (UNUSED_PARAMETER_H):
* modules/snippet/warn-on-use (WARN_ON_USE_H):
Don’t bother to remove the copyright notice; just use the
original snippet as-is.

ChangeLog
modules/snippet/_Noreturn
modules/snippet/arg-nonnull
modules/snippet/c++defs
modules/snippet/link-warning
modules/snippet/unused-parameter
modules/snippet/warn-on-use

index c468516b8715701f20b968478f46a003dd6f8987..09aec7b5017d0971750a09e0e324481791b8d3d9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,31 @@
+2017-03-14  Paul Eggert  <eggert@cs.ucla.edu>
+
+       snippets: work around GNU Make 3.82 VPATH
+       When using 'gnulib-tool --gnu-make' on Emacs, and building
+       the resulting tarball on Solaris 10 which bundles GNU Make 3.82,
+       an out-of-source (VPATH) build failed because the sans-copyright
+       snippet file was not built before the file that used it.
+       Presumably this is some sort of VPATH thing.  Work around the
+       problem by using the original snippet, i.e., don’t bother to
+       remove its copyright notice.
+       * modules/snippet/_Noreturn, modules/snippet/link-warning:
+       Don’t assume Automake in comments.  Omit long-incorrect comment.
+       * modules/snippet/arg-nonnull (BUILT_SOURCES, arg-nonnull.h)
+       (MOSTLYCLEANFILES):
+       * modules/snippet/c++defs (BUILT_SOURCES, c++defs.h)
+       (MOSTLYCLEANFILES):
+       * modules/snippet/unused-parameter (BUILT_SOURCES, unused-parameter.h)
+       (MOSTLYCLEANFILES):
+       * modules/snippet/warn-on-use (BUILT_SOURCES, warn-on-use.h)
+       (MOSTLYCLEANFILES):
+       Remove.
+       * modules/snippet/arg-nonnull (ARG_NONNULL_H):
+       * modules/snippet/c++defs (CXXDEFS_H):
+       * modules/snippet/unused-parameter (UNUSED_PARAMETER_H):
+       * modules/snippet/warn-on-use (WARN_ON_USE_H):
+       Don’t bother to remove the copyright notice; just use the
+       original snippet as-is.
+
 2017-03-13  Paul Eggert  <eggert@cs.ucla.edu>
 
        gnulib-tool: minor --gnu-make fixups
index c35910ead4ef97d7a815b91fc3d6933deaf861dd..d5e8ff02645e8096605bae329d6d4c3f143c3fec 100644 (file)
@@ -13,7 +13,7 @@ configure.ac:
 
 Makefile.am:
 # Because this Makefile snippet defines a variable used by other
-# gnulib Makefile snippets, it must be present in all Makefile.am that
+# gnulib Makefile snippets, it must be present in all makefiles that
 # need it. This is ensured by the applicability 'all' defined above.
 
 _NORETURN_H=$(top_srcdir)/build-aux/snippet/_Noreturn.h
index 38468ab8f3fde5933ec55534a1e921d09361e862..0eab137e6f819a0cb4928689bd57f27a81bb437e 100644 (file)
@@ -12,24 +12,11 @@ Depends-on:
 configure.ac:
 
 Makefile.am:
-# The BUILT_SOURCES created by this Makefile snippet are not used via #include
-# statements but through direct file reference. Therefore this snippet must be
-# present in all Makefile.am that need it. This is ensured by the applicability
-# 'all' defined above.
-
-BUILT_SOURCES += arg-nonnull.h
-# The arg-nonnull.h that gets inserted into generated .h files is the same as
-# build-aux/snippet/arg-nonnull.h, except that it has the copyright header cut
-# off.
-arg-nonnull.h: $(top_srcdir)/build-aux/snippet/arg-nonnull.h
-       $(AM_V_GEN)rm -f $@-t $@ && \
-       sed -n -e '/GL_ARG_NONNULL/,$$p' \
-         < $(top_srcdir)/build-aux/snippet/arg-nonnull.h \
-         > $@-t && \
-       mv $@-t $@
-MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t
-
-ARG_NONNULL_H=arg-nonnull.h
+# Because this Makefile snippet defines a variable used by other
+# gnulib Makefile snippets, it must be present in all makefiles that
+# need it. This is ensured by the applicability 'all' defined above.
+
+ARG_NONNULL_H=$(top_srcdir)/build-aux/snippet/arg-nonnull.h
 
 Include:
 
index 6f32ce063ace88514ae3f3d4067730a189d88e3e..9612c8b75d35f87fee308692bd6bd7d138837e87 100644 (file)
@@ -12,23 +12,11 @@ Depends-on:
 configure.ac:
 
 Makefile.am:
-# The BUILT_SOURCES created by this Makefile snippet are not used via #include
-# statements but through direct file reference. Therefore this snippet must be
-# present in all Makefile.am that need it. This is ensured by the applicability
-# 'all' defined above.
-
-BUILT_SOURCES += c++defs.h
-# The c++defs.h that gets inserted into generated .h files is the same as
-# build-aux/snippet/c++defs.h, except that it has the copyright header cut off.
-c++defs.h: $(top_srcdir)/build-aux/snippet/c++defs.h
-       $(AM_V_GEN)rm -f $@-t $@ && \
-       sed -n -e '/_GL_CXXDEFS/,$$p' \
-         < $(top_srcdir)/build-aux/snippet/c++defs.h \
-         > $@-t && \
-       mv $@-t $@
-MOSTLYCLEANFILES += c++defs.h c++defs.h-t
-
-CXXDEFS_H=c++defs.h
+# Because this Makefile snippet defines a variable used by other
+# gnulib Makefile snippets, it must be present in all makefiles that
+# need it. This is ensured by the applicability 'all' defined above.
+
+CXXDEFS_H=$(top_srcdir)/build-aux/snippet/c++defs.h
 
 Include:
 
index f4a7da6be860cc77ec0402f7ab7bd841134dc8af..8c1b16b0be3d7cbf8e34ef696610e9e801966fe8 100644 (file)
@@ -15,13 +15,14 @@ AC_REQUIRE([gl_FEATURES_H])
 Makefile.am:
 # The BUILT_SOURCES created by this Makefile snippet are not used via #include
 # statements but through direct file reference. Therefore this snippet must be
-# present in all Makefile.am that need it. This is ensured by the applicability
+# present in all Makefiles that need it. This is ensured by the applicability
 # 'all' defined above.
 
+# FIXME: The link-warning.h rule probably does not work if
+# gnulib-tool's --gnu-make option is used, when the build is an
+# out-of-source build that relies on VPATH.
+
 BUILT_SOURCES += link-warning.h
-# The link-warning.h that gets inserted into generated .h files is the same as
-# build-aux/snippet/link-warning.h, except that it has the copyright header cut
-# off.
 link-warning.h: $(top_srcdir)/build-aux/snippet/link-warning.h
        $(AM_V_GEN)rm -f $@-t $@ && \
        sed -n -e '/HAVE_FEATURES_H/,$$p' \
index a4376a0b8dbb8768d07beef14400af52c6149649..4a231fed0deb2d758bf3575096f1cdea67407816 100644 (file)
@@ -12,24 +12,11 @@ Depends-on:
 configure.ac:
 
 Makefile.am:
-# The BUILT_SOURCES created by this Makefile snippet are not used via #include
-# statements but through direct file reference. Therefore this snippet must be
-# present in all Makefile.am that need it. This is ensured by the applicability
-# 'all' defined above.
-
-BUILT_SOURCES += unused-parameter.h
-# The unused-parameter.h that gets inserted into generated .h files is the same
-# as build-aux/snippet/unused-parameter.h, except that it has the copyright
-# header cut off.
-unused-parameter.h: $(top_srcdir)/build-aux/snippet/unused-parameter.h
-       $(AM_V_GEN)rm -f $@-t $@ && \
-       sed -n -e '/GL_UNUSED_PARAMETER/,$$p' \
-         < $(top_srcdir)/build-aux/snippet/unused-parameter.h \
-         > $@-t && \
-       mv $@-t $@
-MOSTLYCLEANFILES += unused-parameter.h unused-parameter.h-t
-
-UNUSED_PARAMETER_H=unused-parameter.h
+# Because this Makefile snippet defines a variable used by other
+# gnulib Makefile snippets, it must be present in all makefiles that
+# need it. This is ensured by the applicability 'all' defined above.
+
+UNUSED_PARAMETER_H=$(top_srcdir)/build-aux/snippet/unused-parameter.h
 
 Include:
 
index 77f0f77d07ced7ddcc6981f5576af05736f0fd54..2642bc2ebc8a81774f75095875710acdfda7de37 100644 (file)
@@ -13,19 +13,11 @@ Depends-on:
 configure.ac:
 
 Makefile.am:
-BUILT_SOURCES += warn-on-use.h
-# The warn-on-use.h that gets inserted into generated .h files is the same as
-# build-aux/snippet/warn-on-use.h, except that it has the copyright header cut
-# off.
-warn-on-use.h: $(top_srcdir)/build-aux/snippet/warn-on-use.h
-       $(AM_V_GEN)rm -f $@-t $@ && \
-       sed -n -e '/^.ifndef/,$$p' \
-         < $(top_srcdir)/build-aux/snippet/warn-on-use.h \
-         > $@-t && \
-       mv $@-t $@
-MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t
-
-WARN_ON_USE_H=warn-on-use.h
+# Because this Makefile snippet defines a variable used by other
+# gnulib Makefile snippets, it must be present in all makefiles that
+# need it. This is ensured by the applicability 'all' defined above.
+
+WARN_ON_USE_H=$(top_srcdir)/build-aux/snippet/warn-on-use.h
 
 Include: