]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3929] pass input file path into mk_cfgrpt.sh
authorThomas Markwalder <tmark@isc.org>
Wed, 22 Jul 2015 19:23:38 +0000 (15:23 -0400)
committerThomas Markwalder <tmark@isc.org>
Wed, 22 Jul 2015 19:23:38 +0000 (15:23 -0400)
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.

configure.ac
src/lib/cfgrpt/Makefile.am
tools/.gitignore
tools/mk_cfgrpt.sh [moved from tools/mk_cfgrpt.sh.in with 95% similarity]

index 4a32f10a17c48f94983cd43e00881f27d017275b..e8113dc14ba27351bbf952b159a4f6782622854e 100644 (file)
@@ -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
index 92530ea1e5e7e93c8350e799681760c2cb2df4a1..46a644582ed43042c1e44cfef754e58091e1ecb3 100644 (file)
@@ -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
index b97e1f5bd0b9faa6d52679e464a685e177c73f16..02b2be3e95eef63a98e84aaafc25fd2254aee540 100644 (file)
@@ -1,2 +1 @@
 /path_replacer.sh
-/mk_cfgrpt.sh
similarity index 95%
rename from tools/mk_cfgrpt.sh.in
rename to tools/mk_cfgrpt.sh
index 52ed985eaf33bc8aadf74686ffa7a099e1d765d8..030c366b5d831222d3c653e4d27018b8a76afcf2 100755 (executable)
@@ -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 {