Depending on how make was configured it may add duplicate
directories in the default include search path: avoid this.
(Tweaked by psmith@gnu.org)
* configure.ac: Set AM variable KNOWN_PREFIX if --prefix is known
* Makefile.am: Only set INCLUDEDIR if prefix is not known
* read.c [default_include_directories]: Only add INCLUDEDIR if set
* 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.
Avoid using posix_spawn implementations that fail asynchronously when
the spawned program can't be invoked: this means instead of getting
an error such as "No such file or directory" we get just "Exit 127".
Original implementation of the configure.ac macro provided by
Martin Dorey <martin.dorey@hds.com>
Original implementation of the regression tests provided by
Dmitry Goncharov <dgoncharov@users.sf.net>
* configure.ac: Test whether posix_spawn fails asynchronously. In a
cross-compilation environment, assume that it does not. If we detect
that it does, fall back to fork/exec.
* tests/scripts/features/exec: Add regression tests for different
shebang invocation methods.
If filename contained multiple slashes lastslash is wrongly set to 0.
* configure.ac: Check for the GNU memrchr() extension function.
* src/misc.c (memrchr): Supply memrchr() if not available.
* 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.
* src/dir.c (dir_contents_file_exists_p): Use the autoconf macro
HAVE_STRUCT_DIRENT_D_TYPE rather than relying on the GNU libc-
specific _DIRENT_HAVE_D_TYPE.
* lib/glob.c: Set HAVE_D_TYPE if HAVE_STRUCT_DIRENT_D_TYPE.
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
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
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.
This is about twice as fast as the current hash, and removes the
need for double hashing (improving locality of reference). The
hash function is based on Bob Jenkins' design, slightly adapted
wherever Make needs to hash NUL-terminated strings. The old hash
function is kept for case-insensitive hashing.
This saves 8.5% on QEMU's no-op build (from 12.87s to 11.78s).
* configure.ac: Check endianness.
* hash.c (rol32, jhash_mix, jhash_final, JHASH_INITVAL,
sum_get_unaligned_32, jhash): New.
* hash.h (STRING_HASH_1, STRING_N_HASH_1): Use jhash.
(STRING_HASH_2, STRING_N_HASH_2): Return a dummy value.
(STRING_N_COMPARE, return_STRING_N_COMPARE): Prefer memcmp to strncmp.
* 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.
Testing has shown that vfork() is actually significantly
more efficient on systems where it's supported, even for
copy-on-write implementations. If make is big enough,
duplicating the page tables is significant overhead.
* configure.ac: Check for fork/vfork.
* makeint.h: Include vfork.h and set up #define for it.
* os.h, posixos.c (get_bad_stdin): For children who can't use
the normal stdin file descriptor, get a broken one.
* job.c (start_job_command): Avoid so many ifdefs and simplify
the invocation of child_execute_job()
(child_execute_job): move the fork operation here so it can
return early for the parent process. Switch to use vfork().
* function.c (func_shell_base): Use new child_execute_job() and
simplify ifdefs.
* job.h, main.c, remote-cstms.c, vmsjobs.c, w32os.c: Update
declarations and calls.
* Makefile.am, configure.ac: Check for pselect() and sys/select.h.
* main.c (main): Block SIGCHLD if we have pselect() support.
* posixos.c (jobserver_acquire): If we support pselect() then use
it to query the jobserver pipe, while also listening for SIGCHLD.
Also pselect() supports a timeout so avoid alarm() calls.
This cannot be a perfect solution because there are always other
possible places EINTR can happen, including external libraries
such as gettext, Guile etc.
* configure.ac: Test for isatty() and ttyname()
* makeint.h: provide a substitute for ttyname() if it's not available.
* config.ami.template, config.h-vms.template, config.h.W32.template:
define/undefine HAVE_ISATTY/HAVE_TTYNAME macros.
* NEWS, doc/make.texi: Document these new variables.
* tests/config-flags.pm.in: A new file containing variable assignments
for the test suite; these variables are set by configure to contain
the values detected there for compilers, flags, etc.
* tests/run_make_tests.pl: Require the config-flags.pm file
* tests/scripts/features/load, tests/scripts/features/loadapi: Use the
configure-provided values when building the shared test library.
* configure.ac: Replace tests/config-flags.pm.in
* Makefile.am: Make sure tests/config-flags.pm is up to date
Rename existing ChangeLog files so they won't be distributed.
Add targets to maintMakefile to generate ChangeLog from the Git
repository. This will require a version of gnulib be available.
Because ChangeLog is auto-generated, we have to switch our
automake mode to "foreign" or it will complain and fail.