Commit Graph

117 Commits

Author SHA1 Message Date
Paul Smith
949952258e [SV 65537] Update to newer gnulib
* bootstrap.conf: Switch to gnulib stable-202401 branch.
* maintMakefile: Support an EXTRA_CFLAGS variable in maintainer mode.
* README.git: Describe how to use it.
2024-04-14 15:27:37 -04:00
Paul Smith
a80670ad41 * (all): Update Copyright year to 2024 2024-01-06 18:06:09 -05:00
Paul Smith
d4692df20d Remove support for AmigaOS
There is a lot of specialized code for supporting AmigaOS and it has
not been maintained for a number of years.  It's highly unlikely that
the latest versions even compile properly on AmigaOS anymore.  After
requesting that someone step forward to own the maintenance of the
port in the GNU Make 4.4 release and getting no takers, I removed it.

* NEWS: Announce the removal.
* README.in: Remove README.Amiga reference.
* README.Amiga: Remove unused file.
* SCOPTIONS: Ditto.
* src/amiga.c: Ditto.
* src/amiga.h: Ditto.
* src/config.ami: Ditto.
* mk/Amiga.mk: Ditto.
* Makefile.am: Remove references to deleted files.
* Basic.mk.template: Ditto.
* maintMakefile: Ditto.
* src/commands.c: Remove ifdef'd Amiga code.
* src/default.c: Ditto.
* src/dir.c: Ditto.
* src/file.c: Ditto.
* src/function.c: Ditto.
* src/job.c: Ditto.
* src/job.h: Ditto.
* src/main.c: Ditto.
* src/os.h: Ditto.
* src/read.c: Ditto.
* src/remake.c: Ditto.
2023-01-15 17:32:15 -05:00
Paul Smith
c85f68c4e9 Allow jobserver style to be forced to "pipe"
Some systems that support mkfifo() don't support the usage that GNU
make wants.  Provide a way to force using "pipe" jobserver mode even
when mkfifo() is available.

* src/makeint.h (MK_OS_HURD): Define if we're on Hurd.
(JOBSERVER_USE_FIFO): Define if we have mkfifo() and we're NOT on
Hurd.
* src/main.c (main): Test JOBSERVER_USE_FIFO not HAVE_MKFIFO.
* src/posixos.c (jobserver_setup): Ditto.
* maintMakefile: Create a config check test for forcing "pipe" mode.
* tests/run_make_tests.pl: Show discovered FEATURES in verbose mode.
2023-02-19 01:02:16 -05:00
Paul Smith
db351fe85b Prerelease GNU Make 4.4.0.90
* NEWS: Update the date.
* README.git: Fix a typo.
* maintMakefile (check-alt-config): Report success.
(upload-*): Use the gnulib gnupload script for uploads.
2023-01-14 17:07:04 -05:00
Paul Smith
f91b8bbb34 Update ancient glob/fnmatch implementations
I looked again at trying to use the latest gnulib implemenentations
of GNU glob and fnmatch, and the effort required to extract them
from gnulib and make them portable to systems which don't support
configure is simply far too daunting for me.  However it's clear
that the previous implementations are growing too long on the tooth
to continue to be used without some maintenance, so perform some
upkeep on them.

- Remove support for pre-ANSI function definitions.
- Remove the obsolete "register" keyword.
- Assume standard ISO C90/C99 header file support.
- Assume standard ISO C "void" and "const" support.
- Avoid symbols prefixed with "__" as they're reserved.

* maintMakefile: Add a rule to verify lib has the latest content.
* src/dir.c: Use void* not __ptr_t which was removed.
* gl/lib/glob.c: See above.
* gl/lib/fnmatch.in.h: See above.
* gl/lib/glob.in.h: See above.
* gl/lib/fnmatch.c: See above.  Remove __strchrnul(): it is not
checked anywhere and is only used in one place anyway.
2023-01-02 22:53:05 -05:00
Paul Smith
c4fbfe8b5e * maintMakefile: Add missing quote 2023-01-01 17:05:12 -05:00
Paul Smith
e7ce3a655e Convert references from "GNU make" to "GNU Make" 2023-01-01 17:05:12 -05:00
Paul Smith
56d2978141 Update the copyright year on all files 2023-01-01 10:06:01 -05:00
Paul Smith
c91b269f66 Apply spelling fixes discovered by Codespell
* maintMakefile: Apply spelling fixes.
* src/file.c: Ditto.
* src/misc.c: Ditto.
* src/remake.c: Ditto.
* src/vmsjobs.c: Ditto.
* src/w32/pathstuff.c: Ditto.
* tests/test_driver.pl: Ditto.
* tests/run_make_tests.com: Ditto
* tests/scripts/features/implicit_search: Ditto
* tests/scripts/features/output-sync: Ditto
* tests/scripts/features/patternrules: Ditto
* tests/scripts/features/se_explicit: Ditto
* tests/scripts/features/statipattrules: Ditto
* tests/scripts/functions/foreach: Ditto
* tests/scripts/variables/MAKEFLAGS: Ditto
2022-12-31 13:21:09 -05:00
Paul Smith
1dd52ab472 Avoid C99 constructs
Although gnulib requires C99, most of the code does compile with a
C90 compiler (perhaps with a lot of warnings).  Reinstate our C90
configuration test, and clean up a few C99 things that crept in.

* src/job.c (construct_command_argv_internal): Don't use loop-local
variables or C++ comments.
* src/read.c (eval_makefile): Don't use loop-local variables.
2022-10-29 13:36:21 -04:00
Paul Smith
92789aa2e7 * build.sh: Allow a "keep-going" mode during builds 2022-10-29 13:36:21 -04:00
Paul Smith
d9fc1ac5d2 Update URLs to use https rather than http
* (all): Change http:// to https://
* README.W32: Remove invalid link to mingw.org.
2022-10-18 14:37:47 -04:00
Paul Smith
2d943d3d2e 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.
2022-10-18 14:20:44 -04:00
Paul Smith
f7ed583675 * maintMakefile: Use gnulib ncftpput-ftp if ncftpput is missing. 2022-09-25 13:37:12 -04:00
Paul Smith
77706874a7 Clean up maintMakefile
Notes provided by Tzvetelin Katchov <katchov@gnu.org>

* maintMakefile (git-very-clean): Add -x to git clean.
(GNULIBDIR): Use GNULIB_SRCDIR, or the local module if not set.
2022-09-10 18:35:41 -04:00
Paul Smith
896908180e Sanitize tar file ownership, mode, and order
For reproducibility ensure all files in the dist tar file are owned by
root, and sorted by name.  Force the mode on all files to be writable
by the owner and not writable by group or user, by default.

Remove unnecessary execute permissions from build_w32.bat.

Recommended by Tzvetelin Katchov <katchov@gnu.org>.
2022-09-08 03:04:15 -04:00
Paul Smith
15a7e3830f Fix tests for MacOS and Windows
* maintMakefile: Remove the template headers as prerequisites.
* tests/scripts/features/jobserver: Only test fifo if enabled.
* tests/scripts/variables/INCLUDE_DIRS: On MacOS none of the default
directories exist so .INCLUDE_DIRS is empty by default.
* tests/scripts/features/se_explicit: Fail via exit.  cp will show
different error messages on different systems.
* tests/scripts/features/se_implicit: Ditto.
* tests/scripts/features/se_statpat: Ditto.
2022-08-30 21:05:34 -04:00
Paul Smith
3f3eecc115 * maintMakefile: Allow checkcfg rules to succeed.
We can no longer pass our mondo-warnings options to the builds,
as these will impact all the code including gnulib code, and this
won't work.  Also allow the caller to disable either the build.sh
or makefile invocation, for testing.
* Makefile.am: Allow the caller to reset the path to the make
binary to be tested.  Remove c90 test: gnulib doesn't support it.
2022-07-09 10:46:47 -04:00
Paul Smith
ec09ec775a * <all>: Update copyright notices. 2022-02-10 14:48:26 -05:00
Paul Smith
e7b2f6818c Change HTTP URLs to use HTTPS instead
Also remove unnecessary tests/COPYING file.

* README.template: Change http: to https:
* README.git: Ditto
* doc/make.texi: Ditto
* doc/make.1: Ditto
* src/main.c: Ditto
* maintMakefile: Remove invalid URL
2021-12-19 16:55:50 -05:00
Paul Smith
d9aff6b817 * maintMakefile: Don't make .check-git-HEAD .PHONY 2021-03-14 15:53:45 -04:00
Paul Smith
58a37927e6 * maintMakefile: [SV 58794] Check for file existence in the release 2020-11-29 17:59:40 -05:00
Paul Smith
c8a6263eb5 Convert [ ... ] to test ... in scripting.
The "[" link may be missing during OS boostrapping.

* build.sh: Convert "[ ... ]" to "test ..."
* maintMakefile: Ditto.
* scripts/copyright-update: Ditto
* tests/scripts/features/reinvoke: Ditto
* tests/scripts/features/targetvars: Ditto
2020-05-03 14:23:56 -04:00
Paul Smith
a015d1f822 * maintMakefile: Clean up output 2020-05-03 14:23:56 -04:00
Paul Smith
c604e53a45 * mainMakefile: Check that INSTALL exists in the dist file
For some reason the INSTALL file symlinked to gnulib was omitted from
the 4.3 release package: I can't reproduce this but check for it.
2020-05-03 14:23:40 -04:00
Paul Smith
b774aebffa Enable compilation with C90 compilers
* configure.ac: Try compiling Guile headers: they don't work with C90.
* maintMakefile: Simplify config checks via target-specific variables.
* src/makeint.h: Use ATTRIBUTE rather than defining __attribute__,
as that causes compile issues with system headers.
(ENUM_BITFIELD): Don't use enum bitfields in ANSI mode.
* src/main.c: Use ATTRIBUTE instead of __attribute__.
* src/job.h: Ditto.
* src/file.c: Don't define variables inside for loops.
* src/rule.c: Ditto.
* src/dep.h (SI): Only use static inline in non-ANSI mode.
2020-01-04 13:23:23 -05:00
Paul Smith
12b14f0484 Update copyright statements for 2020 2020-01-03 02:08:59 -05:00
Paul Smith
5920d6d2b3 * Makefile.am (check-regression): Use PERLFLAGS when running Perl
* maintMakefile: Set PERLFLAGS to enable warnings.
* tests/run_make_tests.pl: Clean up issues pointed out by perl -w.
2019-10-05 17:48:19 -04:00
Paul Smith
bde990bfea Rework the creation of build.sh so it's not a template.
* build.sh: Rename from build.template.  Get the list of objects
from the Makefile.  Move configure-replaced variables ...
* build.cfg.in: to this new .in file.
* configure.ac: Remove special handling of build.sh.in and add
build.cfg as a generated file.
* Makefile.am (EXTRA_DIST): Remove build.sh.in and add build.sh
and build.cfg.in for build.sh.in.
* maintMakefile: Remove handling for build.template.  Treat
build.sh as a source file, not a generated file.
* .gitignore: Ignore generated build.cfg file.
2019-09-09 18:38:31 -04:00
Paul Smith
76b6e668a6 * README.git: Describe GCC and GNU make requirements
* maintMakefile: Put custom C flags into a separate variable
so they can be overridden more easily on the command line.
2019-09-07 18:27:26 -04:00
Paul Smith
4b45e2828d * maintMakefile: Use check-local when testing build.sh.
Running 'make check' will rebuild 'make' so we're not testing the
build.sh-generated make binary.
2019-09-07 18:27:26 -04:00
Paul Smith
389dcb608f Update copyright statements for 2019 2019-05-19 15:27:26 -04:00
Paul Smith
4a31ca461f Add developer customizations
* .ccls: Configure the ccls LSP server
* .dir-locals.el: Reset some parameters for ccls and lsp-mode
* .gitignore: Update for GTAGS and ccls
* maintMakefile: Don't search hidden directories for sources
2019-05-12 16:28:26 -04:00
Paul Smith
a370268739 * configure.ac: Add --disable-posix-spawn option
* maintMakefile: Add a test for the option
* src/job.c: Change HAVE_* preprocessor checks to USE_POSIX_SPAWN
2018-08-04 12:37:19 -04:00
Paul Smith
23554ee658 Enhance the Basic.mk environment to work with Gnulib
* maintMakefile: Omit generated headers from Basic.mk prerequisites.
* Basic.mk.template: Rework commands to use with $(call ...) macros.
* mk/Amiga.mk: Ditto.
* mk/VMS.mk: Ditto.
* mk/Windows32.mk: Ditto, plus P2W to convert POSIX to Windows paths.
* mk/msdosdjgpp.mk: Ditto.
2018-08-02 20:55:34 -04:00
Paul Smith
1dfd55ca36 * maintMakefile: Preserve comments during compilation 2018-07-02 07:54:07 -04:00
Paul Smith
63b42fa235 Convert GNU make to use the gnulib portability library
Move content from glob/* and config/* into standard GNU directory
locations lib/* and m4/*.

Install the gnulib bootstrap script and its configuration file, and
create a bootstrap.bat file for Windows.  Update the README.git file
with new requirements and instructions for building from Git.

At this point we only install the alloca, getloadavg, and FDL modules
from gnulib.  We keep our old glob/fnmatch implementation since the
gnulib versions require significant amounts of infrastructure which
doesn't exist on Windows yet.  Further work is required here.

Due to a problem with gnulib's version of getloadavg, we need to bump
the minimum required version of automake to 1.16.1 unfortunately.

* README.git: Update instructions
* NEWS: Move developer news to a separate section
* configure.ac: Update for use with gnulib modules

* bootstrap: Bootstrap from Git workspace (import from gnulib)
* bootstrap.conf: Bootstrap configuration for GNU make
* bootstrap.bat: Bootstrap from Git workspace for Windows
* gl/modules/make-glob: Support our local fnmatch/glob implementation

* config/acinclude.m4: Move to m4/
* config/dospaths.m4: Move to m4/
* glob/fnmatch.c: Move to lib/
* glob/fnmatch.h.in: Move to lib/
* glob/glob.c: Move to lib/
* glob/glob.h.in: Move to lib/

* Makefile.am: Update for new directories
* build.template: Update for new directories
* build_w32.bat: Update for new directories
* builddos.bat: Update for new directories
* maintMakefile: Update for new directories
* makefile.com: Update for new directories
* mk/Amiga.mk: Update for new directories
* mk/Posix.mk.in: Update for new directories
* mk/VMS.mk: Update for new directories
* mk/Windows32.mk: Update for new directories
* mk/msdosdjgpp.mk: Update for new directories

* po/LINGUAS: One language per line (needed by gnulib)

* INSTALL: Remove (obtained from gnulib)
* src/alloca.c: Remove (obtained from gnulib)
* src/getloadavg.c: Remove (obtained from gnulib)
* po/Makevars: Remove (created by bootstrap)
* config/*: Remove leftover files
* glob/*: Remove leftover files
2018-07-02 07:54:07 -04:00
Paul Smith
afbecbd9dc * all: Update Copyright statements for 2018 2018-07-01 12:22:04 -04:00
Paul Smith
fb779d2f1e Rework directory structure to use GNU-recommended "src" directory.
Move the source code (other than glob) into the "src" subdirectory.
Update all scripting and recommendations to support this change.

* *.c, *.h, w32/*: Move to src/
* configure.ac, Makefile.am, maintMakefile: Locate new source files.
* Basic.mk.template, mk/*: Update for new source file locations.
* NEWS, README.DOS.template: Update for new locations.
* build.template, build_w32.bat, builddos.bat: Ditto.
* po/POTFILES.in: Ditto
* tests/run_make_tests.pl, tests/scripts/features/load*: Ditto.
* make.1: Move to doc.
* mk/VMS.mk: Add support for building on VMS (hopefully).
* makefile.vms, prepare_w32.bat: Remove.
* SCOPTIONS: Update to define HAVE_CONFIG_H
2017-11-19 14:07:22 -05:00
Paul Smith
aa44e66c8f Remove unsupported build facilities.
Over time the non-standard build and install systems (nmake files,
smake files, Visual Studio project files, etc.) have atrophied and
maintaining them is not worth the effort, for such a simple utility
as make.  Remove all the non-standard build tool support and unify
OS-specific build rules under a basic set of (GNU make) makefiles.

Preserve the existing bootstrapping scripts (for POSIX, Windows,
and MS-DOS).  Also the existing VMS build scripts are left unchanged:
I don't have enough experience with VMS to venture into this area.
Perhaps one of the VMS maintainers might like to determine whether
conversion would be appropriate.

Rather than create libraries for w32 and glob (non-POSIX), simply
link the object files directly to remove the complexity.

* NEWS: Update with user-facing notes.
* Makefile.am: Clean up to use the latest automake best practices.
Build Windows code directly from the root makefile to avoid recursion.
* README.Amiga, README.DOS.template, README.W32.template: Updated.
* INSTALL: Point readers at the README.git file.
* maintMakefile: Remove obsolete files.  Create Basic.mk file.
* Basic.mk.template, mk/*.mk: Create basic GNU make-based makefiles.
* build_w32.bat: Copy Basic.mk to Makefile
* configure.ac: We no longer need AM_PROG_AR.
* dosbuild.bat: Rename to builddos.bat.  Incorporate configure.bat.
* Makefile.DOS.template: Remove.
* NMakefile.template, w32/subproc/NMakefile: Remove.
* SMakefile.template, glob/SMakefile, glob/SCOPTIONS, make.lnk: Remove.
* configure.bat, glob/configure.bat: Remove.
* w32/Makefile.am: Remove.
* make_msvc_net2003.sln, make_msvc_net2003.vcproj: Remove.
2017-11-18 09:31:31 -05:00
Paul Smith
7ef56bc8dc Update copyright statements for 2017. 2017-07-09 21:52:28 -04:00
Paul Smith
b13dcfe501 Add more GCC warnings to the maintainer build.
* arscan.c: [SV 49112] Correct TEST printf() formatting.
Recommended by Jaak Ristioja <jaak@ristioja.ee>
* hash.c: Correct fprintf() formatting.
* maintMakefile: Add extra GCC warning flags.
2016-12-25 18:18:45 -05:00
Paul Smith
8d0aff7e81 * maintMakefile: Update default GPG ID for new key. 2016-12-25 18:18:03 -05:00
Paul Smith
bc9d72beb0 Resolve issues discovered by static code analysis.
* maintMakefile: Add a rule to submit code for analysis.
* configure.ac: Check for availability of the umask() function.
* output.c (output_tmpfd, output_tmpfile): Use umask on temp files.
* makeint.h (PATH_VAR): Reserve an extra character for nul bytes.
* function.c (func_error): Initialize buffer to empty string.
* job.c (child_execute_job): Verify validity of fdin.
* main.c (main): Simplify code for makefile updating algorithm.
* arscan.c (ar_scan): Verify member name length before reading.
* read.c (readline): Cast pointer arithmetic to avoid warnings.
* remake.c (update_file): Remove unreachable code.
(name_mtime): Verify symlink name length.
2016-12-14 17:56:24 -05:00
Paul Smith
f522852f07 * maintMakefile: TP recommends rsync for retrieving PO files. 2016-06-06 08:32:00 -04:00
Paul Smith
3fc99a48e1 * maintMakefile: Add a rule for storing preprocessor output. 2016-04-09 20:06:46 -04:00
Paul Smith
75dd0bd8bc * maintMakefile: Fix logging of check-alt-config target. 2016-04-04 01:38:37 -04:00
Paul Smith
fb7a7adc8a Extract jobserver implementation into OS-specific files.
* os.h, posixos.c, w32/w32os.c: New files implementing jobserver.
* job.c, job.h, main.c, makeint.h: Move content to new files.
* w32/include/sub_proc.h, w32/subproc/sub_proc.c: Ditto.
* Makefile.am: Build and package OS-specific files.
* build_w32.bat, make_msvc_net2003.vcproj, README.W32.template:
Update for new files, and clean up the build.
* POTFILES.in, maintMakefile, NMakefile.template: Ditto.
* w32/subproc/build.bat: Delete as unused.
2016-03-08 23:40:46 -05:00
Paul Smith
798ebd241b Update Copyright statements for the new year. 2016-02-28 12:55:20 -05:00