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.
This commit is contained in:
Paul Smith 2022-10-16 15:13:41 -04:00
parent b16913a67e
commit 2d943d3d2e
20 changed files with 146 additions and 170 deletions

10
.gitignore vendored
View File

@ -34,7 +34,7 @@ config.log
config.status
configure
/mk/Posix.mk
stamp-h1
stamp-*
.dirstamp
gnulib
convert.sed
@ -65,14 +65,8 @@ GccRel/
.check-git-HEAD
ChangeLog
README
README.DOS
README.OS2
README.W32
build.cfg
config.ami
config.h-vms
config.h.W32
configh.dos
mkconfig.h
make-[0-9]*/
make-[0-9]*.tar.*
checkcfg.*.log

View File

@ -39,7 +39,6 @@ w32_SOURCES = %w32_SOURCES%
vms_SOURCES = %vms_SOURCES%
amiga_SOURCES = %amiga_SOURCES%
posix_SOURCES = $(src)posixos.c
remote_SOURCES = $(src)remote-stub.c
OUTDIR =
@ -104,9 +103,7 @@ CP.cmd = cp $1 $2
CLEANSPACE = $(call RM.cmd,$(OBJECTS) $(PROG) $(BUILT_SOURCES))
# Load overrides for the above variables.
include $(firstword $(wildcard $(SRCDIR)/mk/$(lastword $(subst -, ,$(MAKE_HOST)).mk) $(OUTDIR)mk/Posix.mk $(SRCDIR)/mk/Posix.mk))
VERSION = %VERSION%
include $(firstword $(wildcard $(SRCDIR)/mk/$(lastword $(subst -, ,$(MAKE_HOST)).mk)))
VPATH = $(SRCDIR)

View File

@ -112,7 +112,7 @@ test_FILES = tests/run_make_tests tests/run_make_tests.bat \
# test/scripts are added via dist-hook below.
EXTRA_DIST = ChangeLog INSTALL README build.sh build.cfg.in $(man_MANS) \
README.customs README.OS2 \
src/mkconfig.h README.customs README.OS2 \
README.Amiga SCOPTIONS src/config.ami \
README.DOS builddos.bat src/configh.dos \
README.W32 build_w32.bat src/config.h.W32 \
@ -144,7 +144,7 @@ dist-hook:
# --------------- Local CHECK Section
check-local: check-regression
@banner=" Regression PASSED: GNU Make $(VERSION) ($(MAKE_HOST)) built with $(CC) "; \
@banner=" Regression PASSED: $(PACKAGE_STRING) ($(MAKE_HOST)) built with $(CC) "; \
dashes=`echo "$$banner" | sed s/./=/g`; \
echo; \
echo "$$dashes"; \
@ -182,7 +182,7 @@ check-regression: tests/config-flags.pm
echo "Can't find a working Perl ($(PERL)); the test suite requires Perl."; \
fi; \
else \
echo "Can't find the GNU Make test suite ($(top_srcdir)/tests)."; \
echo "Can't find the $(PACKAGE_NAME) test suite ($(top_srcdir)/tests)."; \
fi

View File

@ -163,17 +163,16 @@ NOTE! This method builds GNU make in "maintainer mode". Make programs built
Building From Git for Windows
-----------------------------
If you have a UNIX emulation like CYGWIN you can opt to run the general
build procedure above; it will work. Consult README.W32.template for
information on options you might want to use when running ./configure.
If you have a UNIX emulation like CYGWIN you can opt to run the general build
procedure above; it will work. Consult README.W32 for information on options
you might want to use when running ./configure.
If you can't or don't want to do that, then first run the .\bootstrap.bat
script to prime your Git workspace:
script to "prime" your Git workspace:
> .\bootstrap.bat
Next, rename the file README.W32.template to README.W32 and follow those
instructions.
Next, follow the instructions in the README.W32 file.
Note, neither of these methods are tested regularly by the GNU make
maintainers. Building for Windows from a distribution tarball IS tested

View File

@ -1,4 +1,4 @@
This directory contains the %VERSION% release of GNU Make.
This directory contains the @PACKAGE_VERSION@ release of @PACKAGE_NAME@.
See the file NEWS for the user-visible changes from previous releases.
In addition, there have been bugs fixed.
@ -6,7 +6,7 @@ In addition, there have been bugs fixed.
Please check the system-specific notes below for any caveats related to your
operating system.
If you are trying to build GNU make from a Git clone rather than a downloaded
If you are trying to build GNU Make from a Git clone rather than a downloaded
source distribution, see the README.git file for instructions.
For source distribution building and installation instructions, see the file
@ -15,12 +15,12 @@ INSTALL.
If you need to build GNU Make and have no other 'make' program to use, you can
use the shell script 'build.sh' instead. To do this, first run 'configure' as
described in INSTALL. Then, instead of typing 'make' to build the program,
type 'sh build.sh'. This should compile the program in the current directory.
Then you will have a Make program that you can use for './make install', or
type 'sh build.sh'. This will compile the program in the current directory.
Then you will have a 'make' program that you can use for './make install', or
whatever else.
Some systems' Make programs cannot process the Makefile for GNU Make. If you
get errors from your system's Make when building GNU Make, try using
Some systems' 'make' programs cannot process the Makefile for GNU Make.
If you get errors from your system's 'make' when building GNU Make, try using
'build.sh' instead.
@ -40,10 +40,10 @@ GNU Make can be obtained in many different ways. See a description here:
Documentation
-------------
GNU make is fully documented in the GNU Make manual, which is contained
in this distribution as the file make.texinfo. You can also find
on-line and preformatted (PostScript and DVI) versions at the FSF's web
site. There is information there about ordering hardcopy documentation.
GNU Make is fully documented in the GNU Make manual, which is contained in
this distribution as the file make.texi. You can also find on-line and
preformatted (PostScript and DVI) versions at the FSF's web site. There is
information there about ordering hardcopy documentation.
https://www.gnu.org/
https://www.gnu.org/doc/doc.html
@ -69,27 +69,27 @@ this site.
Bug Reporting
-------------
You can send GNU make bug reports to <bug-make@gnu.org>. Please see the
section of the GNU make manual entitled 'Problems and Bugs' for
information on submitting useful and complete bug reports.
If you need help using GNU Make, try asking on <help-make@gnu.org>.
If you found a bug, you can send a bug reports to <bug-make@gnu.org>.
Please see the section of the GNU Make manual entitled 'Problems and Bugs'
for information on submitting useful and complete bug reports.
You do not need to subscribe to these lists first.
You can also use the online bug tracking system in the Savannah GNU Make
project to submit new problem reports or search for existing ones:
https://savannah.gnu.org/bugs/?group=make
If you need help using GNU make, try these forums:
help-make@gnu.org
help-utils@gnu.org
news:gnu.utils.help
news:gnu.utils.bug
We prefer to use the bug tracking system ONLY for bugs or enhancements,
not for help requests: please use the mailing lists to get help.
Submitting Patches
------------------
If you'd like to propose a change to GNU make, you can provide a patch with
If you'd like to propose a change to GNU Make, you can provide a patch with
your changes. If you are making your changes in a Git workspace you can run
"git format-patch" to create a patch file. If not, you can use the diff(1)
utility to create a patch file; please use "diff -u".
@ -102,24 +102,23 @@ Once you have a patch you can submit it in any of these ways:
* Send the patch via email to <bug-make@gnu.org>: be sure to add it as an
attachment to avoid interference by email processors.
Be aware that all non-trivial changes proposed for GNU make require FSF
copyright paperwork to be completed before they can be accepted. Contact
<bug-make@gnu.org> for help.
All non-trivial changes require FSF copyright paperwork to be completed
before they can be accepted. Contact <bug-make@gnu.org> for help.
Git Access
----------
The GNU make source repository is available via Git from the GNU Savannah Git
The GNU Make source repository is available via Git from the GNU Savannah Git
server; look here for details:
https://savannah.gnu.org/git/?group=make
Please note: you won't be able to build GNU make from Git without installing
Please note: you won't be able to build GNU Make from Git without installing
appropriate maintainer's tools, such as GNU m4, automake, autoconf, Perl, GNU
make, and GCC.
See the README.git file for instructions on how to build GNU make once these
See the README.git file for instructions on how to build GNU Make once these
tools are available. We make no guarantees about the contents or quality of
the latest code in the Git repository: it is not unheard of for code that is
known to be broken to be checked in. Use at your own risk.
@ -133,7 +132,7 @@ that if you compile make with 'cc -O' on AIX 3.2, it will not work
correctly. It is said that using 'cc' without '-O' does work.
The standard /bin/sh on SunOS 4.1.3_U1 and 4.1.4 is broken and cannot be
used to configure GNU make. Please install a different shell such as
used to configure GNU Make. Please install a different shell such as
bash or pdksh in order to run "configure". See this message for more
information:
https://mail.gnu.org/archive/html/bug-autoconf/2003-10/msg00190.html
@ -142,7 +141,7 @@ One area that is often a problem in configuration and porting is the code
to check the system's current load average. To make it easier to test and
debug this code, you can do 'make check-loadavg' to see if it works
properly on your system. (You must run 'configure' beforehand, but you
need not build Make itself to run this test.)
need not build 'make' itself to run this test.)
Another potential source of porting problems is the support for large
files (LFS) in configure for those operating systems that provide it.
@ -151,7 +150,7 @@ difficulties, then as a workaround you should be able to disable LFS by
adding the '--disable-largefile' option to the 'configure' script.
On systems that support micro- and nano-second timestamp values and
where stat(2) provides this information, GNU make will use it when
where stat(2) provides this information, GNU Make will use it when
comparing timestamps to get the most accurate possible result. However,
note that many current implementations of tools that *set* timestamps do
not preserve micro- or nano-second granularity. This means that "cp -p"
@ -165,7 +164,7 @@ force make to treat them properly. See the manual for details.
Ports
-----
- See README.customs for details on integrating GNU make with the
- See README.customs for details on integrating GNU Make with the
Customs distributed build environment from the Pmake distribution.
- See README.VMS for details about GNU Make on OpenVMS.
@ -181,12 +180,12 @@ Ports
of DJGPP; see the WWW page https://www.delorie.com/djgpp/ for more
information.
The Cygwin project maintains its own port of GNU make. That port may have
The Cygwin project maintains its own port of GNU Make. That port may have
patches which are not present in this version. If you are using Cygwin
you should use their version of GNU make, and if you have questions about
you should use their version of GNU Make, and if you have questions about
it you should start by asking on those mailing lists and forums.
Please note there are two _separate_ ports of GNU make for Microsoft
Please note there are two _separate_ ports of GNU Make for Microsoft
systems: a native Windows tool built with (for example) MSVC or Cygwin,
and a DOS-based tool built with DJGPP. Please be sure you are looking
at the right README!

View File

@ -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

View File

@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License along with
# this program. If not, see <http://www.gnu.org/licenses/>.
AC_INIT([GNU make],[4.3.91],[bug-make@gnu.org])
AC_INIT([GNU Make],[4.3.91],[bug-make@gnu.org])
AC_PREREQ([2.69])
@ -509,8 +509,8 @@ AM_CONDITIONAL([KNOWN_PREFIX],
-o "x$prefix" = x/usr/gnu -o "x$prefix" = x/usr])
# Specify what files are to be created.
AC_CONFIG_FILES([Makefile build.cfg lib/Makefile po/Makefile.in doc/Makefile \
tests/config-flags.pm])
AC_CONFIG_FILES([build.cfg tests/config-flags.pm \
Makefile lib/Makefile doc/Makefile po/Makefile.in])
# We don't need this: the standard automake output suffices for POSIX systems.
#mk/Posix.mk

View File

@ -43,31 +43,28 @@ GUILE_CFLAGS := $(patsubst -I%,-isystem %,$(GUILE_CFLAGS))
MAKE_MAINTAINER_MODE := -DMAKE_MAINTAINER_MODE
AM_CPPFLAGS += $(MAKE_MAINTAINER_MODE)
TEMPLATES = README README.DOS README.W32 README.OS2 \
src/config.ami src/configh.dos src/config.h.W32 src/config.h-vms
all: $(TEMPLATES)
# Create preprocessor output files--GCC specific!
%.i : %.c
$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) -E -dD -o $@ $<
# General rule for turning a .template into a regular file.
#
$(TEMPLATES) : % : %.template Makefile
rm -f $@
sed -e 's@%VERSION%@$(VERSION)@g' \
-e 's@%PACKAGE%@$(PACKAGE)@g' \
$< > $@
chmod a-w $@
# Create the mkconfig.h file for non-POSIX config headers
all: src/mkconfig.h
src/mkconfig.h: src/mkconfig.h.in config.status
./config.status --header=$@
# Build the README
all: README
README : README.in config.status
./config.status --file=$@
# Construct Makefiles by adding on dependencies, etc.
#
cvt = $(patsubst $1/%,$$($1)%,$(filter %.c,$2))
Basic.mk: Basic.mk.template .dep_segment Makefile
rm -f $@
sed -e 's@%VERSION%@$(VERSION)@g' \
-e 's@%make_SOURCES%@$(call cvt,src,$(make_SRCS))@g' \
sed -e 's@%make_SOURCES%@$(call cvt,src,$(make_SRCS))@g' \
-e 's@%w32_SOURCES%@$(call cvt,src,$(w32_SRCS))@g' \
-e 's@%vms_SOURCES%@$(call cvt,src,$(vms_SRCS))@g' \
-e 's@%amiga_SOURCES%@$(call cvt,src,$(amiga_SRCS))@g' \
@ -76,6 +73,7 @@ Basic.mk: Basic.mk.template .dep_segment Makefile
-e 's@%glob_SOURCES%@$(call cvt,lib,$(glob_SRCS))@g' \
$< > $@
echo >>$@; echo '# --------------- DEPENDENCIES' >>$@; echo '#' >>$@; \
echo >>$@; echo '$$(OBJECTS): $$(SRCDIR)/src/mkconfig.h' >>$@; \
sed -e 's@^\([^ ]*\)\.o:@$$(OUTDIR)\1.$$(OBJEXT):@' \
-e 's@\([^ ]*\.[ch]\)@$$(SRCDIR)/\1@g' \
-e 's@$$(SRCDIR)/src/config.h@$$(OUTDIR)src/config.h@g' \
@ -176,7 +174,7 @@ po_sync = translationproject.org::tp/latest/$(PACKAGE)/
.PHONY: do-po-update po-update
do-po-update:
tmppo="/tmp/po-$(PACKAGE)-$(VERSION).$$$$" \
tmppo="/tmp/po-$(PACKAGE)-$(PACKAGE_VERSION).$$$$" \
&& rm -rf "$$tmppo" \
&& mkdir "$$tmppo" \
&& $(RSYNC) $(po_sync) "$$tmppo" \
@ -238,7 +236,7 @@ export TAR_OPTIONS := --mode=u+w,go-w --owner=0 --group=0 --numeric-owner --sort
# When I released 4.3 somehow the INSTALL file was missing.
# When I tried to build it again, it was there. I have no idea what happened
# but add a new check to be sure it doesn't happen again.
mk_dist_files = AUTHORS ChangeLog COPYING INSTALL README
mk_dist_files = AUTHORS ChangeLog COPYING INSTALL README src/mkconfig.h
dist: mk-distcheck
@ -363,10 +361,10 @@ local-check: po-check changelog-check
# copyright-check writable-files
changelog-check:
if head $(top_srcdir)/ChangeLog | grep 'Version $(VERSION)' >/dev/null; then \
if head $(top_srcdir)/ChangeLog | grep 'Version $(PACKAGE_VERSION)' >/dev/null; then \
:; \
else \
echo "$(VERSION) not in ChangeLog" 1>&2; \
echo "$(PACKAGE_VERSION) not in ChangeLog" 1>&2; \
exit 1; \
fi
@ -413,7 +411,7 @@ gendocs: update-gnuweb update-makeweb
cd doc \
&& rm -rf doc/manual \
&& $(GNULIBDIR)/build-aux/gendocs.sh --email '$(BUGLIST)' \
make 'GNU Make Manual'
make '$(PACKAGE_NAME) Manual'
find '$(MAKEWEBDIR)'/manual \( -name CVS -prune \) -o \( -name '[!.]*' -type f -exec rm -f '{}' \; \)
cp -r doc/manual '$(MAKEWEBDIR)'
@echo 'Status of $(MAKEWEBDIR) repo:' && cd '$(MAKEWEBDIR)' \
@ -421,7 +419,7 @@ gendocs: update-gnuweb update-makeweb
@echo '- cvs add <new files>' \
&& echo '- cvs remove <deleted files>' \
&& echo '- cvs commit' \
&& echo '- cvs tag make-$(subst .,-,$(VERSION))'
&& echo '- cvs tag make-$(subst .,-,$(PACKAGE_VERSION))'
## --------------------------------------------- ##
@ -459,15 +457,15 @@ $(COV_BUILD_FILE)-submitted: $(COV_BUILD_FILE)
@test -n "$(COVERITY_TOKEN)" || { echo 'COVERITY_TOKEN not set'; exit 1; }
@test -n "$(COVERITY_EMAIL)" || { echo 'COVERITY_EMAIL not set'; exit 1; }
rm -f '$@'
case '$(VERSION)' in \
case '$(PACKAGE_VERSION)' in \
(*.*.9*) type="daily build"; ext=".$$(date +%Y%m%d)" ;; \
(*) type="release"; ext= ;; \
esac; \
curl --form token='$(COVERITY_TOKEN)' \
--form email='$(COVERITY_EMAIL)' \
--form file='@$<' \
--form version="$(VERSION)$$ext" \
--form description="GNU make $$type" \
--form version="$(PACKAGE_VERSION)$$ext" \
--form description="$(PACKAGE_NAME) $$type" \
'https://scan.coverity.com/builds?project=gmake'
cp '$<' '$@'
@ -478,11 +476,11 @@ $(COV_BUILD_FILE)-submitted: $(COV_BUILD_FILE)
.PHONY: tag-release
tag-release:
case '$(VERSION)' in \
case '$(PACKAGE_VERSION)' in \
(*.*.9*) message=" candidate" ;; \
(*) message= ;; \
esac; \
$(GIT) tag -m "GNU Make release$$message $(VERSION)" -u '$(GPG_KEYID)' '$(VERSION)'
$(GIT) tag -m "$(PACKAGE_NAME) release$$message $(PACKAGE_VERSION)" -u '$(GPG_KEYID)' '$(PACKAGE_VERSION)'
## ------------------------- ##
@ -513,7 +511,7 @@ distsign: $(DIST_ARCHIVES_SIG) $(DIST_ARCHIVES_DIRECTIVE)
echo 'version: 1.2'; \
echo 'directory: make'; \
echo 'filename: $*'; \
echo 'comment: Official upload of GNU make version $(VERSION)'; \
echo 'comment: Official upload of $(PACKAGE_NAME) version $(PACKAGE_VERSION)'; \
) > "$*.directive"
$(GPG) $(GPGFLAGS) -o "$@" --clearsign "$*.directive"
@rm -f "$*.directive"

View File

@ -20,7 +20,7 @@
# Very little is needed here since the default Basic.mk assumes POSIX
prog_SOURCES += $(posix_SOURCES)
prog_SOURCES += $(src)/posixos.c
extra_CPPFLAGS += @GUILE_CFLAGS@
extra_LDFLAGS += @AM_LDFLAGS@

View File

@ -93,5 +93,5 @@ define CLEANSPACE
endef
$(OUTDIR)$(src)config.h: $(SRCDIR)$(src)config.h.W32
$(OUTDIR)$(src)config.h: $(SRCDIR)$(src)config.h-vms
$(call CP.cmd,$<,$@)

View File

@ -4,28 +4,27 @@ $!
$! This is used for building off the master instead of a release tarball.
$!
$!
$!
$! First try ODS-5, Pathworks V6 or UNZIP name.
$!
$ config_template = f$search("sys$disk:[]config*h-vms.template")
$ config_template = f$search("sys$disk:[.src]mkconfig*h.in")
$ if config_template .eqs. ""
$ then
$!
$! Try NFS, VMStar, or Pathworks V5 ODS-2 encoded name.
$!
$ config_template = f$search("sys$disk:[]config.h-vms*template")
$ config_template = f$search("sys$disk:[.src]mkconfig.h*in")
$ if config_template .eqs. ""
$ then
$ write sys$output "Could not find config.h-vms*template!"
$ write sys$output "Could not find mkconfig.h.in!"
$ exit 44
$ endif
$ endif
$ config_template_file = f$parse(config_template,,,"name")
$ config_template_type = f$parse(config_template,,,"type")
$ config_template = "sys$disk:[]" + config_template_file + config_template_type
$ config_template = "sys$disk:[.src]" + config_template_file + config_template_type
$!
$!
$! Pull the package and version from configure.ac
$! Pull the version from configure.ac
$!
$ open/read ac_file sys$disk:[]configure.ac
$ac_read_loop:
@ -39,21 +38,26 @@ $ version = f$element (0,"]",version)
$ac_read_loop_end:
$ close ac_file
$!
$ if (package .eqs. "") .or. (version .eqs. "")
$ if (version .eqs. "")
$ then
$ write sys$output "Unable to determine package and/or version!"
$ write sys$output "Unable to determine version!"
$ exit 44
$ endif
$!
$!
$ outfile = "sys$disk:[]config.h-vms"
$ outfile = "sys$disk:[.src]mkconfig.h"
$!
$! Note the pipe command is close to the length of 255, which is the
$! maximum token length prior to VMS V8.2:
$! %DCL-W-TKNOVF, command element is too long - shorten
$ pipe (write sys$output "sub/%PACKAGE%/''package'/WHOLE/NOTYPE" ;-
write sys$output "sub/%VERSION%/''version'/WHOLE/NOTYPE" ;-
$! PDS: Blown out; someone else will have to figure this out
$ pipe (write sys$output "sub,@PACKAGE@,make,WHOLE/NOTYPE" ;-
write sys$output "sub,@PACKAGE_BUGREPORT@,bug-make@gnu.org,WHOLE/NOTYPE" ;-
write sys$output "sub,@PACKAGE_NAME@,GNU Make,WHOLE/NOTYPE" ;-
write sys$output "sub,@PACKAGE_TARNAME@,make,WHOLE/NOTYPE" ;-
write sys$output "sub,@PACKAGE_URL@,https://www.gnu.org/software/make/,WHOLE/NOTYPE" ;-
write sys$output "sub,@PACKAGE_VERSION@,''version',WHOLE/NOTYPE" ;-
write sys$output "exit") |-
edit/edt 'config_template'/out='outfile'/command=sys$pipe >nla0:
$!
$ write sys$output package, ", version: ", version, " prepared for VMS"
$ write sys$output "GNU Make version: ", version, " prepared for VMS"

View File

@ -14,6 +14,8 @@ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <http://www.gnu.org/licenses/>. */
#include "mkconfig.h"
/* Define if on AIX 3.
System headers sometimes define this.
We just want to avoid a redefinition error message. */
@ -166,12 +168,6 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
instead of <sys/cpustats.h>. */
/* #undef UMAX4_3 */
/* Name of this package (needed by automake) */
#define PACKAGE "%PACKAGE%"
/* Version of this package (needed by automake) */
#define VERSION "%VERSION%"
/* Define to the name of the SCCS 'get' command. */
#define SCCS_GET "get"

View File

@ -15,8 +15,7 @@ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <http://www.gnu.org/licenses/>. */
/* config.h. Generated automatically by configure. */
/* config.h.in. Generated automatically from configure.ac by autoheader. */
#include "mkconfig.h"
/* Pull in types.h here to get __CRTL_VER defined for old versions of the
compiler which don't define it. */
@ -206,24 +205,6 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
instead of <sys/cpustats.h>. */
/* #undef UMAX4_3 */
/* Name of this package (needed by automake) */
#define PACKAGE "%PACKAGE%"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "bug-make@gnu.org"
/* Define to the full name of this package. */
#define PACKAGE_NAME "GNU make"
/* Define to the home page for this package. */
#define PACKAGE_URL "https://www.gnu.org/software/make/"
/* Define to the version of this package. */
#define PACKAGE_VERSION "%VERSION%"
/* Version of this package (needed by automake) */
#define VERSION "%VERSION%"
/* Define to the name of the SCCS 'get' command. */
/* #undef SCCS_GET */

View File

@ -15,6 +15,8 @@ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <http://www.gnu.org/licenses/>. */
#include "mkconfig.h"
/* Suppress some Visual C++ warnings.
Maybe after the code cleanup for ISO C we can remove some/all of these. */
#if _MSC_VER > 1000
@ -461,21 +463,6 @@ char *ttyname (int);
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
/* #undef NO_MINUS_C_MINUS_O */
/* Name of this package (needed by automake) */
#define PACKAGE "%PACKAGE%"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "bug-make@gnu.org"
/* Define to the full name of this package. */
#define PACKAGE_NAME "GNU make"
/* Define to the home page for this package. */
#define PACKAGE_URL "https://www.gnu.org/software/make/"
/* Define to the version of this package. */
#define PACKAGE_VERSION "%VERSION%"
/* Define to the character that separates directories in PATH. */
#define PATH_SEPARATOR_CHAR ';'
@ -512,9 +499,6 @@ char *ttyname (int);
<sys/cpustats.h>. */
/* #undef UMAX4_3 */
/* Version number of package */
#define VERSION "%VERSION%"
/* Define if using the dmalloc debugging malloc package */
/* #undef WITH_DMALLOC */

View File

@ -15,6 +15,8 @@ A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <http://www.gnu.org/licenses/>. */
#include "mkconfig.h"
/* Include this header to make __DJGPP_MINOR__ available because DJGPP ports
of GCC 4.3.0 and later no longer do it automatically. */
#include <sys/version.h>
@ -81,30 +83,9 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
/* Define to 1 if you have the `strtoll' function. */
#define HAVE_STRTOLL 1
/* Name of the package */
#define PACKAGE "%PACKAGE%"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "bug-%PACKAGE%@gnu.org"
/* Define to the full name of this package. */
#define PACKAGE_NAME "GNU %PACKAGE%"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "GNU %PACKAGE% %VERSION%"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "%PACKAGE%"
/* Define to the version of this package. */
#define PACKAGE_VERSION "%VERSION%"
/* Output sync support */
#define NO_OUTPUT_SYNC 1
/* Version number of package */
#define VERSION "%VERSION%"
/* Build host information. */
#define MAKE_HOST "i386-pc-msdosdjgpp"

36
src/mkconfig.h.in Normal file
View File

@ -0,0 +1,36 @@
/* Autoconf values for use on non-POSIX systems.
Copyright (C) 2022 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 3 of the License, or (at your option) any later
version.
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program. If not, see <http://www.gnu.org/licenses/>. */
/* Name of package */
#define PACKAGE "@PACKAGE@"
/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT "@PACKAGE_BUGREPORT@"
/* Define to the full name of this package. */
#define PACKAGE_NAME "@PACKAGE_NAME@"
/* Define to the full name and version of this package. */
#define PACKAGE_STRING "@PACKAGE_NAME@ @PACKAGE_VERSION@"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "@PACKAGE_TARNAME@"
/* Define to the home page for this package. */
#define PACKAGE_URL "@PACKAGE_URL@"
/* Define to the version of this package. */
#define PACKAGE_VERSION "@PACKAGE_VERSION@"

View File

@ -23,7 +23,7 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
# define MAKE_HOST "unknown"
#endif
const char *version_string = VERSION;
const char *version_string = PACKAGE_VERSION;
const char *make_host = MAKE_HOST;
/*