]> Savannah Git Hosting - gnulib.git/commitdiff
getopt-posix,
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 16 Dec 2021 21:13:27 +0000 (13:13 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 16 Dec 2021 21:14:19 +0000 (13:14 -0800)
* modules/getopt-posix (getopt.h, getopt-cdefs.h):
Build only if GL_GENERATE_GETOPT_H.

ChangeLog
modules/getopt-posix

index e1be947a3713637bb6755f838f0eb97e04186dd0..b83d2508fdbca28826e6431dc1c656ba76216900 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2021-12-16  Paul Eggert  <eggert@cs.ucla.edu>
 
+       getopt-posix,
+       * modules/getopt-posix (getopt.h, getopt-cdefs.h):
+       Build only if GL_GENERATE_GETOPT_H.
+
        stdint: omit duplicate gl_CONFIGURE_HEADER calls
        * modules/stdint (configure.ac): Omit
        ‘gl_CONDITIONAL_HEADER([limits.h])’, since stdint depends on
index bac9dc57c9f28ce6c4f91dd8ee41557730462b04..b9caa6a4719dd290d18f5ae3a6bf3ef994f68d02 100644 (file)
@@ -38,6 +38,7 @@ BUILT_SOURCES += $(GETOPT_H) $(GETOPT_CDEFS_H)
 
 # We need the following in order to create <getopt.h> when the system
 # doesn't have one that works with the given compiler.
+if GL_GENERATE_GETOPT_H
 getopt.h: getopt.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
        $(AM_V_GEN)rm -f $@-t $@ && \
        $(MKDIR_P) '%reldir%' && \
@@ -60,6 +61,10 @@ getopt-cdefs.h: getopt-cdefs.in.h $(top_builddir)/config.status
              < $(srcdir)/getopt-cdefs.in.h; \
        } > $@-t && \
        mv -f $@-t $@
+else
+getopt.h getopt-cdefs.h: $(top_builddir)/config.status
+       rm -f $@
+endif
 
 MOSTLYCLEANFILES += getopt.h getopt.h-t getopt-cdefs.h getopt-cdefs.h-t