4170: Use scripts located in build-aux in Scribo.

* Makefile.am: make use of scripts located in build-aux. * generate_dist_headers.sh: remove since useless. * headers.mk: regen. * nodist-headers: list of not distributed headers. * tests/unit_test/build_unit_test.sh: add output path as argument. * tests/unit_test/Makefile.am: update call to build_unit_test.sh. --- scribo/ChangeLog | 16 ++++++++++++++++ scribo/Makefile.am | 16 ++++++++++++---- scribo/generate_dist_headers.sh | 21 --------------------- scribo/headers.mk | 4 ++-- scribo/tests/unit_test/Makefile.am | 4 ++-- scribo/tests/unit_test/build_unit_test.sh | 4 ++-- 6 files changed, 34 insertions(+), 31 deletions(-) delete mode 100755 scribo/generate_dist_headers.sh create mode 100644 scribo/nodist-headers diff --git a/scribo/ChangeLog b/scribo/ChangeLog index f2751f0..306a272 100644 --- a/scribo/ChangeLog +++ b/scribo/ChangeLog @@ -1,3 +1,19 @@ +2009-06-19 Guillaume Lazzara <lazzara@lrde.epita.fr> + + Use scripts located in build-aux in Scribo. + + * Makefile.am: make use of scripts located in build-aux. + + * generate_dist_headers.sh: remove since useless. + + * headers.mk: regen. + + * nodist-headers: list of not distributed headers. + + * tests/unit_test/build_unit_test.sh: add output path as argument. + + * tests/unit_test/Makefile.am: update call to build_unit_test.sh. + 2009-06-16 Guillaume Lazzara <lazzara@lrde.epita.fr> Fix compilation issues with gcc-3.3 in Scribo. diff --git a/scribo/Makefile.am b/scribo/Makefile.am index 11aadf8..dede79f 100644 --- a/scribo/Makefile.am +++ b/scribo/Makefile.am @@ -27,15 +27,23 @@ bin: include $(top_srcdir)/build-aux/regen-recursive.mk REGEN_SUBDIRS += tests +# FIXME: the generation should be done from scribo's directory. regen-am: - cd $(srcdir) && ./generate_dist_headers.sh + cd $(srcdir) && \ + $(top_srcdir)/build-aux/generate_dist_headers.sh\ + . \ + ./headers.mk \ + ./nodist-headers -EXTRA_DIST = generate_dist_headers.sh # FIXME: Change generate_dist_headers.sh so that the action looks like this: # # $< $@.tmp && mv -f $@.tmp $@ && chmod -w $@ # -$(srcdir)/headers.mk: $(srcdir)/generate_dist_headers.sh - cd $(srcdir) && ./generate_dist_headers.sh +$(srcdir)/headers.mk: $(top_srcdir)/build-aux/generate_dist_headers.sh + cd $(srcdir) && \ + $(top_srcdir)/build-aux/generate_dist_headers.sh\ + . \ + ./headers.mk \ + ./nodist-headers include $(srcdir)/headers.mk diff --git a/scribo/generate_dist_headers.sh b/scribo/generate_dist_headers.sh deleted file mode 100755 index a6dd8d5..0000000 --- a/scribo/generate_dist_headers.sh +++ /dev/null @@ -1,21 +0,0 @@ -#! /bin/sh - -# Generate scribo/headers.mk -# ------------------------------ -# List all the headers in order to make them part of distribution. - -# Use the C locale to have a deterministic sort. -export LC_ALL=C - -echo "## Generated by ./generate_dist_headers, do not modify ##" > headers.mk -echo "" >> headers.mk -echo "noinst_HEADERS = \\" >> headers.mk -echo "generating headers.mk" - -find . -type f -name '*.hh'| grep -v "\.svn" | sed -e 's/$/ \\/g' | sort >> headers.mk -find . -type f -name '*.hxx'| grep -v "\.svn" | sed -e 's/$/ \\/g'| sort >> headers.mk - -last_line=`tail -n 1 headers.mk | sed -e 's/\\\//g'` # remove '\' in last line -sed '$d' < headers.mk > headers.mk.tmp # remove last line -mv headers.mk.tmp headers.mk -echo $last_line >> headers.mk # put the cleaned last line back. diff --git a/scribo/headers.mk b/scribo/headers.mk index eceb426..4846d70 100644 --- a/scribo/headers.mk +++ b/scribo/headers.mk @@ -1,6 +1,6 @@ -## Generated by ./generate_dist_headers, do not modify ## +## Generated by `generate_dist_headers.sh', do not edit by hand. -noinst_HEADERS = \ +nobase_include_HEADERS = \ ./all.hh \ ./binarization/simple.hh \ ./core/all.hh \ diff --git a/scribo/nodist-headers b/scribo/nodist-headers new file mode 100644 index 0000000..e69de29 diff --git a/scribo/tests/unit_test/Makefile.am b/scribo/tests/unit_test/Makefile.am index ef9b282..79b3830 100644 --- a/scribo/tests/unit_test/Makefile.am +++ b/scribo/tests/unit_test/Makefile.am @@ -23,7 +23,7 @@ include $(top_srcdir)/scribo/scribo.mk include $(top_srcdir)/build-aux/regen-recursive.mk regen-am: cd $(srcdir) \ - && ./build_unit_test.sh $(abs_top_srcdir)/scribo + && ./build_unit_test.sh $(abs_top_srcdir)/scribo . # FIXME: Change build_unit_test.sh so that the action looks like this: # @@ -33,7 +33,7 @@ regen-am: # at the beginning og the action. $(srcdir)/unit-tests.mk: $(srcdir)/build_unit_test.sh cd $(srcdir) \ - && ./build_unit_test.sh $(abs_top_srcdir)/scribo + && ./build_unit_test.sh $(abs_top_srcdir)/scribo . include $(srcdir)/unit-tests.mk diff --git a/scribo/tests/unit_test/build_unit_test.sh b/scribo/tests/unit_test/build_unit_test.sh index e722204..d4af384 100755 --- a/scribo/tests/unit_test/build_unit_test.sh +++ b/scribo/tests/unit_test/build_unit_test.sh @@ -11,7 +11,7 @@ ECHO_N=printf # Use the C locale to have a deterministic sort. export LC_ALL=C -test $# -eq 1 || { echo "Usage: $0 <scribo path>" && exit 1; } +test $# -eq 2 || { echo "Usage: $0 <scribo path> <output path>" && exit 1; } ## FIXME: Ouch! Using `find' properly can probably save us some pipes, ## forks and characters here. @@ -23,7 +23,7 @@ HEADERS=`find $1 -name "*.hh" \ | sed -e 's/.*\/scribo\/\(.*\)/scribo\/\1/g' \ | sed 's/\.\.\/\.\.\///g'` -output=unit-tests.mk +output=$2/unit-tests.mk rm -f "$output" rm -f scribo_*.cc -- 1.5.6.5
participants (1)
-
Guillaume Lazzara