[PATCH] add a dummy rule for %_dis.h when maintainer mode is disabled

Mike Frysinger vapier at gentoo.org
Tue Jun 26 16:07:35 UTC 2012


This prints a helpful error message so people know how to quickly recover
rather than the obtuse:
make[2]: *** No rule to make target `i386_dis.h', needed by `i386_disasm.o'.  Stop.

Signed-off-by: Mike Frysinger <vapier at gentoo.org>
---
 libcpu/ChangeLog   |    4 ++++
 libcpu/Makefile.am |    3 +++
 2 files changed, 7 insertions(+)

diff --git a/libcpu/ChangeLog b/libcpu/ChangeLog
index ef9e7e5..199a349 100644
--- a/libcpu/ChangeLog
+++ b/libcpu/ChangeLog
@@ -1,3 +1,7 @@
+2012-06-26  Mike Frysinger  <vapier at gentoo.org>
+
+	* Makefile.am [!MAINTAINER_MODE] ($(srcdir)/%_dis.h): Add dummy rule.
+
 2012-02-24  Mark Wielaard  <mjw at redhat.com>
 
 	* Makefile.am (CLEANFILES): Move %_dis.h to...
diff --git a/libcpu/Makefile.am b/libcpu/Makefile.am
index c1facd7..03064ea 100644
--- a/libcpu/Makefile.am
+++ b/libcpu/Makefile.am
@@ -55,6 +55,9 @@ noinst_PROGRAMS = i386_gendis
 
 $(srcdir)/%_dis.h: %_defs i386_gendis
 	./i386_gendis $< > $@
+else
+$(srcdir)/%_dis.h:
+	@printf "\nERROR: you need to re-run configure with --enable-maintainer-mode to generate $@\n\n"; false
 endif
 
 %.mnemonics: %_defs
-- 
1.7.9.7



More information about the elfutils-devel mailing list