From: Thomas Markwalder Date: Wed, 22 Jul 2015 19:23:38 +0000 (-0400) Subject: [3929] pass input file path into mk_cfgrpt.sh X-Git-Tag: trac4006_base~3^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2c8a9087c5464c346c76295608b6a2baf544c7f;p=thirdparty%2Fkea.git [3929] pass input file path into mk_cfgrpt.sh Added required input config report file parameter to mk_cfgrpt.sh rather than having hard-coded by configure. This allows cfgrpt/Makefile to pass in the pathname of the report file it used in its "config_report.cc", as the input report file. In other words, we garuantee that the file we used for change is the same file we generate the source from. --- diff --git a/configure.ac b/configure.ac index 4a32f10a17..e8113dc14b 100644 --- a/configure.ac +++ b/configure.ac @@ -1495,7 +1495,6 @@ AC_CONFIG_FILES([compatcheck/Makefile src/lib/util/threads/tests/Makefile src/lib/util/unittests/Makefile tools/path_replacer.sh - tools/mk_cfgrpt.sh ]) AC_CONFIG_COMMANDS([permissions], [ @@ -1514,7 +1513,6 @@ AC_CONFIG_FILES([compatcheck/Makefile chmod +x src/lib/util/python/gen_wiredata.py chmod +x src/lib/util/tests/process_spawn_app.sh chmod +x tools/path_replacer.sh - chmod +x tools/mk_cfgrpt.sh ]) AC_OUTPUT diff --git a/src/lib/cfgrpt/Makefile.am b/src/lib/cfgrpt/Makefile.am index 92530ea1e5..46a644582e 100644 --- a/src/lib/cfgrpt/Makefile.am +++ b/src/lib/cfgrpt/Makefile.am @@ -13,6 +13,9 @@ noinst_LTLIBRARIES = libcfgrpt.la nodist_libcfgrpt_la_SOURCES = config_report.cc libcfgrpt_la_SOURCES = config_report.h cfgrpt.cc +# set pathname to the input configuration report +report_file = $(abs_top_builddir)/config.report + # Generate config_report.cc -config_report.cc: $(abs_top_builddir)/config.report - $(abs_top_builddir)/tools/mk_cfgrpt.sh $(abs_top_builddir)/src/lib/cfgrpt/config_report.cc +config_report.cc: $(report_file) + ${SHELL} $(top_srcdir)/tools/mk_cfgrpt.sh $(report_file) $(top_builddir)/src/lib/cfgrpt/config_report.cc diff --git a/tools/.gitignore b/tools/.gitignore index b97e1f5bd0..02b2be3e95 100644 --- a/tools/.gitignore +++ b/tools/.gitignore @@ -1,2 +1 @@ /path_replacer.sh -/mk_cfgrpt.sh diff --git a/tools/mk_cfgrpt.sh.in b/tools/mk_cfgrpt.sh similarity index 95% rename from tools/mk_cfgrpt.sh.in rename to tools/mk_cfgrpt.sh index 52ed985eaf..030c366b5d 100755 --- a/tools/mk_cfgrpt.sh.in +++ b/tools/mk_cfgrpt.sh @@ -17,8 +17,8 @@ # Called by configure # -dest="$1" -report_file="@abs_top_builddir@/config.report" +report_file="$1" +dest="$2" if [ -z ${report_file} ] then @@ -36,7 +36,7 @@ fi # Header cat >> $dest << END -// config_report.cc. Generated from config.report by tools/mk_cfgrpt_header.sh +// config_report.cc. Generated from config.report by tools/mk_cfgrpt.sh namespace isc { namespace detail {