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  <[EMAIL PROTECTED]>

        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/ \\//'      \
        ) > [EMAIL PROTECTED]
 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/ \\//'                \
-       ) >> [EMAIL PROTECTED]
-       ( 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                                                    \
        ) >> [EMAIL PROTECTED]
 endif
        mv [EMAIL PROTECTED] $@

Reply via email to