mirror of
https://github.com/mirror/make.git
synced 2026-08-20 08:53:28 +08:00
Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fdfe0446b6 | ||
|
|
12b14f0484 | ||
|
|
4e12a5fa45 | ||
|
|
e56243fe57 | ||
|
|
7449abfe1b | ||
|
|
53b9770b40 | ||
|
|
766baeef0a | ||
|
|
ee204c78f2 | ||
|
|
e64674b718 | ||
|
|
564fb212a7 | ||
|
|
30cc10093b | ||
|
|
69c5a2128b | ||
|
|
577dd1ff6d | ||
|
|
86f2f8bcb5 | ||
|
|
c72205b28b | ||
|
|
057e33d6b5 | ||
|
|
e4499a1fb5 | ||
|
|
57b043c7fb | ||
|
|
f389aabde6 | ||
|
|
acbef3f612 | ||
|
|
3822f77c1d | ||
|
|
1cf3932a39 |
3
AUTHORS
3
AUTHORS
@@ -68,12 +68,13 @@ Other contributors:
|
||||
David Boyce <dsb@boyski.com>
|
||||
Frank Heckenbach <f.heckenbach@fh-soft.de>
|
||||
Kaz Kylheku <kaz@kylheku.com>
|
||||
Christof Warlich <cwarlich@gmx.de>
|
||||
|
||||
With suggestions/comments/bug reports from a cast of ... well ...
|
||||
hundreds, anyway :)
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 1997-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997-2020 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
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# make.exe -f Basic.mk
|
||||
#
|
||||
# Copyright (C) 2017-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2017-2020 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# This is a -*-Makefile-*-, or close enough
|
||||
#
|
||||
# Copyright (C) 1997-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1997-2020 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
|
||||
@@ -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/>.
|
||||
|
||||
AUTOMAKE_OPTIONS = dist-bzip2 silent-rules std-options subdir-objects nostdinc
|
||||
AUTOMAKE_OPTIONS = dist-lzip silent-rules std-options subdir-objects nostdinc
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
MAKE_HOST = @MAKE_HOST@
|
||||
@@ -95,7 +95,7 @@ test_FILES = tests/run_make_tests tests/run_make_tests.bat \
|
||||
tests/run_make_tests.pl tests/test_driver.pl \
|
||||
tests/config-flags.pm.in tests/config_flags_pm.com \
|
||||
tests/config-flags.pm.W32 \
|
||||
tests/mkshadow tests/jhelp.pl tests/guile.supp tests/README
|
||||
tests/mkshadow tests/thelp.pl tests/guile.supp tests/README
|
||||
# test/scripts are added via dist-hook below.
|
||||
|
||||
EXTRA_DIST = ChangeLog README build.sh build.cfg.in $(man_MANS) \
|
||||
|
||||
21
NEWS
21
NEWS
@@ -1,6 +1,6 @@
|
||||
GNU make NEWS -*-indented-text-*-
|
||||
History of user-visible changes.
|
||||
8 October 2019
|
||||
3 January 2020
|
||||
|
||||
See the end of this file for copyrights and conditions.
|
||||
|
||||
@@ -9,7 +9,7 @@ which is contained in this distribution as the file doc/make.texi.
|
||||
See the README file and the GNU make manual for instructions for
|
||||
reporting bugs.
|
||||
|
||||
Version 4.2.92 (08 Oct 2019)
|
||||
Version 4.2.93 (03 Jan 2020)
|
||||
|
||||
A complete list of bugs fixed in this version is available here:
|
||||
|
||||
@@ -35,14 +35,6 @@ http://sv.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=108&set
|
||||
already contains some value. Similarly, appending an empty string does not
|
||||
add a trailing space.
|
||||
|
||||
* WARNING: Backward-incompatibility!
|
||||
On Linux, and any other systems that provide a /proc/loadavg with similar
|
||||
syntax, the -l/--load-average option will consult that file to determine how
|
||||
many CPUs are busy at that moment and compare that value to the load value
|
||||
requested. This allows usage such as "-j -lN" for N-processor systems
|
||||
without fear of overload during initial startup.
|
||||
Patch provided by Sven C. Dack <sven.c.dack@sky.com>
|
||||
|
||||
* WARNING: Backward-incompatibility!
|
||||
Contrary to the documentation, suffix rules with prerequisites were being
|
||||
treated BOTH as simple targets AND as pattern rules. Behavior now matches
|
||||
@@ -56,6 +48,13 @@ http://sv.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=108&set
|
||||
search for 'grouped-target' in the .FEATURES special variable.
|
||||
Implementation contributed by Kaz Kylheku <kaz@kylheku.com>
|
||||
|
||||
* New feature: .EXTRA_PREREQS variable
|
||||
Words in this variable are considered prerequisites of targets but they are
|
||||
not added to any of the automatic variable values when expanding the
|
||||
recipe. This variable can either be global (applies to all targets) or
|
||||
a target-specific variable. To detect this feature search for 'extra-prereqs'
|
||||
in the .FEATURES special variable.
|
||||
|
||||
* Makefiles can now specify the '-j' option in their MAKEFLAGS variable and
|
||||
this will cause make to enable that parallelism mode.
|
||||
|
||||
@@ -1611,7 +1610,7 @@ Version 3.05
|
||||
(Changes from versions 1 through 3.05 were never recorded. Sorry.)
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 1988-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 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
|
||||
|
||||
@@ -64,7 +64,7 @@ If you plan to use recursive makes, install make resident:
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 1995-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-2020 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
|
||||
|
||||
@@ -280,7 +280,7 @@ Bug reports:
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 1996-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996-2020 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
|
||||
|
||||
@@ -160,7 +160,7 @@ from the make source tree.
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2003-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 2003-2020 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
|
||||
|
||||
@@ -345,7 +345,7 @@ Bug reports:
|
||||
is described in the GNU make manual and the base README.
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 1996-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996-2020 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
|
||||
|
||||
@@ -96,7 +96,7 @@ SunOS 4.1.x:
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 1998-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1998-2020 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
|
||||
|
||||
18
README.git
18
README.git
@@ -1,7 +1,7 @@
|
||||
-*-text-*-
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 2002-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002-2020 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
|
||||
@@ -88,7 +88,11 @@ need to install the following extra software:
|
||||
* GCC (Clang's GCC emulation is not sufficient)
|
||||
* GNU make (POSIX make is not sufficient)
|
||||
|
||||
And any tools that those utilities require (GNU m4, Perl, etc.)
|
||||
And any tools that those utilities require (GNU m4, etc.)
|
||||
|
||||
To run the tests you must install Perl.
|
||||
|
||||
To build a release you'll need to install lzip.
|
||||
|
||||
GNU make requires gnulib to provide some facilities. If you want to maintain
|
||||
a local installation of gnulib you can set GNULIB_SRCDIR to point to it.
|
||||
@@ -166,16 +170,16 @@ run:
|
||||
|
||||
and, if you like:
|
||||
|
||||
$ make dist-bzip2
|
||||
$ make dist-lzip
|
||||
|
||||
Even better, you should run this:
|
||||
|
||||
$ make distcheck
|
||||
|
||||
Which will build both .gz and .bz2 package files, then unpack them into
|
||||
a temporary location, try to build them, and repack them, verifying that
|
||||
everything works, you get the same results, _and_ no extraneous files
|
||||
are left over after the "distclean" rule.
|
||||
Which will build both .gz and .lz package files, then unpack one into a
|
||||
temporary location, try to build it and repack it, then verifying that
|
||||
everything works, you get the same results, _and_ no extraneous files are
|
||||
left over after the "distclean" rule.
|
||||
|
||||
This package can be unpacked and built to give a "normal" (non-maintainer
|
||||
mode) result.
|
||||
|
||||
@@ -172,7 +172,7 @@ at the right README!
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 1988-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 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
|
||||
|
||||
@@ -101,7 +101,7 @@ The Rest of the List
|
||||
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Copyright (C) 1997-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@echo off
|
||||
:: Copyright (C) 2018-2019 Free Software Foundation, Inc.
|
||||
:: Copyright (C) 2018-2020 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
|
||||
@@ -30,5 +30,5 @@ if ERRORLEVEL 1 exit /b 1
|
||||
goto :EOF
|
||||
|
||||
:Done
|
||||
echo Done. Run buld_w32.bat to build GNU make.
|
||||
echo Done. Run build_w32.bat to build GNU make.
|
||||
goto :EOF
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Bootstrap configuration. -*-shell-script-*-
|
||||
|
||||
# Copyright (C) 2018-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2018-2020 Free Software Foundation, Inc.
|
||||
|
||||
# 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Configuration for building GNU Make in the absence of any 'make' program.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1993-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1993-2020 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
|
||||
|
||||
2
build.sh
2
build.sh
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# Shell script to build GNU Make in the absence of any 'make' program.
|
||||
|
||||
# Copyright (C) 1993-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1993-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@echo off
|
||||
:: Copyright (C) 1996-2019 Free Software Foundation, Inc.
|
||||
:: Copyright (C) 1996-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@echo off
|
||||
rem Copyright (C) 1998-2019 Free Software Foundation, Inc.
|
||||
rem Copyright (C) 1998-2020 Free Software Foundation, Inc.
|
||||
rem This file is part of GNU Make.
|
||||
rem
|
||||
rem GNU Make is free software; you can redistribute it and/or modify it under
|
||||
|
||||
29
configure.ac
29
configure.ac
@@ -1,6 +1,6 @@
|
||||
# Process this file with autoconf to produce a configure script.
|
||||
#
|
||||
# Copyright (C) 1993-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1993-2020 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
|
||||
@@ -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.2.92],[bug-make@gnu.org])
|
||||
AC_INIT([GNU make],[4.2.93],[bug-make@gnu.org])
|
||||
|
||||
AC_PREREQ([2.69])
|
||||
|
||||
@@ -138,7 +138,7 @@ AS_IF([test "$ac_cv_func_gettimeofday" = yes],
|
||||
[Define to 1 if you have a standard gettimeofday function])
|
||||
])
|
||||
|
||||
AC_CHECK_FUNCS([strdup strndup umask mkstemp mktemp fdopen \
|
||||
AC_CHECK_FUNCS([strdup strndup memrchr umask mkstemp mktemp fdopen \
|
||||
dup dup2 getcwd realpath sigsetmask sigaction \
|
||||
getgroups seteuid setegid setlinebuf setreuid setregid \
|
||||
getrlimit setrlimit setvbuf pipe strsignal \
|
||||
@@ -371,7 +371,28 @@ AC_ARG_ENABLE([posix-spawn],
|
||||
AS_CASE([/$ac_cv_header_spawn/$ac_cv_func_posix_spawn/],
|
||||
[*/no/*], [make_cv_posix_spawn=no])
|
||||
|
||||
AS_CASE([/$make_cv_posix_spawn/$user_posix_spawn/],
|
||||
AS_IF([test "$make_cv_posix_spawn" = yes],
|
||||
AC_CACHE_CHECK([for posix_spawn that fails synchronously],
|
||||
[make_cv_synchronous_posix_spawn],
|
||||
[make_cv_synchronous_posix_spawn=no
|
||||
AC_RUN_IFELSE([AC_LANG_SOURCE([[
|
||||
#include <spawn.h>
|
||||
#include <string.h>
|
||||
|
||||
extern char **environ;
|
||||
|
||||
int main() {
|
||||
char* path = strdup("./non-existent");
|
||||
char *argv[[2]];
|
||||
argv[[0]] = path;
|
||||
argv[[1]] = 0;
|
||||
return posix_spawn(0, path, 0, 0, argv, environ);
|
||||
}]])],
|
||||
[make_cv_synchronous_posix_spawn=no],
|
||||
[make_cv_synchronous_posix_spawn=yes],
|
||||
[make_cv_synchronous_posix_spawn="no (cross-compiling)"])]))
|
||||
|
||||
AS_CASE([/$user_posix_spawn/$make_cv_posix_spawn/$make_cv_synchronous_posix_spawn/],
|
||||
[*/no/*], [make_cv_posix_spawn=no],
|
||||
[AC_DEFINE(USE_POSIX_SPAWN, 1, [Define to 1 to use posix_spawn().])
|
||||
])
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# -*-Makefile-*-, or close enough
|
||||
# Copyright (C) 2000-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2000-2020 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
|
||||
|
||||
@@ -361,7 +361,7 @@ This manual page contributed by Dennis Morse of Stanford University.
|
||||
Further updates contributed by Mike Frysinger. It has been reworked by Roland
|
||||
McGrath. Maintained by Paul Smith.
|
||||
.SH "COPYRIGHT"
|
||||
Copyright \(co 1992-1993, 1996-2019 Free Software Foundation, Inc.
|
||||
Copyright \(co 1992-1993, 1996-2020 Free Software Foundation, Inc.
|
||||
This file is part of
|
||||
.IR "GNU make" .
|
||||
.LP
|
||||
|
||||
@@ -26,8 +26,8 @@ of @cite{The GNU Make Manual}, for GNU @code{make} version @value{VERSION}.
|
||||
|
||||
Copyright @copyright{} 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995,
|
||||
1996, 1997, 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007,
|
||||
2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019
|
||||
Free Software Foundation, Inc.
|
||||
2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019,
|
||||
2020 Free Software Foundation, Inc.
|
||||
|
||||
@quotation
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
@@ -6631,6 +6631,57 @@ Supports dynamically loadable objects for creating custom extensions.
|
||||
Expands to a list of directories that @code{make} searches for
|
||||
included makefiles (@pxref{Include, , Including Other Makefiles}).
|
||||
|
||||
@vindex .EXTRA_PREREQS @r{(prerequisites not added to automatic variables)}
|
||||
@item .EXTRA_PREREQS
|
||||
Each word in this variable is a new prerequisite which is added to
|
||||
targets for which it is set. These prerequisites differ from normal
|
||||
prerequisites in that they do not appear in any of the automatic
|
||||
variables (@pxref{Automatic Variables}). This allows prerequisites to
|
||||
be defined which do not impact the recipe.
|
||||
|
||||
Consider a rule to link a program:
|
||||
|
||||
@example
|
||||
myprog: myprog.o file1.o file2.o
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@@ $^ $(LDLIBS)
|
||||
@end example
|
||||
|
||||
Now suppose you want to enhance this makefile to ensure that updates
|
||||
to the compiler cause the program to be re-linked. You can add the
|
||||
compiler as a prerequisite, but you must ensure that it's not passed
|
||||
as an argument to link command. You'll need something like this:
|
||||
|
||||
@example
|
||||
myprog: myprog.o file1.o file2.o $(CC)
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@@ $(filter-out $(CC),$^) $(LDLIBS)
|
||||
@end example
|
||||
|
||||
Then consider having multiple extra prerequisites: they would all have
|
||||
to be filtered out. Using @code{.EXTRA_PREREQS} and target-specific
|
||||
variables provides a simpler solution:
|
||||
|
||||
@example
|
||||
myprog: myprog.o file1.o file2.o
|
||||
$(CC) $(CFLAGS) $(LDFLAGS) -o $@@ $^ $(LDLIBS)
|
||||
myprog: .EXTRA_PREREQS = $(CC)
|
||||
@end example
|
||||
|
||||
This feature can also be useful if you want to add prerequisites to a
|
||||
makefile you cannot easily modify: you can create a new file such as
|
||||
@file{extra.mk}:
|
||||
|
||||
@example
|
||||
myprog: .EXTRA_PREREQS = $(CC)
|
||||
@end example
|
||||
|
||||
then invoke @code{make -f extra.mk -f Makefile}.
|
||||
|
||||
Setting @code{.EXTRA_PREREQS} globally will cause those prerequisites
|
||||
to be added to all targets (which did not themselves override it with
|
||||
a target-specific value). Note @code{make} is smart enough not to add
|
||||
a prerequisite listed in @code{.EXTRA_PREREQS} as a prerequisite to
|
||||
itself.
|
||||
|
||||
@end table
|
||||
|
||||
@node Conditionals, Functions, Using Variables, Top
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
dnl acinclude.m4 -- Extra macros needed for GNU make.
|
||||
dnl
|
||||
dnl Automake will incorporate this into its generated aclocal.m4.
|
||||
dnl Copyright (C) 1998-2019 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 1998-2020 Free Software Foundation, Inc.
|
||||
dnl This file is part of GNU Make.
|
||||
dnl
|
||||
dnl GNU Make is free software; you can redistribute it and/or modify it under
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Test if the system uses DOS-style pathnames (drive specs and backslashes)
|
||||
# By Paul Smith <psmith@gnu.org>. Based on dos.m4 by Jim Meyering.
|
||||
#
|
||||
# Copyright (C) 1993-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1993-2020 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
|
||||
|
||||
@@ -483,7 +483,7 @@ $(UPLOADS): $(DIST_ARCHIVES) $(DIST_ARCHIVES_SIG) $(DIST_ARCHIVES_DIRECTIVE)
|
||||
# Rebuild Makefile.in if this file is modifed.
|
||||
Makefile.in: maintMakefile
|
||||
|
||||
# Copyright (C) 1997-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1997-2020 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
|
||||
|
||||
@@ -154,7 +154,7 @@ $ exit
|
||||
$ endsubroutine : compileit
|
||||
$!
|
||||
$!-----------------------------------------------------------------------------
|
||||
$!Copyright (C) 1996-2019 Free Software Foundation, Inc.
|
||||
$!Copyright (C) 1996-2020 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
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# Amiga overrides for use with Basic.mk.
|
||||
#
|
||||
# Copyright (C) 2017-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2017-2020 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
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# POSIX overrides for use with Basic.mk.
|
||||
#
|
||||
# Copyright (C) 2017-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2017-2020 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
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# VMS overrides for use with Basic.mk.
|
||||
#
|
||||
# Copyright (C) 2017-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2017-2020 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
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# Windows overrides for use with Basic.mk.
|
||||
#
|
||||
# Copyright (C) 2017-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2017-2020 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
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# MS-DOS overrides for use with Basic.mk.
|
||||
#
|
||||
# Copyright (C) 2017-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2017-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# List of source files containing translatable strings.
|
||||
# Copyright (C) 2000-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2000-2020 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2014-2019 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2014-2020 Free Software Foundation, Inc.
|
||||
# This file is part of GNU Make.
|
||||
#
|
||||
# Update GNU make copyrights using gnulib update-copyright
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Running commands on Amiga
|
||||
Copyright (C) 1995-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Definitions for amiga specific things
|
||||
Copyright (C) 1995-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-2020 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
|
||||
|
||||
2
src/ar.c
2
src/ar.c
@@ -1,5 +1,5 @@
|
||||
/* Interface to 'ar' archives for GNU Make.
|
||||
Copyright (C) 1988-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GNU Make.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Library function for scanning an archive file.
|
||||
Copyright (C) 1987-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1987-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Command processing for GNU Make.
|
||||
Copyright (C) 1988-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 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
|
||||
@@ -133,7 +133,7 @@ set_file_variables (struct file *file)
|
||||
/* $< is the first not order-only dependency. */
|
||||
less = "";
|
||||
for (d = file->deps; d != 0; d = d->next)
|
||||
if (!d->ignore_mtime)
|
||||
if (!d->ignore_mtime && !d->ignore_automatic_vars)
|
||||
{
|
||||
if (!d->need_2nd_expansion)
|
||||
less = dep_name (d);
|
||||
@@ -178,7 +178,7 @@ set_file_variables (struct file *file)
|
||||
bar_len = 0;
|
||||
for (d = file->deps; d != 0; d = d->next)
|
||||
{
|
||||
if (!d->need_2nd_expansion)
|
||||
if (!d->need_2nd_expansion && !d->ignore_automatic_vars)
|
||||
{
|
||||
if (d->ignore_mtime)
|
||||
bar_len += strlen (dep_name (d)) + 1;
|
||||
@@ -200,7 +200,7 @@ set_file_variables (struct file *file)
|
||||
|
||||
qmark_len = plus_len + 1; /* Will be this or less. */
|
||||
for (d = file->deps; d != 0; d = d->next)
|
||||
if (! d->ignore_mtime && ! d->need_2nd_expansion)
|
||||
if (! d->ignore_mtime && ! d->need_2nd_expansion && ! d->ignore_automatic_vars)
|
||||
{
|
||||
const char *c = dep_name (d);
|
||||
|
||||
@@ -247,7 +247,7 @@ set_file_variables (struct file *file)
|
||||
|
||||
for (d = file->deps; d != 0; d = d->next)
|
||||
{
|
||||
if (d->need_2nd_expansion)
|
||||
if (d->need_2nd_expansion || d->ignore_automatic_vars)
|
||||
continue;
|
||||
|
||||
slot = hash_find_slot (&dep_hash, d);
|
||||
@@ -269,7 +269,7 @@ set_file_variables (struct file *file)
|
||||
{
|
||||
const char *c;
|
||||
|
||||
if (d->need_2nd_expansion || hash_find_item (&dep_hash, d) != d)
|
||||
if (d->need_2nd_expansion || d->ignore_automatic_vars || hash_find_item (&dep_hash, d) != d)
|
||||
continue;
|
||||
|
||||
c = dep_name (d);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Definition of data structures describing shell commands for GNU Make.
|
||||
Copyright (C) 1988-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* config.h -- hand-massaged for Amiga -*-C-*-
|
||||
Copyright (C) 1995-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-2020 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* config.h-vms. Generated by hand by Klaus Kämpf <kkaempf@rmi.de> -*-C-*-
|
||||
|
||||
Copyright (C) 1996-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996-2020 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* config.h.W32 -- hand-massaged config.h file for Windows builds -*-C-*-
|
||||
|
||||
Copyright (C) 1996-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996-2020 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
|
||||
@@ -292,7 +292,10 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
/* #undef HAVE_STRSIGNAL */
|
||||
|
||||
/* Define to 1 if `d_type' is a member of `struct dirent'. */
|
||||
#define HAVE_STRUCT_DIRENT_D_TYPE 1
|
||||
/* SV 57152: MinGW64 version of dirent doesn't support d_type. */
|
||||
#ifndef __MINGW64__
|
||||
# define HAVE_STRUCT_DIRENT_D_TYPE 1
|
||||
#endif
|
||||
|
||||
/* Define to 1 if you have the `isatty' function. */
|
||||
#define HAVE_ISATTY 1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* configh.dos -- hand-massaged config.h file for MS-DOS builds -*-C-*-
|
||||
|
||||
Copyright (C) 1994-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1994-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Debugging macros and interface.
|
||||
Copyright (C) 1999-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Data base of default implicit rules for GNU Make.
|
||||
Copyright (C) 1988-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Definitions of dependency data structures for GNU Make.
|
||||
Copyright (C) 1988-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 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
|
||||
@@ -48,7 +48,8 @@ struct nameseq
|
||||
unsigned int changed : 1; \
|
||||
unsigned int ignore_mtime : 1; \
|
||||
unsigned int staticpattern : 1; \
|
||||
unsigned int need_2nd_expansion : 1
|
||||
unsigned int need_2nd_expansion : 1; \
|
||||
unsigned int ignore_automatic_vars : 1
|
||||
|
||||
struct dep
|
||||
{
|
||||
@@ -74,6 +75,7 @@ struct goaldep
|
||||
#define PARSEFS_NOGLOB 0x0004
|
||||
#define PARSEFS_EXISTS 0x0008
|
||||
#define PARSEFS_NOCACHE 0x0010
|
||||
#define PARSEFS_ONEWORD 0x0020
|
||||
|
||||
#define PARSE_FILE_SEQ(_s,_t,_c,_p,_f) \
|
||||
(_t *)parse_file_seq ((_s),sizeof (_t),(_c),(_p),(_f))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Directory hashing for GNU Make.
|
||||
Copyright (C) 1988-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Variable expansion functions for GNU Make.
|
||||
Copyright (C) 1988-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 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
|
||||
|
||||
92
src/file.c
92
src/file.c
@@ -1,5 +1,5 @@
|
||||
/* Target file management for GNU Make.
|
||||
Copyright (C) 1988-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 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
|
||||
@@ -550,15 +550,6 @@ enter_prereqs (struct dep *deps, const char *stem)
|
||||
return deps;
|
||||
}
|
||||
|
||||
/* Set the intermediate flag. */
|
||||
|
||||
static void
|
||||
set_intermediate (const void *item)
|
||||
{
|
||||
struct file *f = (struct file *) item;
|
||||
f->intermediate = 1;
|
||||
}
|
||||
|
||||
/* Expand and parse each dependency line. */
|
||||
static void
|
||||
expand_deps (struct file *f)
|
||||
@@ -644,13 +635,69 @@ expand_deps (struct file *f)
|
||||
}
|
||||
}
|
||||
|
||||
/* Reset the updating flag. */
|
||||
/* Add extra prereqs to the file in question. */
|
||||
|
||||
struct dep *
|
||||
expand_extra_prereqs (const struct variable *extra)
|
||||
{
|
||||
struct dep *prereqs = extra ? split_prereqs (variable_expand (extra->value)) : NULL;
|
||||
|
||||
for (struct dep *d = prereqs; d; d = d->next)
|
||||
{
|
||||
d->file = lookup_file (d->name);
|
||||
if (!d->file)
|
||||
d->file = enter_file (d->name);
|
||||
d->name = NULL;
|
||||
d->ignore_automatic_vars = 1;
|
||||
}
|
||||
|
||||
return prereqs;
|
||||
}
|
||||
|
||||
/* Perform per-file snap operations. */
|
||||
|
||||
static void
|
||||
reset_updating (const void *item)
|
||||
snap_file (const void *item, void *arg)
|
||||
{
|
||||
struct file *f = (struct file *) item;
|
||||
f->updating = 0;
|
||||
struct file *f = (struct file*)item;
|
||||
struct dep *prereqs = NULL;
|
||||
|
||||
/* If we're not doing second expansion then reset updating. */
|
||||
if (!second_expansion)
|
||||
f->updating = 0;
|
||||
|
||||
/* If .SECONDARY is set with no deps, mark all targets as intermediate. */
|
||||
if (all_secondary)
|
||||
f->intermediate = 1;
|
||||
|
||||
/* If .EXTRA_PREREQS is set, add them as ignored by automatic variables. */
|
||||
if (f->variables)
|
||||
prereqs = expand_extra_prereqs (lookup_variable_in_set (STRING_SIZE_TUPLE(".EXTRA_PREREQS"), f->variables->set));
|
||||
|
||||
else if (f->is_target)
|
||||
prereqs = copy_dep_chain (arg);
|
||||
|
||||
if (prereqs)
|
||||
{
|
||||
struct dep *d;
|
||||
for (d = prereqs; d; d = d->next)
|
||||
if (streq (f->name, dep_name (d)))
|
||||
/* Skip circular dependencies. */
|
||||
break;
|
||||
|
||||
if (d)
|
||||
/* We broke early: must have found a circular dependency. */
|
||||
free_dep_chain (prereqs);
|
||||
else if (!f->deps)
|
||||
f->deps = prereqs;
|
||||
else
|
||||
{
|
||||
d = f->deps;
|
||||
while (d->next)
|
||||
d = d->next;
|
||||
d->next = prereqs;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* For each dependency of each file, make the 'struct dep' point
|
||||
@@ -700,9 +747,6 @@ snap_deps (void)
|
||||
expand_deps (f);
|
||||
free (file_slot_0);
|
||||
}
|
||||
else
|
||||
/* We're not doing second expansion, so reset updating. */
|
||||
hash_map (&files, reset_updating);
|
||||
|
||||
/* Now manage all the special targets. */
|
||||
|
||||
@@ -744,10 +788,7 @@ snap_deps (void)
|
||||
f2->intermediate = f2->secondary = 1;
|
||||
/* .SECONDARY with no deps listed marks *all* files that way. */
|
||||
else
|
||||
{
|
||||
all_secondary = 1;
|
||||
hash_map (&files, set_intermediate);
|
||||
}
|
||||
all_secondary = 1;
|
||||
|
||||
f = lookup_file (".EXPORT_ALL_VARIABLES");
|
||||
if (f != 0 && f->is_target)
|
||||
@@ -779,6 +820,15 @@ snap_deps (void)
|
||||
if (f != 0 && f->is_target)
|
||||
not_parallel = 1;
|
||||
|
||||
{
|
||||
struct dep *prereqs = expand_extra_prereqs (lookup_variable (STRING_SIZE_TUPLE(".EXTRA_PREREQS")));
|
||||
|
||||
/* Perform per-file snap operations. */
|
||||
hash_map_arg(&files, snap_file, prereqs);
|
||||
|
||||
free_dep_chain (prereqs);
|
||||
}
|
||||
|
||||
#ifndef NO_MINUS_C_MINUS_O
|
||||
/* If .POSIX was defined, remove OUTPUT_OPTION to comply. */
|
||||
/* This needs more work: what if the user sets this in the makefile?
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Definition of target file data structures for GNU Make.
|
||||
Copyright (C) 1988-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 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
|
||||
@@ -21,6 +21,11 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include "hash.h"
|
||||
|
||||
struct commands;
|
||||
struct dep;
|
||||
struct variable;
|
||||
struct variable_set_list;
|
||||
|
||||
struct file
|
||||
{
|
||||
const char *name;
|
||||
@@ -110,6 +115,7 @@ struct file *lookup_file (const char *name);
|
||||
struct file *enter_file (const char *name);
|
||||
struct dep *split_prereqs (char *prereqstr);
|
||||
struct dep *enter_prereqs (struct dep *prereqs, const char *stem);
|
||||
struct dep *expand_extra_prereqs (const struct variable *extra);
|
||||
void remove_intermediates (int sig);
|
||||
void snap_deps (void);
|
||||
void rename_file (struct file *file, const char *name);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Builtin function expansion for GNU Make.
|
||||
Copyright (C) 1988-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 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
|
||||
|
||||
@@ -3,7 +3,7 @@ NOTE: getopt is now part of the C library, so if you don't know what
|
||||
"Keep this file name-space clean" means, talk to drepper@gnu.org
|
||||
before changing it!
|
||||
|
||||
Copyright (C) 1987-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1987-2020 Free Software Foundation, Inc.
|
||||
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
Bugs can be reported to bug-glibc@gnu.org.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Declarations for getopt.
|
||||
Copyright (C) 1989-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1989-2020 Free Software Foundation, Inc.
|
||||
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
Bugs can be reported to bug-glibc@gnu.org.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* getopt_long and getopt_long_only entry points for GNU getopt.
|
||||
Copyright (C) 1987-1994, 1996-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1987-1994, 1996-2020 Free Software Foundation, Inc.
|
||||
|
||||
NOTE: The canonical source of this file is maintained with the GNU C Library.
|
||||
Bugs can be reported to bug-glibc@gnu.org.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Convenience header for conditional use of GNU <libintl.h>.
|
||||
Copyright (C) 1995-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1995-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
;; Contents of the (gnu make) Guile module
|
||||
;; Copyright (C) 2011-2019 Free Software Foundation, Inc.
|
||||
;; Copyright (C) 2011-2020 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* External interfaces usable by dynamic objects loaded into GNU Make.
|
||||
--THIS API IS A "TECHNOLOGY PREVIEW" ONLY. IT IS NOT A STABLE INTERFACE--
|
||||
|
||||
Copyright (C) 2013-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 2013-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* GNU Guile interface for GNU Make.
|
||||
Copyright (C) 2011-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 2011-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Implicit rule searching for GNU Make.
|
||||
Copyright (C) 1988-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 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
|
||||
@@ -152,6 +152,7 @@ struct patdeps
|
||||
const char *pattern;
|
||||
struct file *file;
|
||||
unsigned int ignore_mtime : 1;
|
||||
unsigned int ignore_automatic_vars : 1;
|
||||
};
|
||||
|
||||
/* This structure stores information about pattern rules that we need
|
||||
@@ -220,8 +221,9 @@ pattern_search (struct file *file, int archive,
|
||||
struct patdeps *deplist = xmalloc (max_deps * sizeof (struct patdeps));
|
||||
struct patdeps *pat = deplist;
|
||||
|
||||
/* Names of possible dependencies are constructed in this buffer. */
|
||||
char *depname = alloca (namelen + max_pattern_dep_length);
|
||||
/* Names of possible dependencies are constructed in this buffer.
|
||||
We may replace % by $(*F) for second expansion, increasing the length. */
|
||||
char *depname = alloca (namelen + max_pattern_dep_length + 4);
|
||||
|
||||
/* The start and length of the stem of FILENAME for the current rule. */
|
||||
const char *stem = 0;
|
||||
@@ -265,7 +267,7 @@ pattern_search (struct file *file, int archive,
|
||||
/* Set LASTSLASH to point at the last slash in FILENAME
|
||||
but not counting any slash at the end. (foo/bar/ counts as
|
||||
bar/ in directory foo/, not empty in directory foo/bar/.) */
|
||||
lastslash = strrchr (filename, '/');
|
||||
lastslash = memrchr (filename, '/', namelen - 1);
|
||||
#ifdef VMS
|
||||
if (lastslash == NULL)
|
||||
lastslash = strrchr (filename, ']');
|
||||
@@ -278,18 +280,16 @@ pattern_search (struct file *file, int archive,
|
||||
/* Handle backslashes (possibly mixed with forward slashes)
|
||||
and the case of "d:file". */
|
||||
{
|
||||
char *bslash = strrchr (filename, '\\');
|
||||
char *bslash = memrchr (filename, '\\', namelen - 1);
|
||||
if (lastslash == 0 || bslash > lastslash)
|
||||
lastslash = bslash;
|
||||
if (lastslash == 0 && filename[0] && filename[1] == ':')
|
||||
lastslash = filename + 1;
|
||||
}
|
||||
#endif
|
||||
if (lastslash != 0 && lastslash[1] == '\0')
|
||||
lastslash = 0;
|
||||
}
|
||||
|
||||
pathlen = lastslash - filename + 1;
|
||||
pathlen = lastslash ? lastslash - filename + 1 : 0;
|
||||
|
||||
/* First see which pattern rules match this target and may be considered.
|
||||
Put them in TRYRULES. */
|
||||
@@ -443,7 +443,6 @@ pattern_search (struct file *file, int archive,
|
||||
unsigned int deps_found = 0;
|
||||
/* NPTR points to the part of the prereq we haven't processed. */
|
||||
const char *nptr = 0;
|
||||
const char *dir = NULL;
|
||||
int order_only = 0;
|
||||
unsigned int matches;
|
||||
|
||||
@@ -478,12 +477,12 @@ pattern_search (struct file *file, int archive,
|
||||
memcpy (pathdir, filename, pathlen);
|
||||
pathdir[pathlen] = '\0';
|
||||
}
|
||||
dir = pathdir;
|
||||
}
|
||||
|
||||
if (stemlen > GET_PATH_MAX)
|
||||
if (stemlen + (check_lastslash ? pathlen : 0) > GET_PATH_MAX)
|
||||
{
|
||||
DBS (DB_IMPLICIT, (_("Stem too long: '%.*s'.\n"),
|
||||
DBS (DB_IMPLICIT, (_("Stem too long: '%s%.*s'.\n"),
|
||||
check_lastslash ? pathdir : "",
|
||||
(int) stemlen, stem));
|
||||
continue;
|
||||
}
|
||||
@@ -491,8 +490,19 @@ pattern_search (struct file *file, int archive,
|
||||
DBS (DB_IMPLICIT, (_("Trying pattern rule with stem '%.*s'.\n"),
|
||||
(int) stemlen, stem));
|
||||
|
||||
strncpy (stem_str, stem, stemlen);
|
||||
stem_str[stemlen] = '\0';
|
||||
if (!check_lastslash)
|
||||
{
|
||||
memcpy (stem_str, stem, stemlen);
|
||||
stem_str[stemlen] = '\0';
|
||||
}
|
||||
else
|
||||
{
|
||||
/* We want to prepend the directory from
|
||||
the original FILENAME onto the stem. */
|
||||
memcpy (stem_str, filename, pathlen);
|
||||
memcpy (stem_str + pathlen, stem, stemlen);
|
||||
stem_str[pathlen + stemlen] = '\0';
|
||||
}
|
||||
|
||||
/* If there are no prerequisites, then this rule matches. */
|
||||
if (rule->deps == 0)
|
||||
@@ -543,18 +553,19 @@ pattern_search (struct file *file, int archive,
|
||||
}
|
||||
memcpy (o, nptr, p - nptr);
|
||||
o += p - nptr;
|
||||
memcpy (o, stem_str, stemlen);
|
||||
memcpy (o, stem, stemlen);
|
||||
o += stemlen;
|
||||
strcpy (o, p + 1);
|
||||
}
|
||||
|
||||
/* Parse the expanded string. It might have wildcards. */
|
||||
p = depname;
|
||||
dl = PARSE_SIMPLE_SEQ (&p, struct dep);
|
||||
dl = PARSE_FILE_SEQ (&p, struct dep, MAP_NUL, NULL, PARSEFS_ONEWORD);
|
||||
for (d = dl; d != NULL; d = d->next)
|
||||
{
|
||||
++deps_found;
|
||||
d->ignore_mtime = dep->ignore_mtime;
|
||||
d->ignore_automatic_vars = dep->ignore_automatic_vars;
|
||||
}
|
||||
|
||||
/* We've used up this dep, so next time get a new one. */
|
||||
@@ -594,10 +605,10 @@ pattern_search (struct file *file, int archive,
|
||||
again. This is not good if you have certain characters
|
||||
in your stem (like $).
|
||||
|
||||
Instead, we will replace % with $* and allow the second
|
||||
expansion to take care of it for us. This way (since $*
|
||||
is a simple variable) there won't be additional
|
||||
re-expansion of the stem. */
|
||||
Instead, we will replace % with $* or $(*F) and allow the
|
||||
second expansion to take care of it for us. This way
|
||||
(since $* and $(*F) are simple variables) there won't be
|
||||
additional re-expansion of the stem. */
|
||||
|
||||
p = lindex (nptr, nptr + len, '%');
|
||||
if (p == 0)
|
||||
@@ -608,13 +619,22 @@ pattern_search (struct file *file, int archive,
|
||||
else
|
||||
{
|
||||
size_t i = p - nptr;
|
||||
memcpy (depname, nptr, i);
|
||||
memcpy (depname + i, "$*", 2);
|
||||
memcpy (depname + i + 2, p + 1, len - i - 1);
|
||||
depname[len + 2 - 1] = '\0';
|
||||
|
||||
char *o = depname;
|
||||
memcpy (o, nptr, i);
|
||||
o += i;
|
||||
if (check_lastslash)
|
||||
add_dir = 1;
|
||||
{
|
||||
add_dir = 1;
|
||||
memcpy (o, "$(*F)", 5);
|
||||
o += 5;
|
||||
}
|
||||
else
|
||||
{
|
||||
memcpy (o, "$*", 2);
|
||||
o += 2;
|
||||
}
|
||||
memcpy (o, p + 1, len - i - 1);
|
||||
o[len - i - 1] = '\0';
|
||||
}
|
||||
|
||||
/* Set up for the next word. */
|
||||
@@ -646,7 +666,7 @@ pattern_search (struct file *file, int archive,
|
||||
/* Parse the expanded string. */
|
||||
struct dep *dp = PARSE_FILE_SEQ (&p, struct dep,
|
||||
order_only ? MAP_NUL : MAP_PIPE,
|
||||
add_dir ? dir : NULL, PARSEFS_NONE);
|
||||
add_dir ? pathdir : NULL, PARSEFS_NONE);
|
||||
*dptr = dp;
|
||||
|
||||
for (d = dp; d != NULL; d = d->next)
|
||||
@@ -705,6 +725,7 @@ pattern_search (struct file *file, int archive,
|
||||
|
||||
memset (pat, '\0', sizeof (struct patdeps));
|
||||
pat->ignore_mtime = d->ignore_mtime;
|
||||
pat->ignore_automatic_vars = d->ignore_automatic_vars;
|
||||
|
||||
DBS (DB_IMPLICIT,
|
||||
(is_rule
|
||||
@@ -895,6 +916,7 @@ pattern_search (struct file *file, int archive,
|
||||
|
||||
dep = alloc_dep ();
|
||||
dep->ignore_mtime = pat->ignore_mtime;
|
||||
dep->ignore_automatic_vars = pat->ignore_automatic_vars;
|
||||
s = strcache_add (pat->name);
|
||||
if (recursions)
|
||||
dep->name = s;
|
||||
@@ -931,17 +953,13 @@ pattern_search (struct file *file, int archive,
|
||||
}
|
||||
else
|
||||
{
|
||||
size_t dirlen = (lastslash + 1) - filename;
|
||||
char *sp;
|
||||
|
||||
/* We want to prepend the directory from
|
||||
the original FILENAME onto the stem. */
|
||||
fullstemlen = dirlen + stemlen;
|
||||
sp = alloca (fullstemlen + 1);
|
||||
memcpy (sp, filename, dirlen);
|
||||
memcpy (sp + dirlen, stem, stemlen);
|
||||
sp[fullstemlen] = '\0';
|
||||
file->stem = strcache_add (sp);
|
||||
fullstemlen = pathlen + stemlen;
|
||||
memcpy (stem_str, filename, pathlen);
|
||||
memcpy (stem_str + pathlen, stem, stemlen);
|
||||
stem_str[fullstemlen] = '\0';
|
||||
file->stem = strcache_add (stem_str);
|
||||
}
|
||||
|
||||
file->cmds = rule->cmds;
|
||||
|
||||
15
src/job.c
15
src/job.c
@@ -1,5 +1,5 @@
|
||||
/* Job execution and handling for GNU Make.
|
||||
Copyright (C) 1988-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 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
|
||||
@@ -2008,7 +2008,18 @@ load_too_high (void)
|
||||
#else
|
||||
static double last_sec;
|
||||
static time_t last_now;
|
||||
static int proc_fd = -2;
|
||||
|
||||
/* This is disabled by default for now, because it will behave badly if the
|
||||
user gives a value > the number of cores; in that situation the load will
|
||||
never be exceeded, this function always returns false, and we'll start
|
||||
all the jobs. Also, it's not quite right to limit jobs to the number of
|
||||
cores not busy since a job takes some time to start etc. Maybe that's
|
||||
OK, I'm not sure exactly how to handle that, but for sure we need to
|
||||
clamp this value at the number of cores before this can be enabled.
|
||||
*/
|
||||
#define PROC_FD_INIT -1
|
||||
static int proc_fd = PROC_FD_INIT;
|
||||
|
||||
double load, guess;
|
||||
time_t now;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Definitions for managing subprocesses in GNU Make.
|
||||
Copyright (C) 1992-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1992-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Loading dynamic objects for GNU Make.
|
||||
Copyright (C) 2012-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 2012-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* API for GNU Make dynamic objects.
|
||||
Copyright (C) 2013-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 2013-2020 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
|
||||
|
||||
10
src/main.c
10
src/main.c
@@ -1,5 +1,5 @@
|
||||
/* Argument parsing and main program of GNU Make.
|
||||
Copyright (C) 1988-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 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
|
||||
@@ -1313,7 +1313,7 @@ main (int argc, char **argv, char **envp)
|
||||
{
|
||||
const char *features = "target-specific order-only second-expansion"
|
||||
" else-if shortest-stem undefine oneshell nocomment"
|
||||
" grouped-target"
|
||||
" grouped-target extra-prereqs"
|
||||
#ifndef NO_ARCHIVES
|
||||
" archives"
|
||||
#endif
|
||||
@@ -2134,9 +2134,9 @@ main (int argc, char **argv, char **envp)
|
||||
|
||||
install_default_implicit_rules ();
|
||||
|
||||
/* Compute implicit rule limits. */
|
||||
/* Compute implicit rule limits and do magic for pattern rules. */
|
||||
|
||||
count_implicit_rule_limits ();
|
||||
snap_implicit_rules ();
|
||||
|
||||
/* Construct the listings of directories in VPATH lists. */
|
||||
|
||||
@@ -3370,7 +3370,7 @@ print_version (void)
|
||||
year, and none of the rest of it should be translated (including the
|
||||
word "Copyright"), so it hardly seems worth it. */
|
||||
|
||||
printf ("%sCopyright (C) 1988-2019 Free Software Foundation, Inc.\n",
|
||||
printf ("%sCopyright (C) 1988-2020 Free Software Foundation, Inc.\n",
|
||||
precede);
|
||||
|
||||
printf (_("%sLicense GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n\
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Miscellaneous global declarations and portability cruft for GNU Make.
|
||||
Copyright (C) 1988-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 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
|
||||
@@ -528,8 +528,12 @@ void print_spaces (unsigned int);
|
||||
char *find_percent (char *);
|
||||
const char *find_percent_cached (const char **);
|
||||
FILE *get_tmpfile (char **, const char *);
|
||||
ssize_t writebuf (int, const void*, size_t);
|
||||
ssize_t readbuf (int, void*, size_t);
|
||||
ssize_t writebuf (int, const void *, size_t);
|
||||
ssize_t readbuf (int, void *, size_t);
|
||||
|
||||
#ifndef HAVE_MEMRCHR
|
||||
void *memrchr(const void *, int, size_t);
|
||||
#endif
|
||||
|
||||
#ifndef NO_ARCHIVES
|
||||
int ar_name (const char *);
|
||||
|
||||
34
src/misc.c
34
src/misc.c
@@ -1,5 +1,5 @@
|
||||
/* Miscellaneous generic support functions for GNU Make.
|
||||
Copyright (C) 1988-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 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
|
||||
@@ -24,6 +24,7 @@ this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef WINDOWS32
|
||||
# include <windows.h>
|
||||
# include <io.h>
|
||||
#endif
|
||||
|
||||
@@ -260,6 +261,30 @@ xstrndup (const char *str, size_t length)
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#ifndef HAVE_MEMRCHR
|
||||
void *
|
||||
memrchr(const void* str, int ch, size_t len)
|
||||
{
|
||||
const char* sp = str;
|
||||
const char* cp = sp;
|
||||
|
||||
if (len == 0)
|
||||
return NULL;
|
||||
|
||||
cp += len - 1;
|
||||
|
||||
while (cp[0] != ch)
|
||||
{
|
||||
if (cp == sp)
|
||||
return NULL;
|
||||
--cp;
|
||||
}
|
||||
|
||||
return (void*)cp;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/* Limited INDEX:
|
||||
@@ -407,7 +432,8 @@ free_ns_chain (struct nameseq *ns)
|
||||
|
||||
#ifdef MAKE_MAINTAINER_MODE
|
||||
|
||||
void spin(const char* type)
|
||||
void
|
||||
spin (const char* type)
|
||||
{
|
||||
char filenm[256];
|
||||
struct stat dummy;
|
||||
@@ -418,7 +444,11 @@ void spin(const char* type)
|
||||
{
|
||||
fprintf (stderr, "SPIN on %s\n", filenm);
|
||||
do
|
||||
#ifdef WINDOWS32
|
||||
Sleep (1000);
|
||||
#else
|
||||
sleep (1);
|
||||
#endif
|
||||
while (stat (filenm, &dummy) == 0);
|
||||
}
|
||||
}
|
||||
|
||||
2
src/os.h
2
src/os.h
@@ -1,5 +1,5 @@
|
||||
/* Declarations for operating system interfaces for GNU Make.
|
||||
Copyright (C) 2016-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 2016-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Output to stdout / stderr for GNU make
|
||||
Copyright (C) 2013-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 2013-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Output to stdout / stderr for GNU make
|
||||
Copyright (C) 2013-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 2013-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* POSIX-based operating system interface for GNU Make.
|
||||
Copyright (C) 2016-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 2016-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Reading and parsing of makefiles for GNU Make.
|
||||
Copyright (C) 1988-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 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
|
||||
@@ -3138,7 +3138,10 @@ parse_file_seq (char **stringp, size_t size, int stopmap,
|
||||
char *p;
|
||||
glob_t gl;
|
||||
char *tp;
|
||||
int findmap = stopmap|MAP_VMSCOMMA|MAP_BLANK|MAP_NUL;
|
||||
int findmap = stopmap|MAP_VMSCOMMA|MAP_NUL;
|
||||
|
||||
if (NONE_SET (flags, PARSEFS_ONEWORD))
|
||||
findmap |= MAP_BLANK;
|
||||
|
||||
/* Always stop on NUL. */
|
||||
stopmap |= MAP_NUL;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Basic dependency engine for GNU Make.
|
||||
Copyright (C) 1988-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 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
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
Please do not send bug reports or questions about it to
|
||||
the Make maintainers.
|
||||
|
||||
Copyright (C) 1988-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Template for the remote job exportation interface to GNU Make.
|
||||
Copyright (C) 1988-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 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
|
||||
|
||||
63
src/rule.c
63
src/rule.c
@@ -1,5 +1,5 @@
|
||||
/* Pattern and suffix rule internals for GNU Make.
|
||||
Copyright (C) 1988-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 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
|
||||
@@ -60,36 +60,43 @@ struct file *suffix_file;
|
||||
|
||||
static size_t maxsuffix;
|
||||
|
||||
/* Compute the maximum dependency length and maximum number of
|
||||
dependencies of all implicit rules. Also sets the subdir
|
||||
flag for a rule when appropriate, possibly removing the rule
|
||||
completely when appropriate. */
|
||||
/* Compute the maximum dependency length and maximum number of dependencies of
|
||||
all implicit rules. Also sets the subdir flag for a rule when appropriate,
|
||||
possibly removing the rule completely when appropriate.
|
||||
|
||||
Add any global EXTRA_PREREQS here as well. */
|
||||
|
||||
void
|
||||
count_implicit_rule_limits (void)
|
||||
snap_implicit_rules (void)
|
||||
{
|
||||
char *name;
|
||||
size_t namelen;
|
||||
struct rule *rule;
|
||||
char *name = NULL;
|
||||
size_t namelen = 0;
|
||||
struct dep *prereqs = expand_extra_prereqs (lookup_variable (STRING_SIZE_TUPLE(".EXTRA_PREREQS")));
|
||||
unsigned int pre_deps = 0;
|
||||
|
||||
num_pattern_rules = max_pattern_targets = max_pattern_deps = 0;
|
||||
max_pattern_dep_length = 0;
|
||||
|
||||
name = 0;
|
||||
namelen = 0;
|
||||
rule = pattern_rules;
|
||||
while (rule != 0)
|
||||
for (struct dep *d = prereqs; d; d = d->next)
|
||||
{
|
||||
unsigned int ndeps = 0;
|
||||
struct dep *dep;
|
||||
struct rule *next = rule->next;
|
||||
size_t l = strlen (dep_name (d));
|
||||
if (l > max_pattern_dep_length)
|
||||
max_pattern_dep_length = l;
|
||||
++pre_deps;
|
||||
}
|
||||
|
||||
num_pattern_rules = max_pattern_targets = max_pattern_deps = 0;
|
||||
|
||||
for (struct rule *rule = pattern_rules; rule; rule = rule->next)
|
||||
{
|
||||
unsigned int ndeps = pre_deps;
|
||||
struct dep *lastdep = NULL;
|
||||
|
||||
++num_pattern_rules;
|
||||
|
||||
if (rule->num > max_pattern_targets)
|
||||
max_pattern_targets = rule->num;
|
||||
|
||||
for (dep = rule->deps; dep != 0; dep = dep->next)
|
||||
for (struct dep *dep = rule->deps; dep != 0; dep = dep->next)
|
||||
{
|
||||
const char *dname = dep_name (dep);
|
||||
size_t len = strlen (dname);
|
||||
@@ -99,17 +106,20 @@ count_implicit_rule_limits (void)
|
||||
const char *p2;
|
||||
if (p == 0)
|
||||
p = strrchr (dname, ':');
|
||||
p2 = p != 0 ? strchr (dname, '%') : 0;
|
||||
p2 = p ? strchr (p, '%') : 0;
|
||||
#else
|
||||
const char *p = strrchr (dname, '/');
|
||||
const char *p2 = p != 0 ? strchr (dname, '%') : 0;
|
||||
const char *p2 = p ? strchr (p, '%') : 0;
|
||||
#endif
|
||||
ndeps++;
|
||||
|
||||
if (len > max_pattern_dep_length)
|
||||
max_pattern_dep_length = len;
|
||||
|
||||
if (p != 0 && p2 > p)
|
||||
if (!dep->next)
|
||||
lastdep = dep;
|
||||
|
||||
if (p2)
|
||||
{
|
||||
/* There is a slash before the % in the dep name.
|
||||
Extract the directory name. */
|
||||
@@ -134,13 +144,20 @@ count_implicit_rule_limits (void)
|
||||
dep->changed = 0;
|
||||
}
|
||||
|
||||
if (prereqs)
|
||||
{
|
||||
if (lastdep)
|
||||
lastdep->next = copy_dep_chain (prereqs);
|
||||
else
|
||||
rule->deps = copy_dep_chain (prereqs);
|
||||
}
|
||||
|
||||
if (ndeps > max_pattern_deps)
|
||||
max_pattern_deps = ndeps;
|
||||
|
||||
rule = next;
|
||||
}
|
||||
|
||||
free (name);
|
||||
free_dep_chain (prereqs);
|
||||
}
|
||||
|
||||
/* Create a pattern rule from a suffix rule.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Definitions for using pattern rules in GNU Make.
|
||||
Copyright (C) 1988-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 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
|
||||
@@ -48,7 +48,7 @@ extern size_t max_pattern_dep_length;
|
||||
extern struct file *suffix_file;
|
||||
|
||||
|
||||
void count_implicit_rule_limits (void);
|
||||
void snap_implicit_rules (void);
|
||||
void convert_to_pattern (void);
|
||||
void install_pattern_rule (struct pspec *p, int terminal);
|
||||
void create_pattern_rule (const char **targets, const char **target_percents,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Convert between signal names and numbers.
|
||||
Copyright (C) 1990-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1990-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Constant string caching for GNU Make.
|
||||
Copyright (C) 2006-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 2006-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Internals of variables for GNU Make.
|
||||
Copyright (C) 1988-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Definitions for using variables in GNU Make.
|
||||
Copyright (C) 1988-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Record version and build host architecture for GNU make.
|
||||
Copyright (C) 1988-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 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
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* Author: John E. Malmberg
|
||||
*/
|
||||
|
||||
/* Copyright (C) 2014-2019 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2014-2020 Free Software Foundation, Inc.
|
||||
|
||||
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
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* DCL symbols.
|
||||
*/
|
||||
|
||||
/* Copyright (C) 2014-2019 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2014-2020 Free Software Foundation, Inc.
|
||||
|
||||
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
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
/* Copyright (C) 2014-2019 Free Software Foundation, Inc.
|
||||
/* Copyright (C) 2014-2020 Free Software Foundation, Inc.
|
||||
|
||||
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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* dirent.h for vms
|
||||
Copyright (C) 1996-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* VMS functions
|
||||
Copyright (C) 1996-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* vmsify.c -- Module for vms <-> unix file name conversion
|
||||
Copyright (C) 1996-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996-2020 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* --------------- Moved here from job.c ---------------
|
||||
This file must be #included in job.c, as it accesses static functions.
|
||||
|
||||
Copyright (C) 1996-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Implementation of pattern-matching file search paths for GNU Make.
|
||||
Copyright (C) 1988-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1988-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Directory entry code for Window platforms.
|
||||
Copyright (C) 1996-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996-2020 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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Replacements for Posix functions and Posix functionality for MS-Windows.
|
||||
|
||||
Copyright (C) 2013-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 2013-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Windows version of dirent.h
|
||||
Copyright (C) 1996-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* dlfcn.h replacement for MS-Windows build.
|
||||
Copyright (C) 2013-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 2013-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Definitions for Windows path manipulation.
|
||||
Copyright (C) 1996-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Definitions for Windows process invocation.
|
||||
Copyright (C) 1996-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Definitions for Windows error handling.
|
||||
Copyright (C) 1996-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Path conversion for Windows pathnames.
|
||||
Copyright (C) 1996-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Process handling for Windows
|
||||
Copyright (C) 1996-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Definitions for Windows
|
||||
Copyright (C) 1996-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996-2020 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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Process handling for Windows.
|
||||
Copyright (C) 1996-2019 Free Software Foundation, Inc.
|
||||
Copyright (C) 1996-2020 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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user