#
# Automake fragment to generate a Gnulib config header to rewrite exported
# symbols. This fragment relies on the Gnulib makefile postprocessing done by
#
# Automake fragment to generate a Gnulib config header to rewrite exported
# symbols. This fragment relies on the Gnulib makefile postprocessing done by
gnulib_headers += $(GLCONFIG)
# This suffix rule triggers symbol generation only on demand. Dependencies are
gnulib_headers += $(GLCONFIG)
# This suffix rule triggers symbol generation only on demand. Dependencies are
# The config header requires compilation of all gnulib object files via the
# .glsym rule above. However, it cannot depend on those build products
# directly because they are phony, and would make this header never up-to-date.
# The config header requires compilation of all gnulib object files via the
# .glsym rule above. However, it cannot depend on those build products
# directly because they are phony, and would make this header never up-to-date.
# The glconfig-gen target is intended only for use in recursive make
# invocations.
glconfig-gen: $(gnulib_symfiles)
# The glconfig-gen target is intended only for use in recursive make
# invocations.
glconfig-gen: $(gnulib_symfiles)
- symdir=`expr "$$sym" : '\(.*/\)'`; \
- symfile=`expr "$$sym" : '.*/\(.*\)' || printf '%s\n' "$$sym"`; \
- symbase=$$symdir.syms/`expr "$$symfile" : '\(.*\)\..*'`; \
- test -f "$$symbase.deps" && \
- depfiles="$$depfiles $$symbase.deps"; \
- symfiles="$$symfiles $$symbase.sym"; \
+ symdir=`expr "$$sym" : '\(.*/\)'`; \
+ symfile=`expr "$$sym" : '.*/\(.*\)' || printf '%s\n' "$$sym"`; \
+ symbase=$$symdir.syms/`expr "$$symfile" : '\(.*\)\..*'`; \
+ test -f "$$symbase.deps" && \
+ depfiles="$$depfiles $$symbase.deps"; \
+ symfiles="$$symfiles $$symbase.sym"; \
- $(GLCAT) $$depfiles > @GLSRC@/$(DEPDIR)/glconfig.Ph && \
- $(GLCAT) $$symfiles | sed 's/.*/#define & $(GLSYM_PREFIX)&/' \
- > $(GLCONFIG).tmp
+ $(glconfig_nodeps) \
+ || $(GLCAT) $$depfiles > @GLSRC@/$(DEPDIR)/glconfig.Ph || exit; \
+ $(GLCAT) $$symfiles | sed 's/.*/#define & $(GLSYM_PREFIX)&/' \
+ >$(GLCONFIG).tmp
# Automake 1.16 and newer use make rules to generate the dependency stubs.
# we must hook those which is kind of annoying to do. This should be harmless
# on previous versions which generate the stubs directly in config.status.
# Automake 1.16 and newer use make rules to generate the dependency stubs.
# we must hook those which is kind of annoying to do. This should be harmless
# on previous versions which generate the stubs directly in config.status.