Remove leftover generated .h files after config.status changed.
[pspp] / modules / fnmatch
index cff8bad5a00336566919324b455dcfa5fbf55da0..fde25a17331b1f740b49f999279f1cef9ab37dc5 100644 (file)
@@ -14,7 +14,7 @@ extensions
 alloca
 stdbool
 wchar
-wctype
+wctype-h
 memchr
 memcmp
 mbsrtowcs
@@ -24,20 +24,22 @@ configure.ac:
 gl_FUNC_FNMATCH_POSIX
 
 Makefile.am:
-nodist_pkginclude_HEADERS += $(FNMATCH_H)
-EXTRA_HEADERS += fnmatch.h
-
 BUILT_SOURCES += $(FNMATCH_H)
 
 # We need the following in order to create <fnmatch.h> when the system
 # doesn't have one that supports the required API.
-fnmatch.h: fnmatch.in.h $(ARG_NONNULL_H)
+if GL_GENERATE_FNMATCH_H
+fnmatch.h: fnmatch.in.h $(top_builddir)/config.status $(ARG_NONNULL_H)
        $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
              < $(srcdir)/fnmatch.in.h; \
        } > $@-t && \
        mv -f $@-t $@
+else
+fnmatch.h: $(top_builddir)/config.status
+       rm -f $@
+endif
 MOSTLYCLEANFILES += fnmatch.h fnmatch.h-t
 
 Include: