qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Meyering <...@meyering.net>
Subject cpp/gen/Makefile.am: guard generated source lists
Date Mon, 04 Dec 2006 18:52:27 GMT
Hi Alan,

This change makes "make distcheck" pass.
"make distcheck" is a standard pre-distribution sanity test.
Part of what it does is to ensure you can build from a tarball
created by "make dist".  That was failing because when unpacking
the stand-alone tarball in some other position in the hierarchy,
file names like ../../gentools/... would not resolve.
With this change, they're automatically commented out in that case.

2006-12-04  Jim Meyering  <jim@meyering.net>

	Changes to make "make distcheck" pass.
	* gen/Makefile.am (DISTCLEANFILES): List gen-src.mk here,
	rather than distributing it.
	(gen-src.mk): Guard emitted java_sources and cxx_templates
	templates with "if BUILD_IN_MESSAGE_TREE" conditional.

Index: gen/Makefile.am
===================================================================
--- gen/Makefile.am	(revision 482266)
+++ gen/Makefile.am	(working copy)
@@ -26,19 +26,20 @@
 EXTRA_DIST += timestamp
 $(generated_sources): timestamp

-EXTRA_DIST += gen-src.mk
+DISTCLEANFILES = gen-src.mk
 gen-src.mk: timestamp
 	( echo 'generated_sources = \'					\
 	  && ls *.cpp *.h | sort -u | sed 's/.*/  & \\/;$$s/ \\//'	\
 	) > $@-t
 if BUILD_IN_MESSAGE_TREE
-	( echo 'java_sources = \'					\
+	( echo if BUILD_IN_MESSAGE_TREE;				\
+	  echo 'java_sources = \'					\
 	    && find $(gentools_srcdir) -name '*.java'			\
-		| sort -u | sed 's/.*/  & \\/;$$s/ \\//'		\
-	) >> $@-t
-	( echo 'cxx_templates = \'					\
+		| sort -u | sed 's/.*/  & \\/;$$s/ \\//';		\
+	  echo 'cxx_templates = \'					\
 	    && find $(gentools_dir)/templ.cpp -name '*.tmpl'		\
-		| sort -u | sed 's/.*/  & \\/;$$s/ \\//'		\
+		| sort -u | sed 's/.*/  & \\/;$$s/ \\//';		\
+	  echo endif							\
 	) >> $@-t
 endif
 	mv $@-t $@

Mime
View raw message