diff options
author | Paul Smith <psmith@gnu.org> | 2022-10-16 15:13:41 -0400 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2022-10-18 14:20:44 -0400 |
commit | 2d943d3d2e5b69d6b635314a46d20e55cfbd255a (patch) | |
tree | eb272d7661251ee0aecdf5357519c734110cbea1 /bootstrap.bat | |
parent | b16913a67e1d0f651293d24f10ccca54a8cc0d08 (diff) | |
download | make-git-2d943d3d2e5b69d6b635314a46d20e55cfbd255a.tar.gz |
Remove template files to simplify distribution creation
The README templates were not useful since the replacement step
didn't have anything to replace: rename them.
Rather than creating template files for the config variants, create
mkconfig.h.in containg PACKAGE_* variables to be replaced, and have
config variant header files include it. Note on POSIX we don't use
this, and continue to generate a single config.h.in file.
Use config.status to convert the README.in and mkconfig.h.in files
during distribution creation.
Modify all users of VERSION to use PACKAGE_VERSION instead.
* configure.ac: Use GNU Make not GNU make as the package name.
* README.in: Use GNU Make not GNU make.
* README.git: Remove references to README.W32.template.
* .gitignore: Update for new behavior.
* Basic.mk.template: Remove unused posix_SOURCES and VERSION, and
references to unshipped mk/Posix.mk
* Makefile.am: Add src/mkconfig.h as an extra dist file.
* bootstrap.bat: Rewrite mkconfig.h.in to mkconfig.h
* maintMakefile: Remove obsolete template files; add mkconfig.h.in.
* prepare_vms.com: Rewrite mkconfig.h.in to mkconfig.h
* mk/VMS.mk: Fix incorrect header file prerequisite.
* src/mkconfig.h.in: New file containing PACKAGE variables.
* src/config.ami: Include mkconfig.h.
* src/config.h.W32: Ditto.
* src/configh.dos: Ditto.
* src/config.h-vms: Ditto.
* src/version.c: Use PACKAGE_VERSION not VERSION.
Diffstat (limited to 'bootstrap.bat')
-rw-r--r-- | bootstrap.bat | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/bootstrap.bat b/bootstrap.bat index cfba11ec..e068f162 100644 --- a/bootstrap.bat +++ b/bootstrap.bat @@ -47,23 +47,30 @@ copy /Y gl\lib\*.* lib > nul :: Create a sed script to convert templates if exist convert.sed del /Q convert.sed -echo s,%%PACKAGE%%,make,g > convert.sed +echo s,@PACKAGE@,make,g > convert.sed if ERRORLEVEL 1 goto Failed -sed -n "s/^AC_INIT(\[GNU.make\],\[\([0-9.]*\)\].*/s,%%VERSION%%,\1,g/p" configure.ac >> convert.sed +echo s,@PACKAGE_BUGREPORT@,bug-make@gnu.org,g >> convert.sed +if ERRORLEVEL 1 goto Failed +echo s,@PACKAGE_NAME@,GNU Make,g >> convert.sed +if ERRORLEVEL 1 goto Failed +echo s,@PACKAGE_TARNAME@,make,g >> convert.sed +if ERRORLEVEL 1 goto Failed +echo s,@PACKAGE_URL@,https://www.gnu.org/software/make/,g >> convert.sed +sed -n "s/^AC_INIT(\[GNU.Make\],\[\([0-9.]*\)\].*/s,@PACKAGE_VERSION@,\1,g/p" configure.ac >> convert.sed if ERRORLEVEL 1 goto Failed sed -z -e s/\\\n//g -e "s/[ \t][ \t]*/ /g" -e "s, [^ ]*\.h,,g" -e "s,src/,$(src),g" -e "s,lib/,$(lib),g" Makefile.am | sed -n "s/^\([A-Za-z0-9]*\)_SRCS *= *\(.*\)/s,%%\1_SOURCES%%,\2,/p" >> convert.sed if ERRORLEVEL 1 goto Failed echo - Creating Basic.mk -call sed -f convert.sed Basic.mk.template > Basic.mk +sed -f convert.sed Basic.mk.template > Basic.mk if ERRORLEVEL 1 goto Failed -echo - Creating src\config.h.W32 -call sed -f convert.sed src\config.h.W32.template > src\config.h.W32 +echo - Creating src\mkconfig.h +sed -f convert.sed src\mkconfig.h.in > src\mkconfig.h if ERRORLEVEL 1 goto Failed echo - Creating src\gmk-default.h echo static const char *const GUILE_module_defn = ^" \ > src\gmk-default.h -call sed -e "s/;.*//" -e "/^[ \t]*$/d" -e "s/\"/\\\\\"/g" -e "s/$/ \\\/" src\gmk-default.scm >> src\gmk-default.h +sed -e "s/;.*//" -e "/^[ \t]*$/d" -e "s/\"/\\\\\"/g" -e "s/$/ \\\/" src\gmk-default.scm >> src\gmk-default.h if ERRORLEVEL 1 goto Failed echo ^";>> src\gmk-default.h |