summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.in.dep.patch19
-rw-r--r--configure.ac4
2 files changed, 22 insertions, 1 deletions
diff --git a/Makefile.in.dep.patch b/Makefile.in.dep.patch
new file mode 100644
index 00000000..72fb65f6
--- /dev/null
+++ b/Makefile.in.dep.patch
@@ -0,0 +1,19 @@
+--- Makefile.in
++++ Makefile.in
+@@ -4785,7 +4785,15 @@ distclean-compile:
+
+ $(am__depfiles_remade):
+ @$(MKDIR_P) $(@D)
+- @echo '# dummy' >$@-t && $(am__mv) $@-t $@
++ # Ugly bootstrap hack to get to-be-generated files created
++ # Try to guess what file this dependency file is from...
++ @f=$(srcdir)/`dirname "$(@D)"`/`basename "$@" .Po | sed s/lib[^-]\*-//` ; \
++ for f in "$$f"*; do \
++ case $$f in \
++ *.c | *.S) echo "$$f"': $$(filter-out $$(DIST_SOURCES),$$(SOURCES))' ;; \
++ *) echo '# dummy';; \
++ esac ; \
++ done >$@-t && $(am__mv) $@-t $@
+
+ am--depfiles: $(am__depfiles_remade)
+
diff --git a/configure.ac b/configure.ac
index 40e78a04..df5a1a08 100644
--- a/configure.ac
+++ b/configure.ac
@@ -216,7 +216,9 @@ dnl 's%#\ dummy%Makefile: $(filter-out $(DIST_SOURCES),$(SOURCES))%' \
dnl config.status
dnl ])
AC_CONFIG_COMMANDS_POST([
- if "$PATCH" -f < "$srcdir"/config.status.dep.patch
+ if "$PATCH" -f < "$srcdir"/config.status.dep.patch > /dev/null 2>&1 ||
+ "$PATCH" -f < "$srcdir"/Makefile.in.dep.patch > /dev/null 2>&1 ||
+ grep "Ugly bootstrap hack to get to-be-generated files created" Makefile.in > /dev/null 2>&1
then] AC_MSG_NOTICE([Applied a patch to work around a deficiency in]
[Automake. See `configure.ac' for details.])
[else] AC_MSG_ERROR([failed to patch using `config.status.dep.patch'.]