From: Thomas Markwalder Date: Wed, 22 Jul 2015 15:53:35 +0000 (-0400) Subject: [3929] config_report.cc is now generated during src/lib/cfgrpt/Makefile X-Git-Tag: trac4006_base~3^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7eaa1ec09c33679b44ce8492ed9cbcb97b821733;p=thirdparty%2Fkea.git [3929] config_report.cc is now generated during src/lib/cfgrpt/Makefile By generating config_report.cc in the cfgrpt directory Makefile rather than configure, it can be treated as any other generated source file, rather than a one-off special case. Moved cfgrpt directory from bin to lib since it creates a library rather than an executable. mk_cfgrpt.sh is now generated by configure from a .in file and Details: configure.ac removed call to mk_cfgrpts.sh added mk_cfgprt.sh to list of files generated by configure src/bin/Makefile.am removed cfgrpt dir changed cfgrpt directory to lib src/bin/d2/Makefile.am src/bin/d2/tests/Makefile.am src/bin/dhcp4/Makefile.am src/bin/dhcp4/tests/Makefile.am src/bin/dhcp6/Makefile.am src/bin/dhcp6/tests/Makefile.am src/bin/lfc/Makefile.am src/bin/lfc/tests/Makefile.am src/bin/perfdhcp/Makefile.am src/bin/perfdhcp/tests/Makefile.am src/lib/Makefile.am added cfgrpt dir src/lib/cfgrpt/Makefile.am changed include dir to be in lib not dir added config_report.cc to CLEANFILES added config_report.cc to BUILD_SOURCES removed config_report.cc from libcfgrpt_la_SOURCES added rule for config_report.cc to call mk_cfgrpt.sh --- diff --git a/configure.ac b/configure.ac index 93bc9fbc1c..148a353dd5 100644 --- a/configure.ac +++ b/configure.ac @@ -1393,7 +1393,6 @@ AC_CONFIG_FILES([compatcheck/Makefile src/bin/d2/tests/Makefile src/bin/d2/tests/d2_process_tests.sh src/bin/d2/tests/test_data_files_config.h - src/bin/cfgrpt/Makefile src/bin/dhcp4/Makefile src/bin/dhcp4/spec_config.h.pre src/bin/dhcp4/tests/Makefile @@ -1442,6 +1441,7 @@ AC_CONFIG_FILES([compatcheck/Makefile src/lib/asiolink/tests/Makefile src/lib/cc/Makefile src/lib/cc/tests/Makefile + src/lib/cfgrpt/Makefile src/lib/config/Makefile src/lib/config/tests/Makefile src/lib/config/tests/data_def_unittests_config.h @@ -1494,6 +1494,7 @@ 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], [ @@ -1512,6 +1513,7 @@ 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 @@ -1651,10 +1653,6 @@ Developer: END -# Create config_report.cc with embedded config.report -chmod +x ${srcdir}/tools/mk_cfgrpt.sh -${srcdir}/tools/mk_cfgrpt.sh ${srcdir}/src/bin/cfgrpt/config_report.cc - cat config.report cat < $dest +cat /dev/null > $dest +if [ $? -ne 0 ] +then + echo "ERROR mk_cfgrpt.sh - cannot create config output file: $dest" + exit -1 +fi # Header cat >> $dest << END @@ -34,7 +46,7 @@ END # Body: escape '\'s and '"'s, preprend ' ";;;; ' and append '",' sed -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/^/ ";;;; /' -e 's/$/",/' \ - < config.report >> $dest + < $report_file >> $dest # Trailer cat >> $dest <