diff options
Diffstat (limited to 'qpid/cpp')
-rwxr-xr-x | qpid/cpp/bootstrap | 13 | ||||
-rw-r--r-- | qpid/cpp/gen/Makefile.am | 12 |
2 files changed, 17 insertions, 8 deletions
diff --git a/qpid/cpp/bootstrap b/qpid/cpp/bootstrap index 34b16cb16b..e52b403700 100755 --- a/qpid/cpp/bootstrap +++ b/qpid/cpp/bootstrap @@ -4,13 +4,22 @@ aclocal -I m4 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. diff --git a/qpid/cpp/gen/Makefile.am b/qpid/cpp/gen/Makefile.am index 0529afbf7e..eea08c9570 100644 --- a/qpid/cpp/gen/Makefile.am +++ b/qpid/cpp/gen/Makefile.am @@ -15,9 +15,9 @@ gentools_srcdir = $(gentools_dir)/src/org/apache/qpid/gentools 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 @@ $(generated_sources): timestamp 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 \ |