You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gs...@apache.org on 2006/12/05 14:12:26 UTC

svn commit: r482637 - in /incubator/qpid/trunk/qpid/cpp: bootstrap gen/Makefile.am

Author: gsim
Date: Tue Dec  5 05:12:25 2006
New Revision: 482637

URL: http://svn.apache.org/viewvc?view=rev&rev=482637
Log:
Patch submitted on qpid-dev:

2006-12-05  Jim Meyering  <me...@redhat.com>

	* gen/Makefile.am (timestamp): Remove unnecessary "; \",
	that could have obscured a failure.
	(gen-src.mk): Use echo 'var = '\\, rather than 'var = \'.
	Both work, but emacs' font-lock mode mishandles the latter.

	* bootstrap: Give JAVA and JAVAC default values, and export them.
	Don't define abs_srcdir; no longer needed.
	Also filter out gen/Makefile.am's echo warning: ...
	Add comments.


Modified:
    incubator/qpid/trunk/qpid/cpp/bootstrap
    incubator/qpid/trunk/qpid/cpp/gen/Makefile.am

Modified: incubator/qpid/trunk/qpid/cpp/bootstrap
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/bootstrap?view=diff&rev=482637&r1=482636&r2=482637
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/bootstrap (original)
+++ incubator/qpid/trunk/qpid/cpp/bootstrap Tue Dec  5 05:12:25 2006
@@ -4,13 +4,22 @@
 autoheader
 libtoolize --automake
 
+# These are needed only if you don't already have the gen/*.{h,cpp} files.
+: ${JAVA=java}
+: ${JAVAC=javac}
+export JAVA JAVAC
+
 # If we're building in the qpid tree, we can generate
 # some Makefile snippets:
 
 if test -d ../gentools && test -d ../specs; then
+  # Transform gen/Makefile.am, removing automake-constructs and the
+  # contents of the sole automake-else clause (the warning), then
+  # use the result to run the rules that create gen-src.mk, a file
+  # that must be created before we run automake.
   (cd gen && rm -f gen-src.mk
-    perl -ne '/^(abs_srcdir|if|else|endif|include)\b/ or print' Makefile.am \
-	| make -f - abs_srcdir=`pwd` srcdir=. gen-src.mk > /dev/null )
+    perl -ne '/warning:|^(if|else|endif|include)\b/ or print' Makefile.am \
+	| make -f - srcdir=. gen-src.mk > /dev/null )
 fi
 
 # Generate (for automake) lots of repetitive parts of tests/Makefile.am.

Modified: incubator/qpid/trunk/qpid/cpp/gen/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/qpid/trunk/qpid/cpp/gen/Makefile.am?view=diff&rev=482637&r1=482636&r2=482637
==============================================================================
--- incubator/qpid/trunk/qpid/cpp/gen/Makefile.am (original)
+++ incubator/qpid/trunk/qpid/cpp/gen/Makefile.am Tue Dec  5 05:12:25 2006
@@ -15,9 +15,9 @@
 timestamp: $(spec) $(java_sources) $(cxx_templates)
 if BUILD_IN_MESSAGE_TREE
 	rm -f $(generated_sources)
-	(cd $(gentools_srcdir) && rm -f *.class && $(JAVAC) *.java);	\
-	$(JAVA) -cp $(gentools_dir)/src org.apache.qpid.gentools.Main	\
-	  -c -o . -t $(gentools_dir)/templ.cpp $(spec)
+	cd $(gentools_srcdir) && rm -f *.class && $(JAVAC) *.java
+	$(JAVA) -cp $(gentools_dir)/src org.apache.qpid.gentools.Main \
+	        -c -o . -t $(gentools_dir)/templ.cpp $(spec)
 else
 	echo "warning: failed to regenerate gen/*.{cpp,h}" 1>&2
 endif
@@ -28,15 +28,15 @@
 
 DISTCLEANFILES = gen-src.mk
 gen-src.mk: timestamp
-	( echo 'generated_sources = \'					\
+	( echo 'generated_sources = '\\					\
 	  && ls *.cpp *.h | sort -u | sed 's/.*/  & \\/;$$s/ \\//'	\
 	) > $@-t
 if BUILD_IN_MESSAGE_TREE
 	( echo if BUILD_IN_MESSAGE_TREE;				\
-	  echo 'java_sources = \'					\
+	  echo 'java_sources = '\\					\
 	    && find $(gentools_srcdir) -name '*.java'			\
 		| sort -u | sed 's/.*/  & \\/;$$s/ \\//';		\
-	  echo 'cxx_templates = \'					\
+	  echo 'cxx_templates = '\\					\
 	    && find $(gentools_dir)/templ.cpp -name '*.tmpl'		\
 		| sort -u | sed 's/.*/  & \\/;$$s/ \\//';		\
 	  echo endif							\