]> git.draconx.ca Git - dxcommon.git/blobdiff - snippet/glconfig.mk
Fix glconfig with --disable-dependency-tracking.
[dxcommon.git] / snippet / glconfig.mk
index b7ed4cc02e88f648306824cc7b95458344f31655..c35a8fb114f525a6fd21b46a24152766e234ad88 100644 (file)
@@ -72,21 +72,28 @@ CLEANFILES += $(GLCONFIG)
 # The glconfig-gen target is intended only for use in recursive make
 # invocations.
 glconfig-gen: $(gnulib_symfiles)
+       $(AM_V_at) $(MKDIR_P) @GLSRC@
        $(AM_V_at) depfiles=; symfiles=; \
        for sym in $(gnulib_symfiles); do \
-               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"; \
        done; \
-               $(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
 .PHONY: glconfig-gen
 
-@AMDEP_TRUE@@am__include@ @am__quote@@GLSRC@/$(DEPDIR)/glconfig.Ph@am__quote@@dx_include_marker@
+if AMDEP
+glconfig_nodeps = false
+@am__include@ @am__quote@@GLSRC@/$(DEPDIR)/glconfig.Ph@am__quote@@dx_include_marker@
+else
+glconfig_nodeps = true
+endif
 
 # 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