Compare commits

..

138 Commits
3.80 ... 3.81

Author SHA1 Message Date
Paul Smith
776d8b7bc2 Minor command correction. 2006-04-01 06:37:45 +00:00
Paul Smith
a8f101d0bc Release GNU make 3.81.
Update NEWS docs.
Enhance the manual to use automake version.texi, and use the canonical
FSF copyright features and statement.
Some $(realpath ...) tests won't work on Windows; leave them out
The jobserver filedescriptor test might fail if some FDs are reserved,
so for now comment out that check.
2006-04-01 06:36:40 +00:00
Boris Kolpackov
367a49591e Fixed Savannah bug #16140. 2006-03-22 13:16:03 +00:00
Paul Smith
94aead216e Minor fixes before the rc2 release. 2006-03-20 03:03:04 +00:00
Paul Smith
24aac7f8f6 Add some alloca(0) calls for systems without "normal" alloca support.
Fix a file descriptor leak with make re-exec while using the jobserver.
Update some release information.
2006-03-20 02:36:36 +00:00
Paul Smith
29e539bad0 Minor tweaks for 3.81rc2. 2006-03-17 18:55:26 +00:00
Boris Kolpackov
22886f8a74 Fixed Savannah bug #16053. 2006-03-17 14:24:20 +00:00
Paul Smith
50eb3cf5e5 Fix Savannah bug #15913. 2006-03-15 03:31:30 +00:00
Paul Smith
6d8d9b74d9 Numerous updates to tests for issues found on Cygwin and Windows.
Revert a fix for $? including non-existent files as it shows a bug
in the Linux kernel build.  Give them a release to fix this.
Add some changes from Eli Z. for Windows changes.
2006-03-10 02:20:45 +00:00
Paul Smith
afc4906aca Some test updates for Windows.
Handle SHELL set on the command line properly for windows.
2006-03-08 20:15:08 +00:00
Paul Smith
8af9389f87 Fix a potential core dump when merging aliases. Might fix bug #15818.
Revert intermediate file free code.
Suppress some warnings in VMS builds.
2006-02-21 05:21:19 +00:00
Paul Smith
08bfd86103 Move the copyright info to the end of the NEWS file, otherwise automake's
GNITS check doesn't think we have updated it (only scans the first 15 lines).
2006-02-20 03:34:02 +00:00
Paul Smith
6e0527913c - Memory cleanups, found with valgrind.
- Fix handling of special targets like .SUFFIX for VMS insensitive targets.
- Don't make temporary batch files for -n.  Make sure batch files are created
  in text mode.
2006-02-20 02:14:00 +00:00
Paul Smith
bde826b18a Make sure we don't introduce a circularity into the variable set linked
list.  Fixes Savannah bug #15757.
2006-02-17 13:29:52 +00:00
Paul Smith
0806a403d6 Fix Savannah bug #106: keep separate track of which variable we are
expanding, and use that info when generating error messages instead of
the file info, where appropriate.
2006-02-15 23:54:42 +00:00
Paul Smith
86af3872a9 Some memory leak cleanups (found with valgrind). 2006-02-14 15:42:17 +00:00
Paul Smith
df267b31c5 Fix bug #11183. 2006-02-13 23:38:36 +00:00
Paul Smith
a6bdc58385 Last of the copyright updates. 2006-02-11 22:16:04 +00:00
Paul Smith
24338ec929 More copyright/license updates. 2006-02-11 20:00:39 +00:00
Paul Smith
586daef9bc Update copyright and license notices on all files.
Added new file strcache.c to various non-UNIX makefiles and build scripts.
2006-02-11 19:02:21 +00:00
Paul Smith
5a7a42cfce - New code capability: a read-only string cache. Start of solution for
Savannah bug #15182, but not much uses it yet.  Coming shortly.
- Added short-circuiting $(and ..) and $(or ...) functions.
2006-02-10 05:29:00 +00:00
Boris Kolpackov
d0c4e92f11 Fixed Savannah bug #15641. 2006-02-08 17:29:07 +00:00
Paul Smith
ce9c63b32b Updates to Windows stuff from Markus Mauhart. 2006-02-06 16:41:49 +00:00
Paul Smith
a4e3523fe4 Fix Savannah bugs # 15341, 15534, and 15533.
Rewrite large chunks of the "Commands" section of the manual to better
describe then backslash-newline handling, the SHELL variable, etc.
2006-02-06 16:21:59 +00:00
Paul Smith
7a8549f5dd Fix a bug where a variable could be used without being initialized in W32. 2006-02-01 13:31:25 +00:00
Paul Smith
4cd3539024 Various updates, mainly to the Windows port, from Eli Zaretskii and
Markus Maurhart.
2006-02-01 07:54:22 +00:00
Paul Smith
64e16d6c00 Various changes getting ready for the release of 3.81.
- Updates to make.texi and make.1 and other documentation
- Some VMS patches
- Fix minor bugs reported on the mailing list and from Debian.
2006-01-04 14:45:16 +00:00
Boris Kolpackov
3d0d9e5d75 Fixed record_target_var to initialize variable's export field with v_default
instead of leaving it "initialized" by whatever garbage happened to be on
the heap.
2005-12-14 13:11:18 +00:00
Paul Smith
4bd6db9df1 Update the make.1 man page.
Use rm -f instead of rm in the test scripts.  Fixes bug #15085.
2005-12-13 14:44:17 +00:00
Paul Smith
3bcb608bda Extend .SECONDEXPANSION to implicit rules. Final fix for bug #13781. 2005-12-11 15:41:17 +00:00
Boris Kolpackov
0e6c4f5b0e Fixed bug #13022 by setting is_target flag on files that this implicit
pattern rule also makes.
2005-12-09 16:46:19 +00:00
Boris Kolpackov
a34b85490d Fixed bug #14334 by propagate the change of modification time to all the
double-colon entries only if it is the last one to be updated.
2005-12-07 11:33:38 +00:00
Boris Kolpackov
1fd3f9d79c Implemented the flavor function which returns the flavor of
a variable ('simple', 'recursive', or 'undefined').
2005-11-17 07:27:28 +00:00
Boris Kolpackov
3dd1faa5c8 Implemented the .INCLUDE_DIRS special variable. It expands to a list
of directories that make searches for included makefiles.
2005-11-14 15:31:13 +00:00
Paul Smith
82103b1a49 Fix a crash I introduced last-minute.
Try to avoid extraneous rebuilds of template files.
2005-10-26 16:06:30 +00:00
Paul Smith
11095a90f1 Make second expansion optional (partial implementation).
I decided this feature was too impacting to make the permanent default
behavior.  This set of changes makes the default behavior of make the
old behavior (no second expansion).  If you want second expansion, you
must define the .SECONDEXPANSION: special target before the first target
that needs it.

This set of changes ONLY fixes explicit and static pattern rules to work
like this.  Implicit rules still have second expansion enabled all the
time: I'll work on that next.

Note that there is still a backward-incompatibility: now to get the old
SysV behavior using $$@ etc. in the prerequisites list you need to set
.SECONDEXPANSION: as well.
2005-10-24 13:01:39 +00:00
Paul Smith
66459baee2 Make sure to assign a boolean value to a 1-bit bitfield. Reported on
the bug-make mailing list.

Fix Savannah bug # 14527: remember to free temporary line constructor
memory if the line is empty.
2005-09-26 05:16:31 +00:00
Paul Smith
5ee856d96d Try using POSIX::getcwd to find the working directory wherever it exists.
This should help the tests run more accurately on Windows (hopefully...)
2005-08-31 13:38:17 +00:00
Paul Smith
0ffd22cb44 Preserve the backslash that's printed by echo. 2005-08-29 18:45:31 +00:00
Paul Smith
f7598efb67 Fix make.h preprocessor directive to work better with Windows compilers.
Fix some regression tests to (hopefully) work better on Windows.
2005-08-29 14:11:00 +00:00
Paul Smith
6636dc1d5c If we're on a DOS/W32/OS2 system and we're not using a unixy shell, don't
follow POSIX backslash/newline conventions.

Use a different method for testing the SHELL variable, which hopefully
will work better on non-UNIX systems.
2005-08-25 04:40:10 +00:00
Boris Kolpackov
bf58e35105 Wrapped calls to $(wildcard ) with $(sort) so that the resulting order
is no longer filesystem-dependant.
2005-08-13 19:24:49 +00:00
Boris Kolpackov
e437226241 Fixed Savannah bug #13881. 2005-08-10 10:21:13 +00:00
Paul Smith
b237dff775 - Fixed a bug reported by Michael Matz regarding handling of parallel
jobs after a failed job.
- Enhancements to WINDOWS32 code from Eli Zaretskii.
- Add Microsoft Project files from J. Grant.
2005-08-08 05:08:00 +00:00
Paul Smith
a53903e4c3 Add Indonesian translation. 2005-07-15 05:05:32 +00:00
Paul Smith
1e9dc3ce45 Various minor updates and code cleanups. 2005-07-12 04:35:13 +00:00
Paul Smith
0e30f46a62 Various fixes and updates from testers of the beta3 release (mostly Windows
and OS/2 changes).
2005-07-04 03:50:59 +00:00
Paul Smith
7dfa2461c3 Cleaned up some problems found with the tests running on a powerful
Solaris system with an EMC NFS storage solution.  Still get some odd
errors here unfortunately related to sub-second timestamps that I just
can't figure out.  It all works if we run the tests in /tmp instead
though :-/.
2005-06-27 22:18:47 +00:00
Paul Smith
261d7b44fa Make sure timestamp problems don't cause the -W test to fail. 2005-06-27 18:53:46 +00:00
Paul Smith
b581e1350f Fixes for some Windows/MSC compile issues.
wget command line option seems to have changed?
2005-06-27 15:40:56 +00:00
Paul Smith
a36cfed31a Date update. 2005-06-27 01:01:54 +00:00
Paul Smith
da1b137e38 Fix strerror() handling for systems which set ANSI_STRING.
Don't print errors if "include" is specified with no arguments.
New test suite for the $(shell ...) function.
2005-06-27 01:01:07 +00:00
Paul Smith
d6a7894d3a Fix Savannah bug # 1332: handle backslash-newline pairs in command scripts
according to POSIX rules.
2005-06-26 03:31:29 +00:00
Paul Smith
f388233b03 Fix Savannah bug # 13478. If -L is given, take the latest mtime for a
symlink even if it is "dangling" (it doesn't resolve to a real file).
2005-06-25 23:00:17 +00:00
Paul Smith
6cdaff0948 Fix Savannah bug #1454: skip over semicolons (and comments) inside variable
references in target definition lines.
2005-06-25 21:30:13 +00:00
Paul Smith
1dd9ed1c05 Fix -W foo yielding infinite recursion in some cases of re-exec.
Added a -W test suite.
2005-06-25 20:00:24 +00:00
Paul Smith
978819e1d6 Add a new variable: MAKE_RESTARTS, to count how many times make has re-exec'd.
When rebuilding makefiles, unset -B if MAKE_RESTARTS is >0.
2005-06-25 18:57:28 +00:00
Paul Smith
467115baae Fix Savannah bug # 1328: if stdout is redirected to a full filesystem, we
check for this and exit with an error.
The closeout.c version from gnulib pulls in too much other stuff, and
gnulib requires an ANSI C 89 compliant compiler, while GNU make (so far)
still wants to work on K&R.
2005-06-12 22:22:07 +00:00
Paul Smith
974d14ac4f Fixes for VMS from Hartmut Becker. 2005-06-10 20:16:28 +00:00
Paul Smith
dd30b0552f Fix Savannah bug #11913: ensure that scopes such as foreach, etc. take
precedence over the global scope when they're used in a global context
(such as an eval).
2005-06-09 19:19:20 +00:00
Boris Kolpackov
af88a3550a Fixed Savannah bugs #13216 and #13218. 2005-05-31 20:54:30 +00:00
Paul Smith
e50e0fdf88 Implement new "if... else if... endif" semantics. 2005-05-13 12:45:30 +00:00
Paul Smith
26d8d00cb7 Fixes to allow "make dist" etc. to work again. 2005-05-10 01:38:18 +00:00
Paul Smith
e4c14a675c Document the secondary expansion method. Also, some other documentation
cleanups.

If we find a make error (invalid makefile syntax or something like that)
write back any tokens we have before we exit.

If we have waiting jobs (using -j + -l) set an alarm before we sleep on
the read() system call, so we can wake up to check the load and start
waiting jobs, if there are long-running jobs we would otherwise be
waiting for.  Suggested by Grant Taylor.
2005-05-08 16:50:58 +00:00
Paul Smith
9d5b5bd2f5 Fix problems with losing tokens in the jobserver, reported by Grant
Taylor.  There are two forms of this: first, it was possible to lose
tokens when using -j and -l at the same time, because waiting jobs were
not checked when determining whether any jobs were outstanding.  Second,
if you had an exported recursive variable that contained a $(shell ...)
function there is a possibility to lose tokens, since a token was taken
but the child list was not updated until after the shell function was
complete.

To resolve this I introduced a new variable that counted the number of
tokens we have obtained, rather than checking whether there were any
children on the list.  I also added some sanity checks to make sure we
weren't writing back too many or not enough tokens.  And, the master
make will drain the token pipe before exiting and compare the count of
tokens at the end to what was written there at the beginning.

Also:
  * Ensure a bug in the environment (missing "=") doesn't cause make to core.
  * Rename the .DEFAULT_TARGET variable to .DEFAULT_GOAL, to match the
    terminology in the documentation and other variables like MAKECMDGOALS.
  * Add documentation of the .DEFAULT_GOAL special variable.

Still need to document the secondary expansion stuff...
2005-05-03 13:57:20 +00:00
Paul Smith
49ee105c68 Fix performance degradation introduced by the second expansion feature.
I did this by adding intelligence into the algorithm such that the
second expansion was only actually performed when the prerequisite list
contained at least one "$", so we knew it is actually needed.

Without this we were using up a LOT more memory, since every single
target (even ones never used by make) had their file variables
initialized.  This also used a lot more CPU, since we needed to create
and populate a new variable hash table for every target.

There is one issue remaining with this feature: it leaks memory.  In
pattern_search() we now initialize the file variables for every pattern
target, which allocates a hash table, etc.  However, sometimes we
recursively invoke pattern_search() (for intermediate files) with an
automatic variable (alloca() I believe) as the file.  When that function
returns, obviously, the file variable hash memory is lost.
2005-04-13 03:16:33 +00:00
Paul Smith
3daf8df6ee Fix some Savannah bugs.
Updates to docs (still need more work here) and NEWS file.
New language.
2005-04-08 12:51:20 +00:00
Boris Kolpackov
4923580e3a Fixed Savannah bug #12320. 2005-03-15 15:31:47 +00:00
Boris Kolpackov
d584d0c1c6 Fixed Savannah bug #12267. 2005-03-10 09:14:09 +00:00
Boris Kolpackov
18251c4633 Fixed Savannah bug #12266. 2005-03-09 19:21:34 +00:00
Boris Kolpackov
2860d3b247 Fixed Savannah bug #12202. 2005-03-04 14:31:09 +00:00
Paul Smith
28078b517a - Missing docs for $|
- Update NEWS and AUTHORS files.
- Fix support request #103195.
- Apply patch #3679
- Fix handling of sys_siglist in autoconf/etc.
2005-03-04 12:52:32 +00:00
Boris Kolpackov
cb2f200269 Fixed stem termination and stem triple-expansion bugs. 2005-03-03 17:39:48 +00:00
Boris Kolpackov
0759af440a Fixed Savannah bug #12180. 2005-03-01 08:01:05 +00:00
Paul Smith
a2232470c2 - Fix bug #7144 (infinite loop sometimes with -q and double-colon rules)
- Resolve support request #103195 (rationalize wordlist fn arguments)
2005-02-28 09:41:25 +00:00
Paul Smith
d2516343bc * New feature: -L option
* New function: $(info ...)
* Disallow $(eval ...) to create prereq relationships inside command scripts
  (caused core dumps)
* Try to allow more tests to succeed in Windows/DOS by sanitizing CRLF and \
* Various bug fixes and code cleanups (see the ChangeLog entry)
2005-02-28 07:48:22 +00:00
Boris Kolpackov
93bd1bd93c Implementation of the .DEFAULT_TARGET special variable. 2005-02-27 22:24:30 +00:00
Boris Kolpackov
659fc6b55e Implementation of the second expansion in explicit
rules, static pattern rules and implicit rules.
2005-02-27 21:40:23 +00:00
Paul Smith
9d153cc1b1 Add configure operations to support MINGW on Windows. 2005-02-26 01:41:48 +00:00
Paul Smith
6d995b036e Update NEWS file. 2005-02-16 05:38:10 +00:00
Paul Smith
e8ca9b8eb1 Add a patch from Paul Eggert that's been lying around in my directory for
a long time, disabling stack size limits where possible.

Update version to beta2.
2005-02-16 05:03:42 +00:00
Paul Smith
c90f47e832 Flush stdout after printing directory info.
Fix references to MINGW #define constants.
Remove WINDOWS32 ifdef from sub_proc.h.
Only add variables to the command line for recursion once.
New features in run_make_test: #PWD# and #MAKEPATH# replacements.
Test the multi-variable fix in the recursion regression test.
2005-02-10 00:10:57 +00:00
Paul Smith
939167cfc1 Add a new Irish (ga) translation.
Fixed the CVS download URL to be simplified.
Fixed the .texi doc download: the ftp site was decommed so use CVS.
2005-02-09 21:28:00 +00:00
Paul Smith
1ce563a181 Add a Finnish translation.
Update the URL for the GNU translation site in maintMakefile; the old one
stopped working.
2005-02-01 23:02:17 +00:00
Paul Smith
dff0be9e68 Handle build.sh in a better way (recommendation from the automake mailing
list).
2004-12-06 15:03:45 +00:00
Paul Smith
6c21790595 Fix bug with SHELL handling: make sure the variable struct is initialized. 2004-12-05 18:09:31 +00:00
Paul Smith
6c9e53d648 Fix problems with README and build.sh
Apply an old patch from Paul Eggert.
2004-11-30 20:58:52 +00:00
Boris Kolpackov
49ca261bd5 Implemented realpath' and abspath' built-in functions. 2004-11-30 19:51:24 +00:00
Paul Smith
be6a8bc869 Fix bug #10252: Remove any trailing slashes from -C arguments (WINDOWS32).
Add a regression test for "@" before a define/enddef vs. one inside.
2004-11-29 01:35:13 +00:00
Paul Smith
539f513773 Fix for bug #1276: Handle SHELL according to POSIX requirements.
POSIX requires that the value of SHELL in the makefile NOT be exported
to sub-commands.  Instead, the value in the environment when make was
invoked should be passed to the environment of sub-commands.  Note that
make still uses SHELL to _run_ sub-commands; it just doesn't change the
value of the SHELL variable in the environment of sub-commands.

As an extension to POSIX, if the makefile explicitly exports SHELL then
GNU make _will_ use it in the environment of sub-commands.
2004-11-28 23:11:23 +00:00
Paul Smith
d27cac1598 Fix WINDOWS32 bug #11155 with patch from Alessandro Vesely. 2004-11-28 16:58:51 +00:00
Paul Smith
e8e4c19873 Patch for command line parsing for VMS from Hartmut Becker. 2004-11-12 21:30:20 +00:00
Boris Kolpackov
547abfa13e New $(lastword ) built-in function: implementation, documentation and tests. 2004-10-21 17:42:24 +00:00
Paul Smith
71fd6bfa1c Apply patch from Alessandro Vesely for WINDOWS32-specific bug # 9748. 2004-10-06 13:09:22 +00:00
Boris Kolpackov
b0d67e0e15 Moved expansion of simple pattern-specific variables from the rebuild stage
to the read stage.
2004-10-05 16:56:14 +00:00
Boris Kolpackov
fb6410f435 Implemented dontcare flag inheritance when rebuilding makefiles. 2004-09-28 18:13:55 +00:00
Boris Kolpackov
341312cc57 bugfix for exported pattern-specific variables 2004-09-27 18:09:52 +00:00
Paul Smith
29d78ddb28 Update the test template. A few fixes in run_make_test().
Rename implicit_prereq_eval to patternrules, to be the start of a suite
of tests of pattern rules.
2004-09-22 04:36:17 +00:00
Boris Kolpackov
73e7767ffc Fixed bug in implicit rule prerequisite evaluation code. Added test. 2004-09-21 20:23:12 +00:00
Paul Smith
6e51d9c90a Some code cleanups and efficiency enhancements. As far as I can tell
none of these have impacts that are visible to the user (although in
some cases that appears to be nothing more than dumb luck :-/).
2004-09-21 13:51:58 +00:00
Paul Smith
704c60cec0 Remove sindex() and replace with strstr().
Windows: allow users to set SHELL to cmd.exe and have it behave as if no
UNIX shell were found.
2004-09-21 12:07:12 +00:00
Paul Smith
9714e501fb Add some more unit tests for variable flavors.
Allow run_make_tests() to be invoked with an undef makefile string, in
which case it re-uses the previous string.
2004-09-21 05:39:04 +00:00
Paul Smith
0799ce730d Fix some bugs in variable pattern substitution (e.g. $(VAR:A=B)),
reported by Markus Mauhart <qwe123@chello.at>.  One was a simple typo; to
fix the other we call patsubst_expand() for all instances of variable
substitution, even when there is no '%'.  We used to call subst_expand()
with a special flag set in the latter case, but it didn't work properly
in all situations.  Easier to just use patsubst_expand() since that's
what it is.
2004-09-21 04:00:31 +00:00
Paul Smith
08c8105c54 Various enhancements
- OS/2 Patches
  - OpenVMS updates
  - Sanitize the handling of -include/sinclude with and without -k
  - Fix the setting of $< for order-only rules.
2004-05-16 19:16:52 +00:00
Paul Smith
e334942e57 Numerous updates and bug fixes.
A number of W32 cleanups from J.Grant.
A number of OS/2 cleanups from Andreas Buening.
Various random bug fixes.
2004-03-22 15:11:48 +00:00
Paul Smith
f305a52c02 Don't use __STDC__; some compilers don't set it properly.
Use autoconf's test to set HAVE_ANSI_COMPILER and check that instead.
2004-03-06 08:05:17 +00:00
Paul Smith
213ccc2234 More maintainer rules. 2004-03-06 08:00:17 +00:00
Paul Smith
e3e3f15ebc Updates to automate generation of GNU upload artifacts.
Fix a problem compiling on old, pre-ANSI systems.  getloadavg test is still
broken, but make builds.
Document a breakage on SunOS 4.x systems.
2004-03-04 13:42:51 +00:00
Paul Smith
59306b0223 Fix the origin regression test.
Remove sample code from make.h I accidentally left behind.
2004-02-25 19:30:27 +00:00
Paul Smith
be5b33e876 Add in HAVE_STDARG_H to the various port config files. 2004-02-25 01:23:13 +00:00
Paul Smith
f29b86c314 Many compiler warning cleanups.
Small fixes for W32 (from Jonathan Grant  <jg-make@jguk.org>)
Maintainer enhancements to clean up the tree.
2004-02-24 13:50:19 +00:00
Paul Smith
be8c3dbc97 Numerous fixes: patches for OS/2; core for -f ''; makefile updates. 2004-02-23 06:25:54 +00:00
Paul Smith
fafeb87027 VMS fix. 2004-02-21 17:10:41 +00:00
Paul Smith
1f16ee5c2d Many bug fixes etc.
- Apply a fix for the "thundering herd" problem when using "-j -l".
  This also fixes bug #4693.
- Fix bug #7257: allow functions as ifdef arguments
- Fix bug #4518: make sure we print all double-colon rules with -p.
- Upgrade to autconf 2.58/automake 1.8/gettext 0.13.1
- Various doc cleanups, etc.
2004-01-21 06:32:59 +00:00
Paul Smith
2b3ee46f4e Enhancements to the documentation (fixes bugs #1772 and 4898).
Add "!" to the list of shell escape characters: POSIX sh allows it to be
used to negate the return value of the command.
2004-01-08 03:17:08 +00:00
Paul Smith
a35db90275 Fix order-only prerequisites for pattern rules. (Savannah patch #2349).
Add a regression test for this.

Older libraries don't allow *alloc(0), so make sure we don't ever do that.
2004-01-07 19:36:39 +00:00
Paul Smith
ee3d37a591 Fix bugs 5798 and 6195. 2003-11-04 07:40:29 +00:00
Paul Smith
76f034acaa Added MINGW32 changes.
This commits a number of changes from Earnie Boyd that allows GNU make
to build for MINGW32 systems.  Only missing from this commit are the
changes to configure.in etc.; I'm waiting for Earnie to sign papers for
those new files.

Also not here is any README.mingw32 etc. which would explain how to use
this port.
2003-11-03 22:04:09 +00:00
Paul Smith
74216b00a4 Build fixes due to changes in the FSF web site.
Add new language support.
Minor configure, etc. cleanups.
2003-10-22 04:35:27 +00:00
Paul Smith
db401d8e0a Updated for autoconf 2.57, automake 1.7.6, and gettext 0.12.1.
Fixed problems with the dist target (adding missing files).
Workaround for a bug in gettext 0.12.1 po/Makefile.in.in where distclean
wasn't cleaning everything, which caused distcheck to fail.
2003-07-31 13:04:32 +00:00
Paul Smith
e3986eea43 Minor updates for Windows and OS/2. 2003-07-19 02:46:25 +00:00
Paul Smith
1a5beef51f - Fix bug #1405: allow multiple pattern-specific variables to match a target.
- Fix some uncleanliness about the implementation of patterns-specific vars.
- Some enhancements to the OS/2 port.
2003-05-02 01:44:59 +00:00
Paul Smith
652234e967 Fix bug #2515: the .SECONDARY target with no prerequisites wasn't
behaving properly (if you listed prerequisites it worked properly).
2003-03-28 06:31:44 +00:00
Paul Smith
acb2e64966 Fix bug #2892.
More OS/2 updates from Andreas Buening.
Upgrade build system to autoconf 2.57 and automake 1.7.3.
2003-03-25 03:21:42 +00:00
Paul Smith
276d0c7c64 Fix bug #2846. 2003-03-25 02:46:42 +00:00
Paul Smith
955899ef77 Commit fix for bug #1418.
Upgrade to require autoconf 2.56.
Fix a pathological performance hit substituting in large values with
lots of words.
2003-03-25 00:15:25 +00:00
Paul Smith
4068c5e4a3 Add support for OS/2, contributed by Andreas Buening <andreas.buening@nexgo.de>
Also a small patch from Hartmut Becker <Hartmut.Becker@compaq.com> for VMS.
2003-03-24 23:14:15 +00:00
Paul Smith
1fa3db1468 Fix bug #2238: the read.c:eval() function was not entirely reentrant.
Apply patch #1022: fix a memory corruption on very long target-specific
variable definition lines.
2003-01-30 07:49:17 +00:00
Paul Smith
b7c728046e Enhancement (bug #2407) Make error messages more clear. 2003-01-30 06:21:36 +00:00
Paul Smith
d33ff30145 Portability fix for glob.h building in FreeBSD ports system.
Implement a fix for bug # 2169: too many OSs, even major OSs like Solaris,
don't properly implement SA_RESTART: important system calls like stat() can
still fail when SA_RESTART is set.  So, forget the BROKEN_RESTART config
check and get rid of atomic_stat() and atomic_readdir(), and implement
permanent wrappers for EINTR checking on various system calls (stat(),
fstat(), opendir(), and readdir() so far).
2003-01-30 05:22:52 +00:00
Paul Smith
d15a484098 Fix bug #1744: mask extra arguments to recursive invocations of $(call ...) 2003-01-22 13:45:44 +00:00
Paul Smith
dd70c67ea4 Added Ukrainian translation. 2002-12-19 14:31:45 +00:00
Paul Smith
b04a205f3e Add hash.c etc. to various non-UNIX makefiles. 2002-11-19 04:39:15 +00:00
Paul Smith
d696707cb5 Fix eval bugs 1516 and 1517. 2002-10-25 22:01:47 +00:00
Paul Smith
bd108cf45c A few minor fixes to the manual and automake files. 2002-10-25 18:42:52 +00:00
Paul Smith
6374309c6d Convert the source code to use ANSI C style function definitions and
enable the automake ansi2knr capability.

Right now this doesn't quite build using a K&R compiler because of a
problem with the loadavg test program, but the rest of the code works.  I'm
asking the automake list about this problem.
2002-10-14 21:54:04 +00:00
Paul Smith
8bbdbb02b3 Fix bug#1379: don't use alloca() where it could overrun the stack size.
Implemented enhancement #1391: allow "export" in target-specific
variable definitions.

Change the Info name of the "Automatic" node to "Automatic Variables".
Add text clarifying the scope of automatic variables to that section.
2002-10-13 18:50:10 +00:00
Paul Smith
47cd8d4624 Fix core dump on malformed variable line (Debian bug #81656)
Allow SysV-style variable references to use {} in addition to ().
Add variable.h to the POTFILES.in since it has a translatable string.
2002-10-05 13:45:47 +00:00
190 changed files with 16919 additions and 6585 deletions

View File

@@ -11,7 +11,7 @@ makebook*
*.dep *.dvi *.toc *.aux *.log *.dep *.dvi *.toc *.aux *.log
*.cp *.cps *.fn *.fns *.vr *.vrs *.tp *.tps *.ky *.kys *.pg *.pgs *.cp *.cps *.fn *.fns *.vr *.vrs *.tp *.tps *.ky *.kys *.pg *.pgs
README README.DOS README.W32 README README.DOS README.W32 README.OS2
aclocal.m4 autom4te.cache aclocal.m4 autom4te.cache
config.h.in config.h config.status config.cache configure config.h.in config.h config.status config.cache configure
Makefile.in Makefile Makefile.in Makefile
@@ -30,3 +30,5 @@ hp700 hp834 mips sol2 i486-linux
customs customs
install-sh mkinstalldirs install-sh mkinstalldirs
.directive.asc

29
AUTHORS
View File

@@ -7,6 +7,9 @@ GNU make development up to version 3.75 by:
Development starting with GNU make 3.76 by: Development starting with GNU make 3.76 by:
Paul D. Smith <psmith@gnu.org> Paul D. Smith <psmith@gnu.org>
Additional development starting with GNU make 3.81 by:
Boris Kolpackov <boris@kolpackov.net>
GNU Make User's Manual GNU Make User's Manual
Written by: Written by:
@@ -23,6 +26,7 @@ GNU make porting efforts:
Port to VMS by: Port to VMS by:
Klaus Kaempf <kkaempf@progis.de> Klaus Kaempf <kkaempf@progis.de>
Hartmut Becker <Hartmut.Becker@hp.com>
Archive support/Bug fixes by: Archive support/Bug fixes by:
John W. Eaton <jwe@bevo.che.wisc.edu> John W. Eaton <jwe@bevo.che.wisc.edu>
Martin Zinser <zinser@decus.decus.de> Martin Zinser <zinser@decus.decus.de>
@@ -30,11 +34,13 @@ GNU make porting efforts:
Port to Amiga by: Port to Amiga by:
Aaron Digulla <digulla@fh-konstanz.de> Aaron Digulla <digulla@fh-konstanz.de>
Port to MS-DOS (DJGPP), OS/2, and MS-Windows (native/MinGW) by:
Port to MS-DOS (DJGPP) and MS-Windows 95/NT by:
DJ Delorie <dj@delorie.com> DJ Delorie <dj@delorie.com>
Rob Tulloh <rob_tulloh@tivoli.com> Rob Tulloh <rob_tulloh@tivoli.com>
Eli Zaretskii <eliz@is.elta.co.il> Eli Zaretskii <eliz@is.elta.co.il>
Jonathan Grant <jg@jguk.org>
Andreas Beuning <andreas.buening@nexgo.de>
Earnie Boyd <earnie@uses.sf.net>
----------------------------------- -----------------------------------
Other contributors: Other contributors:
@@ -47,7 +53,9 @@ Other contributors:
Jim Kelton <jim_kelton@tivoli.com> Jim Kelton <jim_kelton@tivoli.com>
David Lubbren <uhay@rz.uni-karlsruhe.de> David Lubbren <uhay@rz.uni-karlsruhe.de>
Tim Magill <tim.magill@telops.gte.com> Tim Magill <tim.magill@telops.gte.com>
Markus Mauhart <qwe123@chello.at>
Greg McGary <greg@mcgary.org> Greg McGary <greg@mcgary.org>
Thomas Riedl <thomas.riedl@siemens.com>
Han-Wen Nienhuys <hanwen@cs.uu.nl> Han-Wen Nienhuys <hanwen@cs.uu.nl>
Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
Carl Staelin (Princeton University) Carl Staelin (Princeton University)
@@ -55,3 +63,20 @@ Other contributors:
With suggestions/comments/bug reports from a cast of ... well ... With suggestions/comments/bug reports from a cast of ... well ...
hundreds, anyway :) hundreds, anyway :)
-------------------------------------------------------------------------------
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
GNU Make; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

1911
ChangeLog

File diff suppressed because it is too large Load Diff

View File

@@ -4879,7 +4879,7 @@ Sun Jul 24 02:15:30 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
* variable.c (expand_function): Made `foreach' function put * variable.c (expand_function): Made `foreach' function put
spaces between output texts like it's supposed to. spaces between output texts like it's supposed to.
Sat Jul 23 17:32:55 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU) Sat Jul 23 17:32:55 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
* rule.c (default_suffixes, default_suffix_rules): Added rule * rule.c (default_suffixes, default_suffix_rules): Added rule
@@ -4909,20 +4909,20 @@ Fri Jul 22 23:13:16 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
* commands.c (execute_file_commands): Fixed a bug wherein * commands.c (execute_file_commands): Fixed a bug wherein
random memory could get written for files with no deps. random memory could get written for files with no deps.
Wed Jul 20 19:30:31 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU) Wed Jul 20 19:30:31 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
* read.c (readline): Fix bug wherein it would not recognize a * read.c (readline): Fix bug wherein it would not recognize a
backslash-newline if the buffer filled up and was enlarged backslash-newline if the buffer filled up and was enlarged
right before reading the newline. right before reading the newline.
Tue Jul 19 19:55:02 1988 Roland McGrath (mcgrath at chilli.Berkeley.EDU) Tue Jul 19 19:55:02 1988 Roland McGrath (mcgrath at chilli.Berkeley.EDU)
* read.c: Added default suffix rules for .cc (using $(C++), * read.c: Added default suffix rules for .cc (using $(C++),
which defaults to `g++', and $(C++FLAGS)), .tex, .dvi, .web which defaults to `g++', and $(C++FLAGS)), .tex, .dvi, .web
and .cweb (using $(TEX), $(WEAVE), $(TANGLE), $(CWEAVE) and and .cweb (using $(TEX), $(WEAVE), $(TANGLE), $(CWEAVE) and
$(CTANGLE)). $(CTANGLE)).
Sat Jul 16 21:24:28 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU) Sat Jul 16 21:24:28 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
* Made error formats use %u rather than %ld for line numbers, * Made error formats use %u rather than %ld for line numbers,
@@ -4972,9 +4972,27 @@ Sat Jul 16 21:24:28 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
* variable.c (pattern_matches): Fix a bug that made patterns * variable.c (pattern_matches): Fix a bug that made patterns
not beginning with `%' never match. not beginning with `%' never match.
Fri Jul 15 21:01:44 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU) Fri Jul 15 21:01:44 1988 Roland McGrath (mcgrath at tully.Berkeley.EDU)
* Took Make out of RCS. * Took Make out of RCS.
* Split the monolithic `make.c' into several smaller files. * Split the monolithic `make.c' into several smaller files.
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
GNU Make; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

View File

@@ -1,18 +1,3 @@
2000-06-23 Paul D. Smith <psmith@gnu.org>
* main.c (main): Replace EXIT_SUCCESS, EXIT_FAILURE, and
EXIT_TROUBLE with MAKE_SUCCESS, MAKE_FAILURE, and MAKE_TROUBLE.
* make.h: Define these macros.
* Version 3.79.1 released.
* configure.in: Add a new option, --disable-nsec-timestamps, to
avoid using sub-second timestamps on systems that support it. It
can lead to problems, e.g. if your makefile relies on "cp -p".
* README.template: Document the issue with "cp -p".
* config.guess, config.sub: Updated.
2000-06-22 Paul D. Smith <psmith@gnu.org> 2000-06-22 Paul D. Smith <psmith@gnu.org>
* job.c (start_job_command): Increment commands_started before the * job.c (start_job_command): Increment commands_started before the
@@ -6645,4 +6630,25 @@ Fri Nov 1 19:34:28 1991 Roland McGrath (roland@churchy.gnu.ai.mit.edu)
See ChangeLog.1 for earlier changes. See ChangeLog.1, available in the CVS repository at:
http://savannah.gnu.org/cvs/?group=make
for earlier changes.
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
2001, 2002, 2003, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
GNU Make; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

170
INSTALL
View File

@@ -1,25 +1,43 @@
Installation Instructions
*************************
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004 Free
Software Foundation, Inc.
This file is free documentation; the Free Software Foundation gives
unlimited permission to copy, distribute and modify it.
Basic Installation Basic Installation
================== ==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package. those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file you can run in the future to recreate the current configuration, and a
`config.cache' that saves the results of its tests to speed up file `config.log' containing compiler output (useful mainly for
reconfiguring, and a file `config.log' containing compiler output debugging `configure').
(useful mainly for debugging `configure').
It can also use an optional file (typically called `config.cache'
and enabled with `--cache-file=config.cache' or simply `-C') that saves
the results of its tests to speed up reconfiguring. (Caching is
disabled by default to prevent problems with accidental use of stale
cache files.)
If you need to do unusual things to compile the package, please try If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache' be considered for the next release. If you are using the cache, and at
contains results you don't want to keep, you may remove or edit it. some point `config.cache' contains results you don't want to keep, you
may remove or edit it.
The file `configure.in' is used to create `configure' by a program The file `configure.ac' (or `configure.in') is used to create
called `autoconf'. You only need `configure.in' if you want to change `configure' by a program called `autoconf'. You only need
it or regenerate `configure' using a newer version of `autoconf'. `configure.ac' if you want to change it or regenerate `configure' using
a newer version of `autoconf'.
The simplest way to compile this package is: The simplest way to compile this package is:
@@ -34,13 +52,7 @@ The simplest way to compile this package is:
2. Type `make' to compile the package. 2. Type `make' to compile the package.
If you're building GNU make on a system which does not already have 3. Optionally, type `make check' to run any self-tests that come with
a `make', you can use the build.sh shell script to compile. Run
`sh ./build.sh'. This should compile the program in the current
directory. Then you will have a Make program that you can use for
`make install', or whatever else.
3. Optionally, type `./make check' to run any self-tests that come with
the package. the package.
4. Type `make install' to install the programs and any data files and 4. Type `make install' to install the programs and any data files and
@@ -58,20 +70,22 @@ The simplest way to compile this package is:
Compilers and Options Compilers and Options
===================== =====================
Some systems require unusual options for compilation or linking that Some systems require unusual options for compilation or linking that the
the `configure' script does not know about. You can give `configure' `configure' script does not know about. Run `./configure --help' for
initial values for variables by setting them in the environment. Using details on some of the pertinent environment variables.
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this: You can give `configure' initial values for configuration parameters
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure by setting variables in the command line or in the environment. Here
is an example:
./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures Compiling For Multiple Architectures
==================================== ====================================
You can compile the package for more than one kind of computer at the You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the supports the `VPATH' variable, such as GNU `make'. `cd' to the
@@ -79,28 +93,28 @@ directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'. source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH' If you have to use a `make' that does not support the `VPATH'
variable, you have to compile the package for one architecture at a time variable, you have to compile the package for one architecture at a
in the source code directory. After you have installed the package for time in the source code directory. After you have installed the
one architecture, use `make distclean' before reconfiguring for another package for one architecture, use `make distclean' before reconfiguring
architecture. for another architecture.
Installation Names Installation Names
================== ==================
By default, `make install' will install the package's files in By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an `/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'. option `--prefix=PREFIX'.
You can specify separate installation prefixes for You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use give `configure' the option `--exec-prefix=PREFIX', the package will
PATH as the prefix for installing programs and libraries. use PREFIX as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix. Documentation and other data files will still use the regular prefix.
In addition, if you use an unusual directory layout you can give In addition, if you use an unusual directory layout you can give
options like `--bindir=PATH' to specify different values for particular options like `--bindir=DIR' to specify different values for particular
kinds of files. Run `configure --help' for a list of the directories kinds of files. Run `configure --help' for a list of the directories
you can set and what kinds of files go in them. you can set and what kinds of files go in them.
@@ -111,7 +125,7 @@ option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features Optional Features
================= =================
Some packages pay attention to `--enable-FEATURE' options to Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package. `configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The is something like `gnu-as' or `x' (for the X Window System). The
@@ -126,48 +140,81 @@ you can use the `configure' options `--x-includes=DIR' and
Specifying the System Type Specifying the System Type
========================== ==========================
There may be some features `configure' can not figure out There may be some features `configure' cannot figure out automatically,
automatically, but needs to determine by the type of host the package but needs to determine by the type of machine the package will run on.
will run on. Usually `configure' can figure that out, but if it prints Usually, assuming the package is built to be run on the _same_
a message saying it can not guess the host type, give it the architectures, `configure' can figure that out, but if it prints a
`--host=TYPE' option. TYPE can either be a short name for the system message saying it cannot guess the machine type, give it the
type, such as `sun4', or a canonical name with three fields: `--build=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM CPU-COMPANY-SYSTEM
See the file `config.sub' for the possible values of each field. If where SYSTEM can have one of these forms:
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
If you are building compiler tools for cross-compiling, you can also OS KERNEL-OS
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the `--target=TYPE' option to select the type of system they will use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of produce code for.
system on which you are compiling the package.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with `--host=TYPE'.
Sharing Defaults Sharing Defaults
================ ================
If you want to set default values for `configure' scripts to share, If you want to set default values for `configure' scripts to share, you
you can create a site shell script called `config.site' that gives can create a site shell script called `config.site' that gives default
default values for variables like `CC', `cache_file', and `prefix'. values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then `configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the `PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script. `CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script. A warning: not all `configure' scripts look for a site script.
Operation Controls Defining Variables
================== ==================
`configure' recognizes the following options to control how it Variables not defined in a site shell script can be set in the
operates. environment passed to `configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the `configure' command line, using `VAR=value'. For example:
`--cache-file=FILE' ./configure CC=/usr/local2/bin/gcc
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for will cause the specified gcc to be used as the C compiler (unless it is
debugging `configure'. overridden in the site shell script).
`configure' Invocation
======================
`configure' recognizes the following options to control how it operates.
`--help' `--help'
`-h'
Print a summary of the options to `configure', and exit. Print a summary of the options to `configure', and exit.
`--version'
`-V'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally `config.cache'. FILE defaults to `/dev/null' to
disable caching.
`--config-cache'
`-C'
Alias for `--cache-file=config.cache'.
`--quiet' `--quiet'
`--silent' `--silent'
`-q' `-q'
@@ -179,9 +226,6 @@ operates.
Look for the package's source code in directory DIR. Usually Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically. `configure' can determine that directory automatically.
`--version' `configure' also accepts some other, not widely useful, options. Run
Print the version of Autoconf used to generate the `configure' `configure --help' for more details.
script, and exit.
`configure' also accepts some other, not widely useful, options.

View File

@@ -1,10 +1,21 @@
# -*-Makefile-*- template for DJGPP # -*-Makefile-*- template for DJGPP
# Makefile.in generated automatically by automake 1.2 from Makefile.am # Makefile.in generated automatically by automake 1.2 from Makefile.am
#
# Copyright (C) 1994, 1995-1998, 1999, 2002 Free Software Foundation, Inc. # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
# This Makefile.DOS is free software; the Free Software Foundation # 2004, 2005, 2006 Free Software Foundation, Inc.
# gives unlimited permission to copy, distribute and modify it. # This file is part of GNU Make.
#
# GNU Make is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2, or (at your option) any later version.
#
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# GNU Make; see the file COPYING. If not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
SHELL = /bin/sh SHELL = /bin/sh
@@ -531,38 +542,3 @@ check-regression:
.NOEXPORT: .NOEXPORT:
# --------------- DEPENDENCIES # --------------- DEPENDENCIES
ar.o: ar.c make.h config.h gettext.h filedef.h dep.h glob/fnmatch.h
arscan.o: arscan.c make.h config.h gettext.h
commands.o: commands.c make.h config.h gettext.h dep.h filedef.h \
variable.h job.h commands.h
default.o: default.c make.h config.h gettext.h rule.h dep.h filedef.h \
job.h commands.h variable.h
dir.o: dir.c make.h config.h gettext.h glob/glob.h
expand.o: expand.c make.h config.h gettext.h filedef.h job.h commands.h \
variable.h rule.h
file.o: file.c make.h config.h gettext.h dep.h filedef.h job.h \
commands.h variable.h debug.h
function.o: function.c make.h config.h gettext.h filedef.h variable.h \
dep.h job.h commands.h debug.h
getopt.o: getopt.c config.h gettext.h getopt.h
getopt1.o: getopt1.c config.h getopt.h
implicit.o: implicit.c make.h config.h gettext.h rule.h dep.h filedef.h \
debug.h
job.o: job.c make.h config.h gettext.h job.h debug.h filedef.h \
commands.h variable.h
main.o: main.c make.h config.h gettext.h dep.h filedef.h variable.h \
job.h commands.h rule.h debug.h getopt.h
misc.o: misc.c make.h config.h gettext.h dep.h debug.h
read.o: read.c make.h config.h gettext.h glob/glob.h dep.h filedef.h \
job.h commands.h variable.h rule.h debug.h
remake.o: remake.c make.h config.h gettext.h filedef.h job.h commands.h \
dep.h variable.h debug.h
remote-stub.o: remote-stub.c make.h config.h gettext.h filedef.h job.h \
commands.h
rule.o: rule.c make.h config.h gettext.h dep.h filedef.h job.h \
commands.h variable.h rule.h
signame.o: signame.c make.h config.h gettext.h
variable.o: variable.c make.h config.h gettext.h dep.h filedef.h job.h \
commands.h variable.h rule.h
version.o: version.c config.h
vpath.o: vpath.c make.h config.h gettext.h filedef.h variable.h

View File

@@ -1,9 +1,34 @@
# This is a -*-Makefile-*-, or close enough # This is a -*-Makefile-*-, or close enough
#
# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
# Free Software Foundation, Inc.
# This file is part of GNU Make.
#
# GNU Make is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2, or (at your option) any later version.
#
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# GNU Make; see the file COPYING. If not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
AUTOMAKE_OPTIONS = 1.7 dist-bzip2 check-news AUTOMAKE_OPTIONS = 1.8 dist-bzip2 check-news ansi2knr
ACLOCAL_AMFLAGS = -I config ACLOCAL_AMFLAGS = -I config
SUBDIRS = glob config po doc MAKE_HOST = @MAKE_HOST@
# Only process if target is MS-Windows
if WINDOWSENV
MAYBE_W32 = w32
W32INC = -I $(top_srcdir)/w32/include
W32LIB = -Lw32 -lw32
endif
SUBDIRS = glob config po doc $(MAYBE_W32)
bin_PROGRAMS = make bin_PROGRAMS = make
@@ -13,41 +38,49 @@ else
remote = remote-stub.c remote = remote-stub.c
endif endif
make_SOURCES = ar.c arscan.c commands.c default.c dir.c expand.c file.c \ make_SOURCES = ar.c arscan.c commands.c default.c dir.c expand.c file.c \
function.c getopt.c getopt1.c implicit.c job.c main.c \ function.c getopt.c getopt1.c implicit.c job.c main.c \
misc.c read.c remake.c $(remote) rule.c signame.c \ misc.c read.c remake.c $(remote) rule.c signame.c \
variable.c version.c vpath.c hash.c strcache.c variable.c version.c vpath.c hash.c
EXTRA_make_SOURCES = remote-stub.c remote-cstms.c EXTRA_make_SOURCES = vmsjobs.c remote-stub.c remote-cstms.c
noinst_HEADERS = commands.h dep.h filedef.h job.h make.h rule.h variable.h \ noinst_HEADERS = commands.h dep.h filedef.h job.h make.h rule.h variable.h \
debug.h getopt.h gettext.h hash.h debug.h getopt.h gettext.h hash.h
make_LDADD = @LIBOBJS@ @ALLOCA@ $(GLOBLIB) @GETLOADAVG_LIBS@ @LIBINTL@ make_LDADD = @LIBOBJS@ @ALLOCA@ $(GLOBLIB) @GETLOADAVG_LIBS@ @LIBINTL@
# Only process if target is MS-Windows
if WINDOWSENV
make_LDADD += $(W32LIB)
endif
man_MANS = make.1 man_MANS = make.1
DEFS = -DLOCALEDIR=\"$(localedir)\" -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\" @DEFS@ DEFS = -DLOCALEDIR=\"$(localedir)\" -DLIBDIR=\"$(libdir)\" -DINCLUDEDIR=\"$(includedir)\" @DEFS@
AM_CPPFLAGS = $(GLOBINC) AM_CPPFLAGS = $(GLOBINC)
# Only process if target is MS-Windows
if WINDOWSENV
AM_CPPFLAGS += $(W32INC)
endif
# Extra stuff to include in the distribution. # Extra stuff to include in the distribution.
# Note we need all the glob stuff here, rather than in glob/Makefile.am,
# because often that directory isn't built on the systems used by the
# maintainers.
EXTRA_DIST = README build.sh.in $(man_MANS)\ EXTRA_DIST = README build.sh.in $(man_MANS) \
README.customs\ README.customs README.OS2 \
SCOPTIONS SMakefile\ SCOPTIONS SMakefile \
README.Amiga Makefile.ami config.ami make.lnk amiga.c amiga.h\ README.Amiga Makefile.ami config.ami make.lnk amiga.c amiga.h \
README.DOS Makefile.DOS configure.bat dosbuild.bat configh.dos\ README.DOS Makefile.DOS configure.bat dosbuild.bat configh.dos\
README.W32 NMakefile config.h.W32 build_w32.bat subproc.bat\ README.W32 NMakefile config.h.W32 build_w32.bat subproc.bat \
make_msvc_net2003.sln make_msvc_net2003.vcproj \
readme.vms makefile.vms makefile.com config.h-vms \ readme.vms makefile.vms makefile.com config.h-vms \
vmsdir.h vmsfunctions.c vmsify.c vmsdir.h vmsfunctions.c vmsify.c
MAKE_HOST = @MAKE_HOST@ # This is built during configure, but behind configure's back
DISTCLEANFILES = build.sh
# Forward targets # Forward targets
@@ -113,21 +146,18 @@ check-local: check-regression check-loadavg
.PHONY: check-loadavg check-regression .PHONY: check-loadavg check-regression
check-loadavg: loadavg check-loadavg: loadavg$(EXEEXT)
@echo The system uptime program believes the load average to be: @echo The system uptime program believes the load average to be:
-uptime -uptime
@echo The GNU load average checking code thinks: @echo The GNU load average checking code thinks:
-./loadavg -./loadavg$(EXEEXT)
# The loadavg function is invoked during "make check" to test getloadavg. # The loadavg function is invoked during "make check" to test getloadavg.
noinst_PROGRAMS = loadavg check_PROGRAMS = loadavg
loadavg_SOURCES = loadavg.c nodist_loadavg_SOURCES = getloadavg.c
loadavg_CFLAGS = -DTEST loadavg_CPPFLAGS = -DTEST
loadavg_LDADD = @GETLOADAVG_LIBS@ loadavg_LDADD = @GETLOADAVG_LIBS@
loadavg.c: $(srcdir)/getloadavg.c
cp $(srcdir)/getloadavg.c loadavg.c
# > check-regression # > check-regression
# #
# Look for the make test suite, and run it if found and we can find perl. # Look for the make test suite, and run it if found and we can find perl.
@@ -147,8 +177,8 @@ check-regression:
rm -f tests/$$f; ln -s ../srctests/$$f tests; \ rm -f tests/$$f; ln -s ../srctests/$$f tests; \
done; fi ;; \ done; fi ;; \
esac; \ esac; \
echo "cd tests && $(PERL) ./run_make_tests.pl -make ../make $(MAKETESTFLAGS)"; \ echo "cd tests && $(PERL) ./run_make_tests.pl -make ../make$(EXEEXT) $(MAKETESTFLAGS)"; \
cd tests && $(PERL) ./run_make_tests.pl -make ../make $(MAKETESTFLAGS); \ cd tests && $(PERL) ./run_make_tests.pl -make ../make$(EXEEXT) $(MAKETESTFLAGS); \
else \ else \
echo "Can't find a working Perl ($(PERL)); the test suite requires Perl."; \ echo "Can't find a working Perl ($(PERL)); the test suite requires Perl."; \
fi; \ fi; \
@@ -159,4 +189,10 @@ check-regression:
# --------------- Maintainer's Section # --------------- Maintainer's Section
# Tell automake that I haven't forgotten about this file and it will be
# created before we build a distribution (see maintMakefile in the CVS
# distribution).
README:
@MAINT_MAKEFILE@ @MAINT_MAKEFILE@

View File

@@ -1,23 +1,23 @@
# -*-Makefile-*- for GNU make on Amiga
#
# NOTE: If you have no `make' program at all to process this makefile, run # NOTE: If you have no `make' program at all to process this makefile, run
# `build.sh' instead. # `build.sh' instead.
# #
# Copyright (C) 1988, 89, 91, 92, 93, 94, 1995 Free Software Foundation, Inc. # Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006 Free Software Foundation, Inc.
# This file is part of GNU Make. # This file is part of GNU Make.
# #
# GNU Make is free software; you can redistribute it and/or modify # GNU Make is free software; you can redistribute it and/or modify it under the
# it under the terms of the GNU General Public License as published by # terms of the GNU General Public License as published by the Free Software
# the Free Software Foundation; either version 2, or (at your option) # Foundation; either version 2, or (at your option) any later version.
# any later version.
# #
# GNU Make is distributed in the hope that it will be useful, # GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
# but WITHOUT ANY WARRANTY; without even the implied warranty of # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
# GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License along with
# along with GNU Make; see the file COPYING. If not, write to # GNU Make; see the file COPYING. If not, write to the Free Software
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
# Boston, MA 02111-1307, USA.
# #
# Makefile for GNU Make # Makefile for GNU Make
@@ -119,16 +119,16 @@ CTAGS = ctags -w
objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o \ objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o \
rule.o implicit.o default.o variable.o expand.o function.o \ rule.o implicit.o default.o variable.o expand.o function.o \
vpath.o version.o ar.o arscan.o signame.o remote-$(REMOTE).o \ vpath.o version.o ar.o arscan.o signame.o strcache.o hash.o \
$(GETOPT) $(ALLOCA) $(extras) remote-$(REMOTE).o $(GETOPT) $(ALLOCA) $(extras)
srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c \ srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c \
$(srcdir)file.c $(srcdir)getloadavg.c $(srcdir)misc.c \ $(srcdir)file.c $(srcdir)getloadavg.c $(srcdir)misc.c \
$(srcdir)main.c $(srcdir)read.c $(srcdir)remake.c \ $(srcdir)main.c $(srcdir)read.c $(srcdir)remake.c \
$(srcdir)rule.c $(srcdir)implicit.c $(srcdir)default.c \ $(srcdir)rule.c $(srcdir)implicit.c $(srcdir)default.c \
$(srcdir)variable.c $(srcdir)expand.c $(srcdir)function.c \ $(srcdir)variable.c $(srcdir)expand.c $(srcdir)function.c \
$(srcdir)vpath.c $(srcdir)version.c \ $(srcdir)vpath.c $(srcdir)version.c $(srcdir)hash.c \
$(srcdir)remote-$(REMOTE).c \ $(srcdir)remote-$(REMOTE).c \
$(srcdir)ar.c $(srcdir)arscan.c \ $(srcdir)ar.c $(srcdir)arscan.c $(srcdir)strcache.c \
$(srcdir)signame.c $(srcdir)signame.h $(GETOPT_SRC) \ $(srcdir)signame.c $(srcdir)signame.h $(GETOPT_SRC) \
$(srcdir)commands.h $(srcdir)dep.h $(srcdir)filedep.h \ $(srcdir)commands.h $(srcdir)dep.h $(srcdir)filedep.h \
$(srcdir)job.h $(srcdir)make.h $(srcdir)rule.h \ $(srcdir)job.h $(srcdir)make.h $(srcdir)rule.h \
@@ -294,6 +294,7 @@ expand.o: expand.c make.h filedef.h job.h commands.h variable.h
function.o: function.c make.h filedef.h variable.h dep.h job.h \ function.o: function.c make.h filedef.h variable.h dep.h job.h \
commands.h amiga.h commands.h amiga.h
vpath.o: vpath.c make.h filedef.h variable.h vpath.o: vpath.c make.h filedef.h variable.h
strcache.o: strcache.c make.h hash.h
version.o: version.c version.o: version.c
ar.o: ar.c make.h filedef.h dep.h ar.o: ar.c make.h filedef.h dep.h
arscan.o: arscan.c make.h arscan.o: arscan.c make.h

181
NEWS
View File

@@ -1,16 +1,154 @@
GNU make NEWS -*-indented-text-*- GNU make NEWS -*-indented-text-*-
History of user-visible changes. History of user-visible changes.
03 October 2002 1 April 2006
Copyright (C) 2002 Free Software Foundation, Inc. See the end of this file for copyrights and conditions.
See the end for copying conditions.
All changes mentioned here are more fully described in the GNU make All changes mentioned here are more fully described in the GNU make
manual, which is contained in this distribution as the file make.texinfo. manual, 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 3.81
* GNU make is ported to OS/2.
* GNU make is ported to MinGW. The MinGW build is only supported by
the build_w32.bat batch file; see the file README.W32 for more
details.
* WARNING: Future backward-incompatibility!
Up to and including this release, the '$?' variable does not contain
any prerequisite that does not exist, even though that prerequisite
might have caused the target to rebuild. Starting with the _next_
release of GNU make, '$?' will contain all prerequisites that caused
the target to be considered out of date. See this Savannah bug:
http://savannah.gnu.org/bugs/index.php?func=detailitem&item_id=16051
* WARNING: Backward-incompatibility!
GNU make now implements a generic "second expansion" feature on the
prerequisites of both explicit and implicit (pattern) rules. In order
to enable this feature, the special target '.SECONDEXPANSION' must be
defined before the first target which takes advantage of it. If this
feature is enabled then after all rules have been parsed the
prerequisites are expanded again, this time with all the automatic
variables in scope. This means that in addition to using standard
SysV $$@ in prerequisites lists, you can also use complex functions
such as $$(notdir $$@) etc. This behavior applies to implicit rules,
as well, where the second expansion occurs when the rule is matched.
However, this means that when '.SECONDEXPANSION' is enabled you must
double-quote any "$" in your filenames; instead of "foo: boo$$bar" you
now must write "foo: foo$$$$bar". Note that the SysV $$@ etc. feature,
which used to be available by default, is now ONLY available when the
.SECONDEXPANSION target is defined. If your makefiles take advantage
of this SysV feature you will need to update them.
* WARNING: Backward-incompatibility!
In order to comply with POSIX, the way in which GNU make processes
backslash-newline sequences in command strings has changed. If your
makefiles use backslash-newline sequences inside of single-quoted
strings in command scripts you will be impacted by this change. See
the GNU make manual subsection "Splitting Command Lines" (node
"Splitting Lines"), in section "Command Syntax", chapter "Writing the
Commands in Rules", for details.
* WARNING: Backward-incompatibility!
Some previous versions of GNU make had a bug where "#" in a function
invocation such as $(shell ...) was treated as a make comment. A
workaround was to escape these with backslashes. This bug has been
fixed: if your makefile uses "\#" in a function invocation the
backslash is now preserved, so you'll need to remove it.
* New command-line option: -L (--check-symlink-times). On systems that
support symbolic links, if this option is given then GNU make will
use the most recent modification time of any symbolic links that are
used to resolve target files. The default behavior remains as it
always has: use the modification time of the actual target file only.
* The "else" conditional line can now be followed by any other valid
conditional on the same line: this does not increase the depth of the
conditional nesting, so only one "endif" is required to close the
conditional.
* All pattern-specific variables that match a given target are now used
(previously only the first match was used).
* Target-specific variables can be marked as exportable using the
"export" keyword.
* In a recursive $(call ...) context, any extra arguments from the outer
call are now masked in the context of the inner call.
* Implemented a solution for the "thundering herd" problem with "-j -l".
This version of GNU make uses an algorithm suggested by Thomas Riedl
<thomas.riedl@siemens.com> to track the number of jobs started in the
last second and artificially adjust GNU make's view of the system's
load average accordingly.
* New special variables available in this release:
- .INCLUDE_DIRS: Expands to a list of directories that make searches
for included makefiles.
- .FEATURES: Contains a list of special features available in this
version of GNU make.
- .DEFAULT_GOAL: Set the name of the default goal make will
use if no goals are provided on the command line.
- MAKE_RESTARTS: If set, then this is the number of times this
instance of make has been restarted (see "How Makefiles Are Remade"
in the manual).
- New automatic variable: $| (added in 3.80, actually): contains all
the order-only prerequisites defined for the target.
* New functions available in this release:
- $(lastword ...) returns the last word in the list. This gives
identical results as $(word $(words ...) ...), but is much faster.
- $(abspath ...) returns the absolute path (all "." and ".."
directories resolved, and any duplicate "/" characters removed) for
each path provided.
- $(realpath ...) returns the canonical pathname for each path
provided. The canonical pathname is the absolute pathname, with
all symbolic links resolved as well.
- $(info ...) prints its arguments to stdout. No makefile name or
line number info, etc. is printed.
- $(flavor ...) returns the flavor of a variable.
- $(or ...) provides a short-circuiting OR conditional: each argument
is expanded. The first true (non-empty) argument is returned; no
further arguments are expanded. Expands to empty if there are no
true arguments.
- $(and ...) provides a short-circuiting AND conditional: each
argument is expanded. The first false (empty) argument is
returned; no further arguments are expanded. Expands to the last
argument if all arguments are true.
* Changes made for POSIX compatibility:
- Only touch targets (under -t) if they have at least one command.
- Setting the SHELL make variable does NOT change the value of the
SHELL environment variable given to programs invoked by make. As
an enhancement to POSIX, if you export the make variable SHELL then
it will be set in the environment, just as before.
* On MS Windows systems, explicitly setting SHELL to a pathname ending
in "cmd" or "cmd.exe" (case-insensitive) will force GNU make to use
the DOS command interpreter in batch mode even if a UNIX-like shell
could be found on the system.
* On VMS there is now support for case-sensitive filesystems such as ODS5.
See the readme.vms file for information.
* Parallel builds (-jN) no longer require a working Bourne shell on
Windows platforms. They work even with the stock Windows shells, such
as cmd.exe and command.com.
* Updated to autoconf 2.59, automake 1.9.5, and gettext 0.14.1. Users
should not be impacted.
* New translations for Swedish, Chinese (simplified), Ukrainian,
Belarusian, Finnish, Kinyarwandan, and Irish. Many updated
translations.
A complete list of bugs fixed in this version is available here:
http://savannah.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=103
Please send GNU make bug reports to <bug-make@gnu.org>.
See the README file and the GNU make manual for details on sending bug
reports.
Version 3.80 Version 3.80
@@ -88,6 +226,11 @@ Version 3.80
See ABOUT-NLS for more information. See ABOUT-NLS for more information.
* Updated to autoconf 2.54 and automake 1.7. Users should not be impacted. * Updated to autoconf 2.54 and automake 1.7. Users should not be impacted.
A complete list of bugs fixed in this version is available here:
http://savannah.gnu.org/bugs/index.php?group=make&report_id=111&fix_release_id=102
Version 3.79.1 Version 3.79.1
@@ -846,14 +989,20 @@ Version 3.05
(Changes from versions 1 through 3.05 were never recorded. Sorry.) (Changes from versions 1 through 3.05 were never recorded. Sorry.)
---------------------------------------------------------------------- -------------------------------------------------------------------------------
Copyright information: Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
This file is part of GNU Make.
Permission is granted to anyone to make or distribute verbatim copies GNU Make is free software; you can redistribute it and/or modify it under the
of this document as received, in any medium, provided that the terms of the GNU General Public License as published by the Free Software
copyright notice and this permission notice are preserved, thus Foundation; either version 2, or (at your option) any later version.
giving the recipient permission to redistribute in turn.
Permission is granted to distribute modified versions of this GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
document, or of portions of it, under the above conditions, provided WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
also that they carry prominent notices stating who last changed them. A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
GNU Make; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

View File

@@ -1,36 +1,33 @@
# NOTE: If you have no `make' program at all to process this makefile, run # -*-Makefile-*- to build GNU make with nmake
# `build_w32.bat' instead.
# #
# Copyright (C) 1988,89,91,92,93,94,95,96,97 Free Software Foundation, Inc. # NOTE: If you have no 'make' program at all to process this makefile,
# run 'build_w32.bat' instead.
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
# 2006 Free Software Foundation, Inc.
# This file is part of GNU Make. # This file is part of GNU Make.
# #
# GNU Make is free software; you can redistribute it and/or modify # GNU Make is free software; you can redistribute it and/or modify it under the
# it under the terms of the GNU General Public License as published by # terms of the GNU General Public License as published by the Free Software
# the Free Software Foundation; either version 2, or (at your option) # Foundation; either version 2, or (at your option) any later version.
# any later version.
# #
# GNU Make is distributed in the hope that it will be useful, # GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
# but WITHOUT ANY WARRANTY; without even the implied warranty of # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Make; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
# NMakefile for GNU Make
# #
# You should have received a copy of the GNU General Public License along with
# GNU Make; see the file COPYING. If not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
LINK = link LINK = link
CC = cl CC = cl
MAKE = nmake
OUTDIR=. OUTDIR=.
MAKEFILE=NMakefile MAKEFILE=NMakefile
SUBPROC_MAKEFILE=NMakefile SUBPROC_MAKEFILE=NMakefile
CFLAGS_any = /nologo /MT /W3 /GX /Zi /YX /I . /I glob /I w32/include /D WIN32 /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H CFLAGS_any = /nologo /MT /W4 /GX /Zi /YX /I . /I glob /I w32/include /D WIN32 /D WINDOWS32 /D _CONSOLE /D HAVE_CONFIG_H
CFLAGS_debug = $(CFLAGS_any) /Od /D DEBUG /D _DEBUG /FR.\WinDebug/ /Fp.\WinDebug/make.pch /Fo.\WinDebug/ /Fd.\WinDebug/make.pdb CFLAGS_debug = $(CFLAGS_any) /Od /D DEBUG /D _DEBUG /FR.\WinDebug/ /Fp.\WinDebug/make.pch /Fo.\WinDebug/ /Fd.\WinDebug/make.pdb
CFLAGS_release = $(CFLAGS_any) /O2 /D NDEBUG /FR.\WinRel/ /Fp.\WinRel/make.pch /Fo.\WinRel/ CFLAGS_release = $(CFLAGS_any) /O2 /D NDEBUG /FR.\WinRel/ /Fp.\WinRel/make.pch /Fo.\WinRel/
@@ -88,6 +85,7 @@ OBJS = \
$(OUTDIR)/getloadavg.obj \ $(OUTDIR)/getloadavg.obj \
$(OUTDIR)/getopt.obj \ $(OUTDIR)/getopt.obj \
$(OUTDIR)/getopt1.obj \ $(OUTDIR)/getopt1.obj \
$(OUTDIR)/hash.obj \
$(OUTDIR)/implicit.obj \ $(OUTDIR)/implicit.obj \
$(OUTDIR)/job.obj \ $(OUTDIR)/job.obj \
$(OUTDIR)/main.obj \ $(OUTDIR)/main.obj \
@@ -97,6 +95,7 @@ OBJS = \
$(OUTDIR)/remote-stub.obj \ $(OUTDIR)/remote-stub.obj \
$(OUTDIR)/rule.obj \ $(OUTDIR)/rule.obj \
$(OUTDIR)/signame.obj \ $(OUTDIR)/signame.obj \
$(OUTDIR)/strcache.obj \
$(OUTDIR)/variable.obj \ $(OUTDIR)/variable.obj \
$(OUTDIR)/version.obj \ $(OUTDIR)/version.obj \
$(OUTDIR)/vpath.obj \ $(OUTDIR)/vpath.obj \

View File

@@ -59,3 +59,20 @@ If you plan to use recursive makes, install make resident:
Resident make Add Resident make Add
-------------------------------------------------------------------------------
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
GNU Make; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

View File

@@ -321,3 +321,21 @@ Bug reports:
Enjoy, Enjoy,
Eli Zaretskii <eliz@is.elta.co.il> Eli Zaretskii <eliz@is.elta.co.il>
-------------------------------------------------------------------------------
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
GNU Make; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

176
README.OS2.template Normal file
View File

@@ -0,0 +1,176 @@
Port of GNU make to OS/2.
Features of GNU make that do not work under OS/2:
- remote job execution
- dynamic load balancing
Special features of the OS/2 version:
Due to the fact that some people might want to use sh syntax in
Makefiles while others might want to use OS/2's native shell cmd.exe,
GNU make supports both shell types. The following list defines the order
that is used to determine the shell:
1. The shell specified by the environment variable MAKESHELL.
2. The shell specified by the SHELL variable within a Makefile. As on
Unix, SHELL is NOT taken from the environment.
3. The shell specified by the COMSPEC environment variable.
4. The shell specified by the OS2_SHELL environment variable.
5. If none of the above is defined /bin/sh is used as default. This
happens e.g. in the make testsuite.
Note: - Points 3 and 4 can be turned off at compile time by adding
-DNO_CMD_DEFAULT to the CPPFLAGS.
- DOS support is not tested for EMX and therefore might not work.
- The UNIXROOT environment variable is supported to find /bin/sh
if it is not on the current drive.
COMPILATION OF GNU MAKE FOR OS/2:
I. ***** SPECIAL OPTIONS *****
- At compile time you can turn off that cmd is used as default shell
(but only /bin/sh). Simply set CPPFLAGS="-DNO_CMD_DEFAULT" and make
will not use cmd unless you cause it to do so by setting MAKESHELL to
cmd or by specifying SHELL=cmd in your Makefile.
- At compile time you can set CPPFLAGS="-DNO_CHDIR2" to turn off that
GNU make prints drive letters. This is necessary if you want to run
the testsuite.
II. ***** REQUIREMENTS FOR THE COMPILATION *****
A standard Unix like build environment:
- sh compatible shell (ksh, bash, ash, but tested only with pdksh 5.2.14
release 2)
If you use pdksh it is recommended to update to 5.2.14 release 2. Older
versions may not work! You can get this version at
http://www.math.ohio-state.edu/~ilya/software/os2/pdksh-5.2.14-bin-2.zip
- GNU file utilities (make sure that install.exe from the file utilities
is in front of your PATH before X:\OS2\INSTALL\INSTALL.EXE. I recommend
also to change the filename to ginstall.exe instead of install.exe
to avoid confusion with X:\OS2\INSTALL\INSTALL.EXE)
- GNU shell utilities
- GNU text utilities
- gawk
- grep
- sed
- GNU make 3.79.1 (special OS/2 patched version) or higher
- perl 5.005 or higher
- GNU texinfo (you can use 3.1 (gnuinfo.zip), but I recommend 4.0)
If you want to recreate the configuration files (developers only!)
you need also: GNU m4 1.4, autoconf 2.59, automake 1.8.2 (or compatible)
III. ***** COMPILATION AND INSTALLATION *****
a) ** Developers only - Everyone else should skip this section **
To recreate the configuration files use:
export EMXSHELL=ksh
aclocal -I config
automake
autoconf
autoheader
b) Installation into x:/usr
Note: Although it is possible to compile make using "./configure",
"make", "make install" this is not recommended. In particular,
you must ALWAYS use LDFLAGS="-Zstack 0x8000" because the default
stack size is far to small and make will not work properly!
Recommended environment variables and installation options:
export ac_executable_extensions=".exe"
export CPPFLAGS="-D__ST_MT_ERRNO__"
export CFLAGS="-O2 -Zomf -Zmt"
export LDFLAGS="-Zcrtdll -Zlinker /exepack:2 -Zlinker /pm:vio -Zstack 0x8000"
export RANLIB="echo"
./configure --prefix=x:/usr --infodir=x:/usr/share/info --mandir=x:/usr/share/man --without-included-gettext
make AR=emxomfar
make install
Note: If you use gcc 2.9.x or higher I recommend to set also LIBS="-lgcc"
Note: You can add -DNO_CMD_DEFAULT and -DNO_CHDIR2 to CPPFLAGS.
See section I. for details.
IV. ***** NLS support *****
GNU make has NLS (National Language Support), with the following
caveats:
a) It will only work with GNU gettext, and
b) GNU gettext support is not included in the GNU make package.
Therefore, if you wish to enable the internationalization features of
GNU make you must install GNU gettext on your system before configuring
GNU make.
You can choose the languages to be installed. To install support for
English, German and French only enter:
export LINGUAS="en de fr"
If you don't specify LINGUAS all languages are installed.
If you don't want NLS support (English only) use the option
--disable-nls for the configure script. Note if GNU gettext is not
installed then NLS will not be enabled regardless of this flag.
V. ***** Running the make test suite *****
To run the included make test suite you have to set
CPPFLAGS="-D__ST_MT_ERRNO__ -DNO_CMD_DEFAULT -DNO_CHDIR2"
before you compile make. This is due to some restrictions of the
testsuite itself. -DNO_CMD_DEFAULT causes make to use /bin/sh as default
shell in every case. Normally you could simply set MAKESHELL="/bin/sh"
to do this but the testsuite ignores the environment. -DNO_CHDIR2 causes
make not to use drive letters for directory names (i.e. _chdir2() and
_getcwd2() are NOT used). The testsuite interpretes the whole output of
make, especially statements like make[1]: Entering directory
`C:/somewhere/make-3.79.1/tests' where the testsuite does not expect the
drive letter. This would be interpreted as an error even if there is
none.
To run the testsuite do the following:
export CPPFLAGS="-D__ST_MT_ERRNO__ -DNO_CMD_DEFAULT -DNO_CHDIR2"
export CFLAGS="-Zomf -O2 -Zmt"
export LDFLAGS="-Zcrtdll -s -Zlinker /exepack:2 -Zlinker /pm:vio -Zstack 0x8000"
export RANLIB="echo"
./configure --prefix=x:/usr --disable-nls
make AR=emxomfar
make check
All tests should work fine with the exception of "default_names" which
is because OS/2 file systems are not case sensitive ("makefile" and
"Makefile" specify the same file).
-------------------------------------------------------------------------------
Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
GNU Make; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

View File

@@ -1,45 +1,69 @@
Port of GNU make to Windows NT and Windows 95 This version of GNU make has been tested on Microsoft Windows 2000/XP/2003.
Builds natively with MSVC 2.x or MSVC 4.x compilers. It has also been used on Windows 95/98/NT, and on OS/2.
Should also build fine with MSVC 5.x and 6.x (though not confirmed).
This Windows 32-bit port of GNU make is maintained primarily by Rob It builds natively with MSVC 2.x, 4.x, 5.x, 6.x, and 2003 as well as
Tulloh, who is also the author of this README. .NET 7.x and .NET 2003.
To build with nmake on Windows NT, Windows 95, or Windows 98: It builds with the MinGW port of GCC 3.x (tested with GCC 3.4.2).
1. Make sure cl.exe is in your %Path%. Example: The Windows 32-bit port of GNU make is maintained jointly by various
people. It was originally made by Rob Tulloh.
set Path=%Path%;c:/msdev/bin
2. Make sure %include% is set to msvc include directory. Example:
set include=c:/msdev/include
3. Make sure %lib% is set to msvc lib directory. Example:
set lib=c:/msdev/lib
4. nmake /f NMakefile
A short cut to steps 1, 2, and 3 is to run VCVARS32.bat before Do this first, regardless of the build method you choose:
invoking namke. For example: ---------------------------------------------------------
1. At the Windows command prompt run:
if not exist NMakefile copy NMakefile.template NMakefile
if not exist config.h copy config.h.W32 config.h
Then edit config.h to your liking (especially the few shell-related
defines near the end, or HAVE_CASE_INSENSITIVE_FS which corresponds
to './configure --enable-case-insensitive-file-system').
Using make_msvc_net2003.vcproj
------------------------------
2. Open make_msvc_net2003.vcproj in MSVS71 or MSVC71 or any compatible IDE,
then build this project as usual.
Building with (MinGW-)GCC using build_w32.bat
---------------------------------------------
2. Open a W32 command prompt for your installed (MinGW-)GCC, setup a
correct PATH and other environment variables for it, then execute ...
build_w32.bat gcc
This produces gnumake.exe in the current directory.
Building with (MSVC++-)cl using build_w32.bat or NMakefile
----------------------------------------------------------
2. Open a W32 command prompt for your installed (MSVC++-)cl, setup a
correct PATH and other environment variables for it (usually via
executing vcvars32.bat or vsvars32.bat from the cl-installation,
e.g. "%VS71COMNTOOLS%vsvars32.bat"; or using a corresponding start
menue entry from the cl-installation), then execute EITHER ...
build_w32.bat
(this produces WinDebug/gnumake.exe and WinRel/gnumake.exe)
... OR ...
c:
cd \msdev\bin
VCVARS32.bat
cd \path\to\make-%VERSION%
nmake /f NMakefile nmake /f NMakefile
There is a bat file (build_w32.bat) for folks who have fear of nmake. (this produces WinDebug/make.exe and WinRel/make.exe).
Outputs:
WinDebug/make.exe
WinRel/make.exe
-------------------
-- Notes/Caveats -- -- Notes/Caveats --
-------------------
GNU make on Windows 32-bit platforms: GNU make on Windows 32-bit platforms:
@@ -63,14 +87,14 @@ GNU make and sh.exe:
There are very few true ports of Bourne shell for NT right now. There are very few true ports of Bourne shell for NT right now.
There is a version of GNU bash available from Cygnus "Cygwin" There is a version of GNU bash available from Cygnus "Cygwin"
porting effort (http://sourceware.cygnus.com/cygwin). porting effort (http://www.cygwin.com/).
Other possibilities are the MKS version of sh.exe, or building Other possibilities are the MKS version of sh.exe, or building
your own with a package like NutCracker (DataFocus) or Portage your own with a package like NutCracker (DataFocus) or Portage
(Consensys). (Consensys). Also MinGW includes sh (http://mingw.org/).
GNU make and brain-dead shells (BATCH_MODE_ONLY_SHELL): GNU make and brain-dead shells (BATCH_MODE_ONLY_SHELL):
Some versions of Bourne shell does not behave well when invoked Some versions of Bourne shell do not behave well when invoked
as 'sh -c' from CreateProcess(). The main problem is they seem as 'sh -c' from CreateProcess(). The main problem is they seem
to have a hard time handling quoted strings correctly. This can to have a hard time handling quoted strings correctly. This can
be circumvented by writing commands to be executed to a batch be circumvented by writing commands to be executed to a batch
@@ -79,11 +103,14 @@ GNU make and brain-dead shells (BATCH_MODE_ONLY_SHELL):
To work around this difficulty, this version of make supports To work around this difficulty, this version of make supports
a batch mode. When BATCH_MODE_ONLY_SHELL is defined at compile a batch mode. When BATCH_MODE_ONLY_SHELL is defined at compile
time, make forces all command lines to be executed via script time, make forces all command lines to be executed via script
files instead of by command line. files instead of by command line. In this mode you must have a
working sh.exe in order to use parallel builds (-j).
A native Windows32 system with no Bourne shell will also run A native Windows32 system with no Bourne shell will also run
in batch mode. All command lines will be put into batch files in batch mode. All command lines will be put into batch files
and executed via $(COMSPEC) (%COMSPEC%). and executed via $(COMSPEC) (%COMSPEC%). Note that parallel
builds (-j) require a working Bourne shell; they will not work
with COM.
GNU make and Cygnus GNU Windows32 tools: GNU make and Cygnus GNU Windows32 tools:
@@ -128,7 +155,8 @@ GNU make handling of drive letters in pathnames (PATH, vpath, VPATH):
Please note that you are free to mix colon and semi-colon in the Please note that you are free to mix colon and semi-colon in the
specification of paths. Make is able to figure out the intended specification of paths. Make is able to figure out the intended
result and convert the paths internally to the format needed result and convert the paths internally to the format needed
when interacting with the operating system. when interacting with the operating system, providing the path
is not within quotes, e.g. "x:/test/test.c".
You are encouraged to use colon as the separator character. You are encouraged to use colon as the separator character.
This should ease the pain of deciding how to handle various path This should ease the pain of deciding how to handle various path
@@ -164,15 +192,17 @@ Building GNU make on Windows NT and Windows 95/98 with Microsoft Visual C:
Pathnames and white space: Pathnames and white space:
Unlike Unix, Windows 95/NT systems encourage pathnames which Unlike Unix, Windows 95/NT systems encourage pathnames which
contain white space (e.g. C:\Program Files\). These sorts of pathnames contain white space (e.g. C:\Program Files\). These sorts of
are legal under Unix too, but are never encouraged. There is pathnames are legal under Unix too, but are never encouraged.
at least one place in make (VPATH/vpath handling) where paths There is at least one place in make (VPATH/vpath handling) where
containing white space will simply not work. There may be others paths containing white space will simply not work. There may be
too. I chose to not try and port make in such a way so that others too. I chose to not try and port make in such a way so
these sorts of paths could be handled. I offer these suggestions that these sorts of paths could be handled. I offer these
as workarounds: suggestions as workarounds:
1. Use 8.3 notation 1. Use 8.3 notation. i.e. "x:/long~1/", which is actually
"x:\longpathtest". Type "dir /x" to view these filenames
within the cmd.exe shell.
2. Rename the directory so it does not contain white space. 2. Rename the directory so it does not contain white space.
If you are unhappy with this choice, this is free software If you are unhappy with this choice, this is free software
@@ -217,25 +247,42 @@ SAMBA/NTFS/VFAT:
package using SAMBA as my file server. The reason seems to be package using SAMBA as my file server. The reason seems to be
related to the way VC++ 4.0 changes the case name of the pdb related to the way VC++ 4.0 changes the case name of the pdb
filename it is passed on the command line. It seems to change filename it is passed on the command line. It seems to change
the name always to to lower case. I contend that the name always to to lower case. I contend that the VC++
the VC++ compiler should not change the casename of files that compiler should not change the casename of files that are passed
are passed as arguments on the command line. I don't think this as arguments on the command line. I don't think this was a
was a problem in MSVC 2.x, but I know it is a problem in MSVC 4.x. problem in MSVC 2.x, but I know it is a problem in MSVC 4.x.
The package builds fine on VFAT and NTFS filesystems. The package builds fine on VFAT and NTFS filesystems.
Most all of the development I have done to date has been using Most all of the development I have done to date has been using
NTFS and long file names. I have not done any considerable work NTFS and long file names. I have not done any considerable work
under VFAT. VFAT users may wish to be aware that this port under VFAT. VFAT users may wish to be aware that this port of
of make does respect case sensitivity. make does respect case sensitivity.
FAT: FAT:
Version 3.76 added support for FAT filesystems. Make Version 3.76 added support for FAT filesystems. Make works
works around some difficulties with stat'ing of around some difficulties with stat'ing of files and caching of
files and caching of filenames and directories internally. filenames and directories internally.
Bug reports: Bug reports:
Please submit bugs via the normal bug reporting mechanism which Please submit bugs via the normal bug reporting mechanism which
is described in the GNU make manual and the base README. is described in the GNU make manual and the base README.
-------------------------------------------------------------------------------
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
GNU Make; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

View File

@@ -93,3 +93,21 @@ SunOS 4.1.x:
#else #else
YMMV. YMMV.
-------------------------------------------------------------------------------
Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
GNU Make; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

View File

@@ -1,5 +1,22 @@
-*-text-*- -*-text-*-
-------------------------------------------------------------------------------
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
GNU Make; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-------------------------------------------------------------------------------
Obtaining CVS Code Obtaining CVS Code
------------------ ------------------
@@ -8,7 +25,7 @@ already performed this step; however, for completeness, you can obtain
the GNU make source code via anonymous CVS from the FSF's Savannah the GNU make source code via anonymous CVS from the FSF's Savannah
project <http://savannah.gnu.org/projects/make/>: project <http://savannah.gnu.org/projects/make/>:
$ cvs -d:pserver:anoncvs@subversions.gnu.org:/cvsroot/make co make $ cvs -d:pserver:anoncvs@cvs.savannah.gnu.org:/sources/make co make
You might want to use the "-z3" option to get compression, and you most You might want to use the "-z3" option to get compression, and you most
certainly will want the -P option to avoid unneeded directories certainly will want the -P option to avoid unneeded directories
@@ -23,61 +40,42 @@ There is no password; just hit the ENTER key if you are asked for one.
Building From CVS Building From CVS
----------------- -----------------
To build GNU make from CVS, you will need Autoconf 2.53 (or better), To build GNU make from CVS, you will need Autoconf, Automake, and
Automake 1.6.3 (or better), and Gettext 0.11.5 (or better), and any Gettext, and any tools that those utilities require (GNU m4, Perl,
tools that those utilities require (GNU m4, Perl, etc.). You will also etc.). See the configure.in file to find the minimum versions of each
need a copy of wget. of these tools. You will also need a copy of wget.
When building from CVS you must build in the source directory: "VPATH
builds" from remote directories are not supported. Once you've created
a distribution, of course, you can unpack it and do a VPATH build from
there.
After checking out the code, you will need to perform these steps to get After checking out the code, you will need to perform these steps to get
to the point where you can run "make". to the point where you can run "make".
1) $ autopoint 1) $ autoreconf -i
This will instantiate various m4 macros files, etc. in the config This rebuilds all the things that need rebuilding, installing
and po directories. missing files as symbolic links.
You may get warnings here about missing files like README, etc.
Ignore them, they are harmless.
2) $ aclocal -I config 2) $ ./configure
Generate the proper aclocal.m4 file.
3) $ autoheader
Generate a "config.h.in" file from the contents of configure.in,
etc.
4) $ automake --add-missing
Add (symlink) missing files into the distribution, and generate
Makefile.in's from Makefile.am's.
You will see these perhaps unexpected messages (among others which
you should be expecting :)); just ignore them--I know what I'm doing
:).
Makefile.am: required file `./README' not found
configure.in:xxx: required file `./build.sh.in' not found
Makefile.am:xxx: automatically discovered file `getloadavg.c' should not be explicitly mentioned
5) $ autoconf
Generate a "configure" script from configure.in and acinclude.m4.
6) $ ./configure
Generate a Makefile Generate a Makefile
7) $ make update 3) $ make update
Use wget to retrieve various other files that GNU make relies on, Use wget to retrieve various other files that GNU make relies on,
but does not keep in its own source tree. but does not keep in its own source tree.
NB: You may need GNU make to correctly perform this step; if you use
a platform-local make you may get problems with missing files in doc/.
At this point you have successfully brought your CVS copy of the GNU At this point you have successfully brought your CVS copy of the GNU
make source directory up to the point where it can be treated make source directory up to the point where it can be treated
@@ -89,6 +87,18 @@ That is, you can just run:
to build and install GNU make. to build and install GNU make.
Windows builds from CVS
-----------------------
If you have a UNIX emulation like CYGWIN you can opt to run the general
build procedure above; it will work. Be sure to read
README.W32.template for information on options you might want to use
when running ./configure.
If you can't or don't want to do that, then rename the file
README.W32.template to README.W32 and follow those instructions.
Creating a Package Creating a Package
------------------ ------------------
@@ -114,7 +124,66 @@ converting to Automake is worth the trouble! A big "huzzah!" to Tom
T. and the AutoToolers! T. and the AutoToolers!
That's it, you're done! Steps to Release
----------------
Here are the things that need to be done (in more or less this order)
before making an official release:
* Update the configure.in file with the new release number.
* Update the NEWS file with the release number and date.
* Create the new release in the Savannah "Bugs" Administration for
both the "Component Version" and "Fixed Release" fields.
* Create the new release in the Savannah "Patches" Administration for
the "Fixed Release" field.
* Update the Savannah bug list URL in the NEWS file to use the correct
"Fixed Release" ID number.
* Run "make distcheck" to be sure it all works.
* Commit everything.
* cvs tag <RTAG> where RTAG is constructed by replacing each "." in
the version with "-" and prefixing it with "make-".
Publishing a Package
--------------------
In order to publish a package on the FSF FTP site, either the release
site ftp://ftp.gnu.org, or the prerelease site ftp://alpha.gnu.org, you
first need to have my GPG private key and my passphrase to unlock it.
And, you can't have them! So there! But, just so I remember here's
what you do:
Make sure the "Steps to Release" are complete and committed and tagged.
cvs -d :pserver:anonymous@cvs.savannah.gnu.org:/sources/make \
export -r<RTAG> -d make-release make
cd make-release
<run the commands above to build the release>
make upload-alpha # for alpha.gnu.org (pre-releases)
-OR-
make upload-ftp # for ftp.gnu.org (official releases)
It will ask for the GPG passphrase _THREE_ times. Sigh.
Where to Announce
-----------------
Create the announcement in a text file, then sign it with GPG.
gpg --clearsign <announcement.txt>
Upload to gnu.org, then login and send from my account there.
Email to: make-alpha@gnu.org, bug-make@gnu.org, help-make@gnu.org, make-w32@gnu.org.
Email to: info-gnu@gnu.org
Add a news item to the Savannah project site.
Add an update to freshmeat.net.
Appendix A - For The Brave Appendix A - For The Brave
@@ -128,14 +197,12 @@ prerequisites are available of course).
This list is eminently suitable for a quick swipe o' the mouse and a This list is eminently suitable for a quick swipe o' the mouse and a
swift click o' mouse-2 into an xterm. Go for it! swift click o' mouse-2 into an xterm. Go for it!
autoreconf -i
autopoint
aclocal -I config
autoheader
automake --add-missing
autoconf
./configure ./configure
make update make update
make make
make check make check
make distcheck
Or, all-in-one:
autoreconf -i && ./configure && make update && make && make check

View File

@@ -70,7 +70,7 @@ information on submitting useful and complete bug reports.
You can also use the online bug tracking system in the Savannah GNU Make You can also use the online bug tracking system in the Savannah GNU Make
project to submit new problem reports or search for existing ones: project to submit new problem reports or search for existing ones:
http://savannah.gnu.org/bugs/?group_id=71 http://savannah.gnu.org/bugs/?group=make
If you need help using GNU make, try these forums: If you need help using GNU make, try these forums:
@@ -79,11 +79,11 @@ If you need help using GNU make, try these forums:
news:gnu.utils.help news:gnu.utils.help
news:gnu.utils.bug news:gnu.utils.bug
http://savannah.gnu.org/support/?group_id=71 http://savannah.gnu.org/support/?group=make
You may also find interesting patches to GNU Make available here: You may also find interesting patches to GNU Make available here:
http://savannah.gnu.org/patch/?group_id=71 http://savannah.gnu.org/patch/?group=make
Note these patches are provided by our users as a service and we make no Note these patches are provided by our users as a service and we make no
statements regarding their correctness. Please contact the authors statements regarding their correctness. Please contact the authors
@@ -97,7 +97,7 @@ CVS Access
The GNU make source repository is available via anonymous CVS from the The GNU make source repository is available via anonymous CVS from the
GNU Subversions CVS server; look here for details: GNU Subversions CVS server; look here for details:
http://savannah.gnu.org/cvs/?group_id=71 http://savannah.gnu.org/cvs/?group=make
Please note: you won't be able to build GNU make from CVS without Please note: you won't be able to build GNU make from CVS without
installing appropriate maintainer's tools, such as GNU m4, automake, installing appropriate maintainer's tools, such as GNU m4, automake,
@@ -112,8 +112,14 @@ System-specific Notes
--------------------- ---------------------
It has been reported that the XLC 1.2 compiler on AIX 3.2 is buggy such It has been reported that the XLC 1.2 compiler on AIX 3.2 is buggy such
that if you compile make with `cc -O' on AIX 3.2, it will not work correctly. that if you compile make with `cc -O' on AIX 3.2, it will not work
It is said that using `cc' without `-O' does work. correctly. It is said that using `cc' without `-O' does work.
The standard /bin/sh on SunOS 4.1.3_U1 and 4.1.4 is broken and cannot be
used to configure GNU make. Please install a different shell such as
bash or pdksh in order to run "configure". See this message for more
information:
http://mail.gnu.org/archive/html/bug-autoconf/2003-10/msg00190.html
One area that is often a problem in configuration and porting is the code One area that is often a problem in configuration and porting is the code
to check the system's current load average. To make it easier to test and to check the system's current load average. To make it easier to test and
@@ -162,3 +168,22 @@ Please note there are two _separate_ ports of GNU make for Microsoft
systems: a native Windows tool built with (for example) MSVC or Cygwin, systems: a native Windows tool built with (for example) MSVC or Cygwin,
and a DOS-based tool built with DJGPP. Please be sure you are looking and a DOS-based tool built with DJGPP. Please be sure you are looking
at the right README! at the right README!
-------------------------------------------------------------------------------
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
GNU Make; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

View File

@@ -1,23 +1,23 @@
# NOTE: If you have no `make' program at all to process this makefile, run # -*-Makefile-*- for building GNU make with smake
# `build.sh' instead.
# #
# Copyright (C) 1988, 89, 91, 92, 93, 94, 1995 Free Software Foundation, Inc. # NOTE: If you have no 'make' program at all to process this makefile,
# run 'build.sh' instead.
#
# Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006 Free Software Foundation, Inc.
# This file is part of GNU Make. # This file is part of GNU Make.
# #
# GNU Make is free software; you can redistribute it and/or modify # GNU Make is free software; you can redistribute it and/or modify it under the
# it under the terms of the GNU General Public License as published by # terms of the GNU General Public License as published by the Free Software
# the Free Software Foundation; either version 2, or (at your option) # Foundation; either version 2, or (at your option) any later version.
# any later version.
# #
# GNU Make is distributed in the hope that it will be useful, # GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
# but WITHOUT ANY WARRANTY; without even the implied warranty of # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
# GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License along with
# along with GNU Make; see the file COPYING. If not, write to # GNU Make; see the file COPYING. If not, write to the Free Software
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
# Boston, MA 02111-1307, USA.
# #
# Makefile for GNU Make # Makefile for GNU Make
@@ -125,16 +125,16 @@ CTAGS = ctags -w
objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o \ objs = commands.o job.o dir.o file.o misc.o main.o read.o remake.o \
rule.o implicit.o default.o variable.o expand.o function.o \ rule.o implicit.o default.o variable.o expand.o function.o \
vpath.o version.o ar.o arscan.o signame.o remote-$(REMOTE).o \ vpath.o version.o ar.o arscan.o signame.o strcache.o hash.o \
$(GLOB) $(GETOPT) $(ALLOCA) $(extras) remote-$(REMOTE).o $(GLOB) $(GETOPT) $(ALLOCA) $(extras)
srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c \ srcs = $(srcdir)commands.c $(srcdir)job.c $(srcdir)dir.c \
$(srcdir)file.c $(srcdir)getloadavg.c $(srcdir)misc.c \ $(srcdir)file.c $(srcdir)getloadavg.c $(srcdir)misc.c \
$(srcdir)main.c $(srcdir)read.c $(srcdir)remake.c \ $(srcdir)main.c $(srcdir)read.c $(srcdir)remake.c \
$(srcdir)rule.c $(srcdir)implicit.c $(srcdir)default.c \ $(srcdir)rule.c $(srcdir)implicit.c $(srcdir)default.c \
$(srcdir)variable.c $(srcdir)expand.c $(srcdir)function.c \ $(srcdir)variable.c $(srcdir)expand.c $(srcdir)function.c \
$(srcdir)vpath.c $(srcdir)version.c \ $(srcdir)vpath.c $(srcdir)version.c $(srcdir)hash.c \
$(srcdir)remote-$(REMOTE).c \ $(srcdir)remote-$(REMOTE).c \
$(srcdir)ar.c $(srcdir)arscan.c \ $(srcdir)ar.c $(srcdir)arscan.c $(srcdir)strcache.c \
$(srcdir)signame.c $(srcdir)signame.h $(GETOPT_SRC) \ $(srcdir)signame.c $(srcdir)signame.h $(GETOPT_SRC) \
$(srcdir)commands.h $(srcdir)dep.h $(srcdir)file.h \ $(srcdir)commands.h $(srcdir)dep.h $(srcdir)file.h \
$(srcdir)job.h $(srcdir)make.h $(srcdir)rule.h \ $(srcdir)job.h $(srcdir)make.h $(srcdir)rule.h \

View File

@@ -41,17 +41,13 @@ port the current tests to whatever you do :).
The Rest of the List The Rest of the List
-------------------- --------------------
1) Allow variables/functions to expand to other make rules which are 1) Option to check more than timestamps to determine if targets have
then interpreted, with newlines handled correctly. This is a
biggee, and is on my plate. I already have partially-working code.
2) Option to check more than timestamps to determine if targets have
changed. This is also a very big one. It's _close_ to my plate :), changed. This is also a very big one. It's _close_ to my plate :),
and I have very definite ideas about how I would like it done. and I have very definite ideas about how I would like it done.
Please pick something else unless you must have this feature. If Please pick something else unless you must have this feature. If
you try it, please work _extremely_ closely with me on it. you try it, please work _extremely_ closely with me on it.
2a) Possibly a special case of this is the .KEEP_STATE feature of Sun's 1a) Possibly a special case of this is the .KEEP_STATE feature of Sun's
make. Some great folks at W U. in Canada did an implementation of make. Some great folks at W U. in Canada did an implementation of
this for a class project. Their approach is reasonable and this for a class project. Their approach is reasonable and
workable, but doesn't really fit into my ideas for #2. Maybe workable, but doesn't really fit into my ideas for #2. Maybe
@@ -60,7 +56,7 @@ The Rest of the List
[K R Praveen <praveen@cair.res.in>] [K R Praveen <praveen@cair.res.in>]
3) Currently you can use "%.foo %.bar : %.baz" to mean that one 2) Currently you can use "%.foo %.bar : %.baz" to mean that one
invocation of the rule builds both targets. GNU make needs a way to invocation of the rule builds both targets. GNU make needs a way to
do that for explicit rules, too. I heard a rumor that some versions do that for explicit rules, too. I heard a rumor that some versions
of make all you to say "a.foo + a.bar : a.baz" to do this (i.e., a of make all you to say "a.foo + a.bar : a.baz" to do this (i.e., a
@@ -68,25 +64,22 @@ The Rest of the List
best syntax or not... what if you say "a.foo + a.bar a.bam : a.baz"; best syntax or not... what if you say "a.foo + a.bar a.bam : a.baz";
what does that mean? what does that mean?
4) Multi-token pattern rule matching (allow %1/%2.c : %1/obj/%2.o, 3) Multi-token pattern rule matching (allow %1/%2.c : %1/obj/%2.o,
etc., or something like that). I have an implementation of this etc., or something like that). I have an implementation of this
already, it just needs some refinement... maybe. Additionally I already, it just needs some refinement... maybe. Additionally I
think it only works for static pattern rules; it might need to be think it only works for static pattern rules; it might need to be
fixed up to work with normal pattern rules, too. fixed up to work with normal pattern rules, too.
5) More robust clock skew detection algorithm: less false hits. I have 4) Provide a .TARGETS variable, containing the names of the targets
some notes on this from various discussions. defined in the makefile.
6) Provide MAKETARGETS and MAKEVARIABLES variables, containing the Actually, I now think a $(targets ...) function, at least, might be
names of the targets and variables defined in the makefile.
Actually, I now think a $(targets ...) function, at least, would be
better than a MAKETARGETS variable. The argument would be types of better than a MAKETARGETS variable. The argument would be types of
targets to list: "phony" is the most useful one. I suppose targets to list: "phony" is the most useful one. I suppose
"default" might also be useful. Maybe some others; check the "default" might also be useful. Maybe some others; check the
bitfields to see what might be handy. This one is pretty easy. bitfields to see what might be handy.
7) Some sort of operating-system independent way of handling paths 5) Some sort of operating-system independent way of handling paths
would be outstanding, so makefiles can be written for UNIX, VMS, would be outstanding, so makefiles can be written for UNIX, VMS,
DOS, MS-Windows, Amiga, etc. with a minimum of specialization. DOS, MS-Windows, Amiga, etc. with a minimum of specialization.
@@ -95,18 +88,12 @@ The Rest of the List
dunno, maybe something like $[...]? This may well not be worth dunno, maybe something like $[...]? This may well not be worth
doing until #1 is done. doing until #1 is done.
9) Right now the .PRECIOUS, .INTERMEDIATE, and .SECONDARY 6) Right now the .PRECIOUS, .INTERMEDIATE, and .SECONDARY
pseudo-targets have different capabilities. For example, .PRECIOUS pseudo-targets have different capabilities. For example, .PRECIOUS
can take a "%", the others can't. Etc. These should all work the can take a "%", the others can't. Etc. These should all work the
same, insofar as that makes sense. same, insofar as that makes sense.
10) A syntax that specifies a build order _without_ implying a 7) Improved debugging/logging/etc. capabilities. Part of this is done:
dependency relationship. That is, a way to say "A must be built
before B" that doesn't force B to be built when A changes. This is
very important for parallel builds: sometimes you need some stuff
done first but you don't want to rebuild everything because of it.
11) Improved debugging/logging/etc. capabilities. Part of this is done:
I introduced a number of debugging enhancements. Tim Magill is (I I introduced a number of debugging enhancements. Tim Magill is (I
think) looking into options to control output more selectively. think) looking into options to control output more selectively.
One thing I want to do in debugging is add a flag to allow debugging One thing I want to do in debugging is add a flag to allow debugging
@@ -115,7 +102,7 @@ The Rest of the List
you just can't figure it out. The way variables are expanded now you just can't figure it out. The way variables are expanded now
means this isn't 100% trivial, but it probably won't be hard. means this isn't 100% trivial, but it probably won't be hard.
12) Integration of Guile as an embedded scripting language. This means: 8) Integration of Guile as an embedded scripting language. This means:
allowing Guile functions to be declared in makefiles somehow, then allowing Guile functions to be declared in makefiles somehow, then
providing a syntax for invoking them. At least one formulation of providing a syntax for invoking them. At least one formulation of
that would have the function resolve to a string which would be that would have the function resolve to a string which would be
@@ -138,3 +125,21 @@ The Rest of the List
in the first place? in the first place?
Something to think about. Something to think about.
-------------------------------------------------------------------------------
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
GNU Make; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

View File

@@ -1,6 +1,25 @@
dnl acinclude.m4 -- Extra macros needed for GNU make. dnl acinclude.m4 -- Extra macros needed for GNU make.
dnl dnl
dnl Automake will incorporate this into its generated aclocal.m4. dnl Automake will incorporate this into its generated aclocal.m4.
dnl Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
dnl 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
dnl under the terms of the GNU General Public License as published by
dnl the Free Software Foundation; either version 2, or (at your option)
dnl any later version.
dnl
dnl GNU Make is distributed in the hope that it will be useful, but
dnl WITHOUT ANY WARRANTY; without even the implied warranty of
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
dnl General Public License for more details.
dnl
dnl You should have received a copy of the GNU General Public License
dnl along with GNU Make; see the file COPYING. If not, write to the
dnl Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
dnl MA 02110-1301 USA.
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
dnl Got this from the lynx 2.8 distribution. dnl Got this from the lynx 2.8 distribution.
@@ -88,7 +107,7 @@ changequote([,])dnl
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
dnl From Paul Eggert <eggert@twinsun.com> dnl From Paul Eggert <eggert@twinsun.com>
AC_DEFUN(AC_STRUCT_ST_MTIM_NSEC, AC_DEFUN([AC_STRUCT_ST_MTIM_NSEC],
[AC_CACHE_CHECK([for nanoseconds field of struct stat.st_mtim], [AC_CACHE_CHECK([for nanoseconds field of struct stat.st_mtim],
ac_cv_struct_st_mtim_nsec, ac_cv_struct_st_mtim_nsec,
[ac_save_CPPFLAGS="$CPPFLAGS" [ac_save_CPPFLAGS="$CPPFLAGS"
@@ -101,64 +120,16 @@ AC_DEFUN(AC_STRUCT_ST_MTIM_NSEC,
for ac_val in tv_nsec _tv_nsec st__tim.tv_nsec; do for ac_val in tv_nsec _tv_nsec st__tim.tv_nsec; do
CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val" CPPFLAGS="$ac_save_CPPFLAGS -DST_MTIM_NSEC=$ac_val"
AC_TRY_COMPILE([#include <sys/types.h> AC_TRY_COMPILE([#include <sys/types.h>
#include <sys/stat.h>], [struct stat s; s.st_mtim.ST_MTIM_NSEC;], #include <sys/stat.h>
], [struct stat s; s.st_mtim.ST_MTIM_NSEC;],
[ac_cv_struct_st_mtim_nsec=$ac_val; break]) [ac_cv_struct_st_mtim_nsec=$ac_val; break])
done done
CPPFLAGS="$ac_save_CPPFLAGS"]) CPPFLAGS="$ac_save_CPPFLAGS"
])
if test $ac_cv_struct_st_mtim_nsec != no; then if test $ac_cv_struct_st_mtim_nsec != no; then
AC_DEFINE_UNQUOTED(ST_MTIM_NSEC, $ac_cv_struct_st_mtim_nsec, [Define if 'struct stat' contains a nanoseconds field]) AC_DEFINE_UNQUOTED([ST_MTIM_NSEC], [$ac_cv_struct_st_mtim_nsec],
[Define if struct stat contains a nanoseconds field])
fi fi
] ]
) )
dnl ---------------------------------------------------------------------------
dnl This will be in the next version of autoconf; take this out then!
# make_FUNC_SETVBUF_REVERSED
# ------------------------
AC_DEFUN([make_FUNC_SETVBUF_REVERSED],
[AC_REQUIRE([AC_C_PROTOTYPES])dnl
AC_CACHE_CHECK(whether setvbuf arguments are reversed,
ac_cv_func_setvbuf_reversed,
[ac_cv_func_setvbuf_reversed=no
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[#include <stdio.h>
# if PROTOTYPES
int (setvbuf) (FILE *, int, char *, size_t);
# endif]],
[[char buf; return setvbuf (stdout, _IOLBF, &buf, 1);]])],
[AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[#include <stdio.h>
# if PROTOTYPES
int (setvbuf) (FILE *, int, char *, size_t);
# endif]],
[[char buf; return setvbuf (stdout, &buf, _IOLBF, 1);]])],
[# It compiles and links either way, so it must not be declared
# with a prototype and most likely this is a K&R C compiler.
# Try running it.
AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[[#include <stdio.h>]],
[[/* This call has the arguments reversed.
A reversed system may check and see that the address of buf
is not _IOLBF, _IONBF, or _IOFBF, and return nonzero. */
char buf;
if (setvbuf (stdout, _IOLBF, &buf, 1) != 0)
exit (1);
putchar ('\r');
exit (0); /* Non-reversed systems SEGV here. */]])],
ac_cv_func_setvbuf_reversed=yes,
rm -f core core.* *.core,
[[: # Assume setvbuf is not reversed when cross-compiling.]])]
ac_cv_func_setvbuf_reversed=yes)])])
if test $ac_cv_func_setvbuf_reversed = yes; then
AC_DEFINE(SETVBUF_REVERSED, 1,
[Define to 1 if the `setvbuf' function takes the buffering type as
its second argument and the buffer pointer as the third, as on
System V before release 3.])
fi
])# make_FUNC_SETVBUF_REVERSED

View File

@@ -114,7 +114,7 @@ static int stack_dir; /* 1 or -1 once known. */
#define STACK_DIR stack_dir #define STACK_DIR stack_dir
static void static void
find_stack_direction () find_stack_direction (void)
{ {
static char *addr = NULL; /* Address of first `dummy', once known. */ static char *addr = NULL; /* Address of first `dummy', once known. */
auto char dummy; /* To get stack address. */ auto char dummy; /* To get stack address. */
@@ -168,8 +168,7 @@ static header *last_alloca_header = NULL; /* -> last alloca header. */
implementations of C, for example under Gould's UTX/32. */ implementations of C, for example under Gould's UTX/32. */
pointer pointer
alloca (size) alloca (unsigned size)
unsigned size;
{ {
auto char probe; /* Probes stack depth: */ auto char probe; /* Probes stack depth: */
register char *depth = ADDRESS_FUNCTION (probe); register char *depth = ADDRESS_FUNCTION (probe);

30
amiga.c
View File

@@ -1,21 +1,19 @@
/* Running commands on Amiga /* Running commands on Amiga
Copyright (C) 1995, 1996 Free Software Foundation, Inc. Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Make. This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify GNU Make is free software; you can redistribute it and/or modify it under the
it under the terms of the GNU General Public License as published by terms of the GNU General Public License as published by the Free Software
the Free Software Foundation; either version 2, or (at your option) Foundation; either version 2, or (at your option) any later version.
any later version.
GNU Make is distributed in the hope that it will be useful, GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
but WITHOUT ANY WARRANTY; without even the implied warranty of WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the A PARTICULAR PURPOSE. See the GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License along with
along with GNU Make; see the file COPYING. If not, write to GNU Make; see the file COPYING. If not, write to the Free Software
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
MA 02111-1307, USA. */
#include "make.h" #include "make.h"
#include "variable.h" #include "variable.h"
@@ -30,8 +28,7 @@ static const char Amiga_version[] = "$VER: Make 3.74.3 (12.05.96) \n"
"Amiga Port by A. Digulla (digulla@home.lake.de)"; "Amiga Port by A. Digulla (digulla@home.lake.de)";
int int
MyExecute (argv) MyExecute (char **argv)
char ** argv;
{ {
char * buffer, * ptr; char * buffer, * ptr;
char ** aptr; char ** aptr;
@@ -92,8 +89,7 @@ char ** argv;
} }
char * char *
wildcard_expansion (wc, o) wildcard_expansion (char *wc, char *o)
char * wc, * o;
{ {
# define PATH_SIZE 1024 # define PATH_SIZE 1024
struct AnchorPath * apath; struct AnchorPath * apath;

24
amiga.h
View File

@@ -1,21 +1,19 @@
/* Definitions for amiga specific things /* Definitions for amiga specific things
Copyright (C) 1995, 1996 Free Software Foundation, Inc. Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Make. This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify GNU Make is free software; you can redistribute it and/or modify it under the
it under the terms of the GNU General Public License as published by terms of the GNU General Public License as published by the Free Software
the Free Software Foundation; either version 2, or (at your option) Foundation; either version 2, or (at your option) any later version.
any later version.
GNU Make is distributed in the hope that it will be useful, GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
but WITHOUT ANY WARRANTY; without even the implied warranty of WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the A PARTICULAR PURPOSE. See the GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License along with
along with GNU Make; see the file COPYING. If not, write to GNU Make; see the file COPYING. If not, write to the Free Software
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
MA 02111-1307, USA. */
extern int MyExecute PARAMS ((char ** argv)); extern int MyExecute PARAMS ((char ** argv));
extern char * wildcard_expansion PARAMS ((char * wc, char * o)); extern char * wildcard_expansion PARAMS ((char * wc, char * o));

76
ar.c
View File

@@ -1,22 +1,20 @@
/* Interface to `ar' archives for GNU Make. /* Interface to `ar' archives for GNU Make.
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1997, Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
2002 Free Software Foundation, Inc. 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
This file is part of GNU Make. This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify GNU Make is free software; you can redistribute it and/or modify it under the
it under the terms of the GNU General Public License as published by terms of the GNU General Public License as published by the Free Software
the Free Software Foundation; either version 2, or (at your option) Foundation; either version 2, or (at your option) any later version.
any later version.
GNU Make is distributed in the hope that it will be useful, GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
but WITHOUT ANY WARRANTY; without even the implied warranty of WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the A PARTICULAR PURPOSE. See the GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License along with
along with GNU Make; see the file COPYING. If not, write to GNU Make; see the file COPYING. If not, write to the Free Software
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
Boston, MA 02111-1307, USA. */
#include "make.h" #include "make.h"
@@ -39,8 +37,7 @@ extern int ar_member_touch PARAMS ((char *arname, char *memname));
the attempt to use this unsupported feature. */ the attempt to use this unsupported feature. */
int int
ar_name (name) ar_name (char *name)
char *name;
{ {
char *p = strchr (name, '('); char *p = strchr (name, '(');
char *end; char *end;
@@ -64,8 +61,7 @@ ar_name (name)
put the malloc'd member name in *MEMNAME_P if MEMNAME_P is non-nil. */ put the malloc'd member name in *MEMNAME_P if MEMNAME_P is non-nil. */
void void
ar_parse_name (name, arname_p, memname_p) ar_parse_name (char *name, char **arname_p, char **memname_p)
char *name, **arname_p, **memname_p;
{ {
char *p = strchr (name, '('), *end = name + strlen (name) - 1; char *p = strchr (name, '('), *end = name + strlen (name) - 1;
@@ -82,8 +78,7 @@ static long int ar_member_date_1 PARAMS ((int desc, char *mem, int truncated, lo
/* Return the modtime of NAME. */ /* Return the modtime of NAME. */
time_t time_t
ar_member_date (name) ar_member_date (char *name)
char *name;
{ {
char *arname; char *arname;
int arname_used = 0; int arname_used = 0;
@@ -125,14 +120,10 @@ ar_member_date (name)
/* ARGSUSED */ /* ARGSUSED */
static long int static long int
ar_member_date_1 (desc, mem, truncated, ar_member_date_1 (int desc UNUSED, char *mem, int truncated,
hdrpos, datapos, size, date, uid, gid, mode, name) long int hdrpos UNUSED, long int datapos UNUSED,
int desc; long int size UNUSED, long int date,
char *mem; int uid UNUSED, int gid UNUSED, int mode UNUSED, char *name)
int truncated;
long int hdrpos, datapos, size, date;
int uid, gid, mode;
char *name;
{ {
return ar_name_equal (name, mem, truncated) ? date : 0; return ar_name_equal (name, mem, truncated) ? date : 0;
} }
@@ -141,16 +132,14 @@ ar_member_date_1 (desc, mem, truncated,
#ifdef VMS #ifdef VMS
int int
ar_touch (name) ar_touch (char *name)
char *name;
{ {
error (NILF, _("touch archive member is not available on VMS")); error (NILF, _("touch archive member is not available on VMS"));
return -1; return -1;
} }
#else #else
int int
ar_touch (name) ar_touch (char *name)
char *name;
{ {
char *arname, *memname; char *arname, *memname;
int arname_used = 0; int arname_used = 0;
@@ -219,15 +208,10 @@ struct ar_glob_state
element against the pattern in STATE. */ element against the pattern in STATE. */
static long int static long int
ar_glob_match (desc, mem, truncated, ar_glob_match (int desc UNUSED, char *mem, int truncated UNUSED,
hdrpos, datapos, size, date, uid, gid, mode, long int hdrpos UNUSED, long int datapos UNUSED,
state) long int size UNUSED, long int date UNUSED, int uid UNUSED,
int desc; int gid UNUSED, int mode UNUSED, struct ar_glob_state *state)
char *mem;
int truncated;
long int hdrpos, datapos, size, date;
int uid, gid, mode;
struct ar_glob_state *state;
{ {
if (fnmatch (state->pattern, mem, FNM_PATHNAME|FNM_PERIOD) == 0) if (fnmatch (state->pattern, mem, FNM_PATHNAME|FNM_PERIOD) == 0)
{ {
@@ -245,11 +229,9 @@ ar_glob_match (desc, mem, truncated,
/* Return nonzero if PATTERN contains any metacharacters. /* Return nonzero if PATTERN contains any metacharacters.
Metacharacters can be quoted with backslashes if QUOTE is nonzero. */ Metacharacters can be quoted with backslashes if QUOTE is nonzero. */
static int static int
glob_pattern_p (pattern, quote) glob_pattern_p (const char *pattern, int quote)
const char *pattern;
const int quote;
{ {
register const char *p; const char *p;
int open = 0; int open = 0;
for (p = pattern; *p != '\0'; ++p) for (p = pattern; *p != '\0'; ++p)
@@ -281,9 +263,7 @@ glob_pattern_p (pattern, quote)
Return a malloc'd chain of matching elements (or nil if none). */ Return a malloc'd chain of matching elements (or nil if none). */
struct nameseq * struct nameseq *
ar_glob (arname, member_pattern, size) ar_glob (char *arname, char *member_pattern, unsigned int size)
char *arname, *member_pattern;
unsigned int size;
{ {
struct ar_glob_state state; struct ar_glob_state state;
char **names; char **names;

View File

@@ -1,20 +1,20 @@
/* Library function for scanning an archive file. /* Library function for scanning an archive file.
Copyright (C) 1987,89,91,92,93,94,95,97 Free Software Foundation, Inc. Copyright (C) 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
Inc.
This file is part of GNU Make.
This program is free software; you can redistribute it and/or modify GNU Make is free software; you can redistribute it and/or modify it under the
it under the terms of the GNU General Public License as published by terms of the GNU General Public License as published by the Free Software
the Free Software Foundation; either version 2, or (at your option) Foundation; either version 2, or (at your option) any later version.
any later version.
This program is distributed in the hope that it will be useful, GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
but WITHOUT ANY WARRANTY; without even the implied warranty of WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the A PARTICULAR PURPOSE. See the GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License along with
along with this program; if not, write to the Free Software GNU Make; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
USA. */
#include "make.h" #include "make.h"
@@ -46,9 +46,7 @@ static time_t VMS_member_date;
static long int (*VMS_function) (); static long int (*VMS_function) ();
static int static int
VMS_get_member_info (module, rfa) VMS_get_member_info (struct dsc$descriptor_s *module, unsigned long *rfa)
struct dsc$descriptor_s *module;
unsigned long *rfa;
{ {
int status, i; int status, i;
long int fnval; long int fnval;
@@ -136,10 +134,7 @@ VMS_get_member_info (module, rfa)
Returns 0 if have scanned successfully. */ Returns 0 if have scanned successfully. */
long int long int
ar_scan (archive, function, arg) ar_scan (char *archive, long int (*function) PARAMS ((void)), long int arg)
char *archive;
long int (*function) ();
long int arg;
{ {
char *p; char *p;
@@ -306,10 +301,7 @@ struct ar_hdr
Returns 0 if have scanned successfully. */ Returns 0 if have scanned successfully. */
long int long int
ar_scan (archive, function, arg) ar_scan (char *archive, long int (*function)(), long int arg)
char *archive;
long int (*function) ();
long int arg;
{ {
#ifdef AIAMAG #ifdef AIAMAG
FL_HDR fl_header; FL_HDR fl_header;
@@ -714,9 +706,7 @@ ar_scan (archive, function, arg)
sizeof (struct ar_hdr.ar_name) - 1. */ sizeof (struct ar_hdr.ar_name) - 1. */
int int
ar_name_equal (name, mem, truncated) ar_name_equal (char *name, char *mem, int truncated)
char *name, *mem;
int truncated;
{ {
char *p; char *p;
@@ -747,14 +737,10 @@ ar_name_equal (name, mem, truncated)
#ifndef VMS #ifndef VMS
/* ARGSUSED */ /* ARGSUSED */
static long int static long int
ar_member_pos (desc, mem, truncated, ar_member_pos (int desc UNUSED, char *mem, int truncated,
hdrpos, datapos, size, date, uid, gid, mode, name) long int hdrpos, long int datapos UNUSED, long int size UNUSED,
int desc; long int date UNUSED, int uid UNUSED, int gid UNUSED,
char *mem; int mode UNUSED, char *name)
int truncated;
long int hdrpos, datapos, size, date;
int uid, gid, mode;
char *name;
{ {
if (!ar_name_equal (name, mem, truncated)) if (!ar_name_equal (name, mem, truncated))
return 0; return 0;
@@ -769,13 +755,13 @@ ar_member_pos (desc, mem, truncated,
1 if valid but member MEMNAME does not exist. */ 1 if valid but member MEMNAME does not exist. */
int int
ar_member_touch (arname, memname) ar_member_touch (char *arname, char *memname)
char *arname, *memname;
{ {
register long int pos = ar_scan (arname, ar_member_pos, (long int) memname); long int pos = ar_scan (arname, ar_member_pos, (long int) memname);
register int fd; int fd;
struct ar_hdr ar_hdr; struct ar_hdr ar_hdr;
register int i; int i;
unsigned int ui;
struct stat statbuf; struct stat statbuf;
if (pos < 0) if (pos < 0)
@@ -797,12 +783,13 @@ ar_member_touch (arname, memname)
if (AR_HDR_SIZE != write (fd, (char *) &ar_hdr, AR_HDR_SIZE)) if (AR_HDR_SIZE != write (fd, (char *) &ar_hdr, AR_HDR_SIZE))
goto lose; goto lose;
/* The file's mtime is the time we we want. */ /* The file's mtime is the time we we want. */
if (fstat (fd, &statbuf) < 0) EINTRLOOP (i, fstat (fd, &statbuf));
if (i < 0)
goto lose; goto lose;
#if defined(ARFMAG) || defined(ARFZMAG) || defined(AIAMAG) || defined(WINDOWS32) #if defined(ARFMAG) || defined(ARFZMAG) || defined(AIAMAG) || defined(WINDOWS32)
/* Advance member's time to that time */ /* Advance member's time to that time */
for (i = 0; i < sizeof ar_hdr.ar_date; i++) for (ui = 0; ui < sizeof ar_hdr.ar_date; ui++)
ar_hdr.ar_date[i] = ' '; ar_hdr.ar_date[ui] = ' ';
sprintf (ar_hdr.ar_date, "%ld", (long int) statbuf.st_mtime); sprintf (ar_hdr.ar_date, "%ld", (long int) statbuf.st_mtime);
#ifdef AIAMAG #ifdef AIAMAG
ar_hdr.ar_date[strlen(ar_hdr.ar_date)] = ' '; ar_hdr.ar_date[strlen(ar_hdr.ar_date)] = ' ';
@@ -829,13 +816,9 @@ ar_member_touch (arname, memname)
#ifdef TEST #ifdef TEST
long int long int
describe_member (desc, name, truncated, describe_member (int desc, char *name, int truncated,
hdrpos, datapos, size, date, uid, gid, mode) long int hdrpos, long int datapos, long int size,
int desc; long int date, int uid, int gid, int mode)
char *name;
int truncated;
long int hdrpos, datapos, size, date;
int uid, gid, mode;
{ {
extern char *ctime (); extern char *ctime ();
@@ -848,14 +831,12 @@ describe_member (desc, name, truncated,
return 0; return 0;
} }
main (argc, argv) int
int argc; main (int argc, char **argv)
char **argv;
{ {
ar_scan (argv[1], describe_member); ar_scan (argv[1], describe_member);
return 0; return 0;
} }
#endif /* TEST. */ #endif /* TEST. */
#endif /* NO_ARCHIVES. */ #endif /* NO_ARCHIVES. */

View File

@@ -2,23 +2,21 @@
# Shell script to build GNU Make in the absence of any `make' program. # Shell script to build GNU Make in the absence of any `make' program.
# @configure_input@ # @configure_input@
# Copyright (C) 1993, 1994, 1997 Free Software Foundation, Inc. # Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This file is part of GNU Make. # This file is part of GNU Make.
# #
# GNU Make is free software; you can redistribute it and/or modify # GNU Make is free software; you can redistribute it and/or modify it under the
# it under the terms of the GNU General Public License as published by # terms of the GNU General Public License as published by the Free Software
# the Free Software Foundation; either version 2, or (at your option) # Foundation; either version 2, or (at your option) any later version.
# any later version.
# #
# GNU Make is distributed in the hope that it will be useful, # GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
# but WITHOUT ANY WARRANTY; without even the implied warranty of # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
# GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License along with
# along with GNU Make; see the file COPYING. If not, write to # GNU Make; see the file COPYING. If not, write to the Free Software
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330, # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
# Boston, MA 02111-1307, USA.
# See Makefile.in for comments describing these variables. # See Makefile.in for comments describing these variables.
@@ -28,10 +26,13 @@ CFLAGS='@CFLAGS@'
CPPFLAGS='@CPPFLAGS@' CPPFLAGS='@CPPFLAGS@'
LDFLAGS='@LDFLAGS@' LDFLAGS='@LDFLAGS@'
ALLOCA='@ALLOCA@' ALLOCA='@ALLOCA@'
LOADLIBES='@LIBS@' LOADLIBES='@LIBS@ @LIBINTL@'
extras='@LIBOBJS@' eval extras=\'@LIBOBJS@\'
REMOTE='@REMOTE@' REMOTE='@REMOTE@'
GLOBLIB='@GLOBLIB@' GLOBLIB='@GLOBLIB@'
PATH_SEPARATOR='@PATH_SEPARATOR@'
OBJEXT='@OBJEXT@'
EXEEXT='@EXEEXT@'
# Common prefix for machine-independent installed files. # Common prefix for machine-independent installed files.
prefix='@prefix@' prefix='@prefix@'
@@ -43,7 +44,7 @@ libdir=${exec_prefix}/lib
includedir=${prefix}/include includedir=${prefix}/include
localedir=${prefix}/share/locale localedir=${prefix}/share/locale
aliaspath=${localedir}:. aliaspath=${localedir}${PATH_SEPARATOR}.
defines="-DALIASPATH=\"${aliaspath}\" -DLOCALEDIR=\"${localedir}\" -DLIBDIR=\"${libdir}\" -DINCLUDEDIR=\"${includedir}\""' @DEFS@' defines="-DALIASPATH=\"${aliaspath}\" -DLOCALEDIR=\"${localedir}\" -DLIBDIR=\"${libdir}\" -DINCLUDEDIR=\"${includedir}\""' @DEFS@'
@@ -51,7 +52,7 @@ defines="-DALIASPATH=\"${aliaspath}\" -DLOCALEDIR=\"${localedir}\" -DLIBDIR=\"${
set -e set -e
# These are all the objects we need to link together. # These are all the objects we need to link together.
objs="%objs% remote-${REMOTE}.o ${extras} ${ALLOCA}" objs="%objs% remote-${REMOTE}.${OBJEXT} ${extras} ${ALLOCA}"
if [ x"$GLOBLIB" != x ]; then if [ x"$GLOBLIB" != x ]; then
objs="$objs %globobjs%" objs="$objs %globobjs%"
@@ -59,7 +60,7 @@ if [ x"$GLOBLIB" != x ]; then
fi fi
# Compile the source files into those objects. # Compile the source files into those objects.
for file in `echo ${objs} | sed 's/\.o/.c/g'`; do for file in `echo ${objs} | sed 's/\.'${OBJEXT}'/.c/g'`; do
echo compiling ${file}... echo compiling ${file}...
$CC $defines $CPPFLAGS $CFLAGS \ $CC $defines $CPPFLAGS $CFLAGS \
-c -I. -I${srcdir} ${globinc} ${srcdir}/$file -c -I. -I${srcdir} ${globinc} ${srcdir}/$file
@@ -75,6 +76,6 @@ done
# Link all the objects together. # Link all the objects together.
echo linking make... echo linking make...
$CC $LDFLAGS $objs $LOADLIBES -o make.new $CC $CFLAGS $LDFLAGS $objs $LOADLIBES -o makenew${EXEEXT}
echo done echo done
mv -f make.new make mv -f makenew${EXEEXT} make${EXEEXT}

View File

@@ -1,138 +1,197 @@
set make=gnumake @echo off
+if not exist config.h copy config.h.W32 config.h rem Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
rem 2006 Free Software Foundation, Inc.
rem This file is part of GNU Make.
rem GNU Make is free software; you can redistribute it and/or modify it under the
rem terms of the GNU General Public License as published by the Free Software
rem Foundation; either version 2, or (at your option) any later version.
rem GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
rem WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
rem A PARTICULAR PURPOSE. See the GNU General Public License for more details.
rem You should have received a copy of the GNU General Public License along with
rem GNU Make; see the file COPYING. If not, write to the Free Software
rem Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
if not exist config.h copy config.h.W32 config.h
cd w32\subproc cd w32\subproc
echo "Creating the subproc library" echo "Creating the subproc library"
%ComSpec% /c build.bat %ComSpec% /c build.bat %1
cd ..\.. cd ..\..
del link.dbg link.rel
del config.h if exist link.dbg del link.dbg
copy config.h.W32 config.h if exist link.rel del link.rel
echo off echo "Creating GNU Make for Windows 9X/NT/2K/XP"
echo "Creating GNU make for Windows 95/NT" if "%1" == "gcc" GoTo GCCBuild
set make=gnumake
echo on echo on
if not exist .\WinDebug\nul mkdir .\WinDebug if not exist .\WinDebug\nul mkdir .\WinDebug
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D TIVOLI /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c variable.c cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D TIVOLI /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c variable.c
echo WinDebug\variable.obj >>link.dbg echo WinDebug\variable.obj >>link.dbg
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c rule.c cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c rule.c
echo WinDebug\rule.obj >>link.dbg echo WinDebug\rule.obj >>link.dbg
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c remote-stub.c cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c remote-stub.c
echo WinDebug\remote-stub.obj >>link.dbg echo WinDebug\remote-stub.obj >>link.dbg
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c commands.c cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c commands.c
echo WinDebug\commands.obj >>link.dbg echo WinDebug\commands.obj >>link.dbg
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c file.c cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c file.c
echo WinDebug\file.obj >>link.dbg echo WinDebug\file.obj >>link.dbg
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c getloadavg.c cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c getloadavg.c
echo WinDebug\getloadavg.obj >>link.dbg echo WinDebug\getloadavg.obj >>link.dbg
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c default.c cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c default.c
echo WinDebug\default.obj >>link.dbg echo WinDebug\default.obj >>link.dbg
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c signame.c cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c signame.c
echo WinDebug\signame.obj >>link.dbg echo WinDebug\signame.obj >>link.dbg
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c expand.c cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c expand.c
echo WinDebug\expand.obj >>link.dbg echo WinDebug\expand.obj >>link.dbg
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c dir.c cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c dir.c
echo WinDebug\dir.obj >>link.dbg echo WinDebug\dir.obj >>link.dbg
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c main.c cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c main.c
echo WinDebug\main.obj >>link.dbg echo WinDebug\main.obj >>link.dbg
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c getopt1.c cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c getopt1.c
echo WinDebug\getopt1.obj >>link.dbg echo WinDebug\getopt1.obj >>link.dbg
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c job.c cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c job.c
echo WinDebug\job.obj >>link.dbg echo WinDebug\job.obj >>link.dbg
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c read.c cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c read.c
echo WinDebug\read.obj >>link.dbg echo WinDebug\read.obj >>link.dbg
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c version.c cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c version.c
echo WinDebug\version.obj >>link.dbg echo WinDebug\version.obj >>link.dbg
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c getopt.c cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c getopt.c
echo WinDebug\getopt.obj >>link.dbg echo WinDebug\getopt.obj >>link.dbg
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c arscan.c cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c arscan.c
echo WinDebug\arscan.obj >>link.dbg echo WinDebug\arscan.obj >>link.dbg
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c remake.c cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c hash.c
echo WinDebug\hash.obj >>link.dbg
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c strcache.c
echo WinDebug\strcache.obj >>link.dbg
cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c remake.c
echo WinDebug\remake.obj >>link.dbg echo WinDebug\remake.obj >>link.dbg
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c misc.c cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c misc.c
echo WinDebug\misc.obj >>link.dbg echo WinDebug\misc.obj >>link.dbg
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c ar.c cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c ar.c
echo WinDebug\ar.obj >>link.dbg echo WinDebug\ar.obj >>link.dbg
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c function.c cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c function.c
echo WinDebug\function.obj >>link.dbg echo WinDebug\function.obj >>link.dbg
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c vpath.c cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c vpath.c
echo WinDebug\vpath.obj >>link.dbg echo WinDebug\vpath.obj >>link.dbg
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c implicit.c cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c implicit.c
echo WinDebug\implicit.obj >>link.dbg echo WinDebug\implicit.obj >>link.dbg
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\w32\compat\dirent.c cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\w32\compat\dirent.c
echo WinDebug\dirent.obj >>link.dbg echo WinDebug\dirent.obj >>link.dbg
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\glob\glob.c cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\glob\glob.c
echo WinDebug\glob.obj >>link.dbg echo WinDebug\glob.obj >>link.dbg
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\glob\fnmatch.c cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\glob\fnmatch.c
echo WinDebug\fnmatch.obj >>link.dbg echo WinDebug\fnmatch.obj >>link.dbg
cl.exe /nologo /MT /W3 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\w32\pathstuff.c cl.exe /nologo /MT /W4 /GX /Zi /YX /Od /I . /I glob /I w32/include /D _DEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinDebug/ /Fp.\WinDebug/%make%.pch /Fo.\WinDebug/ /Fd.\WinDebug/%make%.pdb /c .\w32\pathstuff.c
echo WinDebug\pathstuff.obj >>link.dbg echo WinDebug\pathstuff.obj >>link.dbg
echo off echo off
echo "Linking WinDebug/%make%.exe" echo "Linking WinDebug/%make%.exe"
rem link.exe kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib w32\subproc\windebug\subproc.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes /PDB:.\WinDebug/%make%.pdb /DEBUG /MACHINE:I386 /OUT:.\WinDebug/%make%.exe .\WinDebug/variable.obj .\WinDebug/rule.obj .\WinDebug/remote-stub.obj .\WinDebug/commands.obj .\WinDebug/file.obj .\WinDebug/getloadavg.obj .\WinDebug/default.obj .\WinDebug/signame.obj .\WinDebug/expand.obj .\WinDebug/dir.obj .\WinDebug/main.obj .\WinDebug/getopt1.obj .\WinDebug/job.obj .\WinDebug/read.obj .\WinDebug/version.obj .\WinDebug/getopt.obj .\WinDebug/arscan.obj .\WinDebug/remake.obj .\WinDebug/misc.obj .\WinDebug/ar.obj .\WinDebug/function.obj .\WinDebug/vpath.obj .\WinDebug/implicit.obj .\WinDebug/dirent.obj .\WinDebug/glob.obj .\WinDebug/fnmatch.obj .\WinDebug/pathstuff.obj rem link.exe kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib w32\subproc\windebug\subproc.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes /PDB:.\WinDebug/%make%.pdb /DEBUG /MACHINE:I386 /OUT:.\WinDebug/%make%.exe .\WinDebug/variable.obj .\WinDebug/rule.obj .\WinDebug/remote-stub.obj .\WinDebug/commands.obj .\WinDebug/file.obj .\WinDebug/getloadavg.obj .\WinDebug/default.obj .\WinDebug/signame.obj .\WinDebug/expand.obj .\WinDebug/dir.obj .\WinDebug/main.obj .\WinDebug/getopt1.obj .\WinDebug/job.obj .\WinDebug/read.obj .\WinDebug/version.obj .\WinDebug/getopt.obj .\WinDebug/arscan.obj .\WinDebug/remake.obj .\WinDebug/hash.obj .\WinDebug/strcache.obj .\WinDebug/misc.obj .\WinDebug/ar.obj .\WinDebug/function.obj .\WinDebug/vpath.obj .\WinDebug/implicit.obj .\WinDebug/dirent.obj .\WinDebug/glob.obj .\WinDebug/fnmatch.obj .\WinDebug/pathstuff.obj
echo kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib w32\subproc\windebug\subproc.lib >>link.dbg echo kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib w32\subproc\windebug\subproc.lib >>link.dbg
link.exe /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes /PDB:.\WinDebug/%make%.pdb /DEBUG /MACHINE:I386 /OUT:.\WinDebug/%make%.exe @link.dbg link.exe /NOLOGO /SUBSYSTEM:console /INCREMENTAL:yes /PDB:.\WinDebug/%make%.pdb /DEBUG /MACHINE:I386 /OUT:.\WinDebug/%make%.exe @link.dbg
if not exist .\WinDebug/%make%.exe echo "WinDebug build failed" if not exist .\WinDebug/%make%.exe echo "WinDebug build failed"
if exist .\WinDebug/%make%.exe echo "WinDebug build succeeded!" if exist .\WinDebug/%make%.exe echo "WinDebug build succeeded!"
if not exist .\WinRel\nul mkdir .\WinRel if not exist .\WinRel\nul mkdir .\WinRel
echo on echo on
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D TIVOLI /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c variable.c cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /D TIVOLI /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c variable.c
echo WinRel\variable.obj >>link.rel echo WinRel\variable.obj >>link.rel
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c rule.c cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c rule.c
echo WinRel\rule.obj >>link.rel echo WinRel\rule.obj >>link.rel
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c remote-stub.c cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c remote-stub.c
echo WinRel\remote-stub.obj >>link.rel echo WinRel\remote-stub.obj >>link.rel
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c commands.c cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c commands.c
echo WinRel\commands.obj >>link.rel echo WinRel\commands.obj >>link.rel
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c file.c cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c file.c
echo WinRel\file.obj >>link.rel echo WinRel\file.obj >>link.rel
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c getloadavg.c cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c getloadavg.c
echo WinRel\getloadavg.obj >>link.rel echo WinRel\getloadavg.obj >>link.rel
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c default.c cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c default.c
echo WinRel\default.obj >>link.rel echo WinRel\default.obj >>link.rel
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c signame.c cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c signame.c
echo WinRel\signame.obj >>link.rel echo WinRel\signame.obj >>link.rel
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c expand.c cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c expand.c
echo WinRel\expand.obj >>link.rel echo WinRel\expand.obj >>link.rel
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c dir.c cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c dir.c
echo WinRel\dir.obj >>link.rel echo WinRel\dir.obj >>link.rel
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c main.c cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c main.c
echo WinRel\main.obj >>link.rel echo WinRel\main.obj >>link.rel
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c getopt1.c cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c getopt1.c
echo WinRel\getopt1.obj >>link.rel echo WinRel\getopt1.obj >>link.rel
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c job.c cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c job.c
echo WinRel\job.obj >>link.rel echo WinRel\job.obj >>link.rel
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c read.c cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c read.c
echo WinRel\read.obj >>link.rel echo WinRel\read.obj >>link.rel
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c version.c cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c version.c
echo WinRel\version.obj >>link.rel echo WinRel\version.obj >>link.rel
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c getopt.c cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c getopt.c
echo WinRel\getopt.obj >>link.rel echo WinRel\getopt.obj >>link.rel
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c arscan.c cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c arscan.c
echo WinRel\arscan.obj >>link.rel echo WinRel\arscan.obj >>link.rel
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c remake.c cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c remake.c
echo WinRel\remake.obj >>link.rel echo WinRel\remake.obj >>link.rel
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c misc.c cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c hash.c
echo WinRel\hash.obj >>link.rel
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c strcache.c
echo WinRel\strcache.obj >>link.rel
cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c misc.c
echo WinRel\misc.obj >>link.rel echo WinRel\misc.obj >>link.rel
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c ar.c cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c ar.c
echo WinRel\ar.obj >>link.rel echo WinRel\ar.obj >>link.rel
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c function.c cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c function.c
echo WinRel\function.obj >>link.rel echo WinRel\function.obj >>link.rel
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c vpath.c cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c vpath.c
echo WinRel\vpath.obj >>link.rel echo WinRel\vpath.obj >>link.rel
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c implicit.c cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c implicit.c
echo WinRel\implicit.obj >>link.rel echo WinRel\implicit.obj >>link.rel
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\w32\compat\dirent.c cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\w32\compat\dirent.c
echo WinRel\dirent.obj >>link.rel echo WinRel\dirent.obj >>link.rel
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\glob\glob.c cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\glob\glob.c
echo WinRel\glob.obj >>link.rel echo WinRel\glob.obj >>link.rel
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\glob\fnmatch.c cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\glob\fnmatch.c
echo WinRel\fnmatch.obj >>link.rel echo WinRel\fnmatch.obj >>link.rel
cl.exe /nologo /MT /W3 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\w32\pathstuff.c cl.exe /nologo /MT /W4 /GX /YX /O2 /I . /I glob /I w32/include /D NDEBUG /D WINDOWS32 /D WIN32 /D _CONSOLE /D HAVE_CONFIG_H /FR.\WinRel/ /Fp.\WinRel/%make%.pch /Fo.\WinRel/ /c .\w32\pathstuff.c
echo WinRel\pathstuff.obj >>link.rel echo WinRel\pathstuff.obj >>link.rel
echo off echo off
echo "Linking WinRel/%make%.exe" echo "Linking WinRel/%make%.exe"
rem link.exe kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib w32\subproc\winrel\subproc.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:no /PDB:.\WinRel/%make%.pdb /MACHINE:I386 /OUT:.\WinRel/%make%.exe .\WinRel/variable.obj .\WinRel/rule.obj .\WinRel/remote-stub.obj .\WinRel/commands.obj .\WinRel/file.obj .\WinRel/getloadavg.obj .\WinRel/default.obj .\WinRel/signame.obj .\WinRel/expand.obj .\WinRel/dir.obj .\WinRel/main.obj .\WinRel/getopt1.obj .\WinRel/job.obj .\WinRel/read.obj .\WinRel/version.obj .\WinRel/getopt.obj .\WinRel/arscan.obj .\WinRel/remake.obj .\WinRel/misc.obj .\WinRel/ar.obj .\WinRel/function.obj .\WinRel/vpath.obj .\WinRel/implicit.obj .\WinRel/dirent.obj .\WinRel/glob.obj .\WinRel/fnmatch.obj .\WinRel/pathstuff.obj rem link.exe kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib w32\subproc\winrel\subproc.lib /NOLOGO /SUBSYSTEM:console /INCREMENTAL:no /PDB:.\WinRel/%make%.pdb /MACHINE:I386 /OUT:.\WinRel/%make%.exe .\WinRel/variable.obj .\WinRel/rule.obj .\WinRel/remote-stub.obj .\WinRel/commands.obj .\WinRel/file.obj .\WinRel/getloadavg.obj .\WinRel/default.obj .\WinRel/signame.obj .\WinRel/expand.obj .\WinRel/dir.obj .\WinRel/main.obj .\WinRel/getopt1.obj .\WinRel/job.obj .\WinRel/read.obj .\WinRel/version.obj .\WinRel/getopt.obj .\WinRel/arscan.obj .\WinRel/remake.obj .\WinRel/misc.obj .\WinRel/hash.obj .\WinRel/strcache.obj .\WinRel/ar.obj .\WinRel/function.obj .\WinRel/vpath.obj .\WinRel/implicit.obj .\WinRel/dirent.obj .\WinRel/glob.obj .\WinRel/fnmatch.obj .\WinRel/pathstuff.obj
echo kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib w32\subproc\winrel\subproc.lib >>link.rel echo kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib w32\subproc\winrel\subproc.lib >>link.rel
link.exe /NOLOGO /SUBSYSTEM:console /INCREMENTAL:no /PDB:.\WinRel/%make%.pdb /MACHINE:I386 /OUT:.\WinRel/%make%.exe @link.rel link.exe /NOLOGO /SUBSYSTEM:console /INCREMENTAL:no /PDB:.\WinRel/%make%.pdb /MACHINE:I386 /OUT:.\WinRel/%make%.exe @link.rel
if not exist .\WinRel/%make%.exe echo "WinRel build failed" if not exist .\WinRel/%make%.exe echo "WinRel build failed"
if exist .\WinRel/%make%.exe echo "WinRel build succeeded!" if exist .\WinRel/%make%.exe echo "WinRel build succeeded!"
set make=
GoTo BuildEnd
:GCCBuild
echo on
gcc -mthreads -Wall -gstabs+ -ggdb3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c variable.c
gcc -mthreads -Wall -gstabs+ -ggdb3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c rule.c
gcc -mthreads -Wall -gstabs+ -ggdb3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c remote-stub.c
gcc -mthreads -Wall -gstabs+ -ggdb3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c commands.c
gcc -mthreads -Wall -gstabs+ -ggdb3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c file.c
gcc -mthreads -Wall -gstabs+ -ggdb3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c getloadavg.c
gcc -mthreads -Wall -gstabs+ -ggdb3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c default.c
gcc -mthreads -Wall -gstabs+ -ggdb3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c signame.c
gcc -mthreads -Wall -gstabs+ -ggdb3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c expand.c
gcc -mthreads -Wall -gstabs+ -ggdb3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c dir.c
gcc -mthreads -Wall -gstabs+ -ggdb3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c main.c
gcc -mthreads -Wall -gstabs+ -ggdb3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c getopt1.c
gcc -mthreads -Wall -gstabs+ -ggdb3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c job.c
gcc -mthreads -Wall -gstabs+ -ggdb3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c read.c
gcc -mthreads -Wall -gstabs+ -ggdb3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c version.c
gcc -mthreads -Wall -gstabs+ -ggdb3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c getopt.c
gcc -mthreads -Wall -gstabs+ -ggdb3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c arscan.c
gcc -mthreads -Wall -gstabs+ -ggdb3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c remake.c
gcc -mthreads -Wall -gstabs+ -ggdb3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c hash.c
gcc -mthreads -Wall -gstabs+ -ggdb3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c strcache.c
gcc -mthreads -Wall -gstabs+ -ggdb3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c misc.c
gcc -mthreads -Wall -gstabs+ -ggdb3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c ar.c
gcc -mthreads -Wall -gstabs+ -ggdb3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c function.c
gcc -mthreads -Wall -gstabs+ -ggdb3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c vpath.c
gcc -mthreads -Wall -gstabs+ -ggdb3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c implicit.c
gcc -mthreads -Wall -gstabs+ -ggdb3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c ./glob/glob.c -o glob.o
gcc -mthreads -Wall -gstabs+ -ggdb3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c ./glob/fnmatch.c -o fnmatch.o
gcc -mthreads -Wall -gstabs+ -ggdb3 -O2 -I. -I./glob -I./w32/include -DWINDOWS32 -DHAVE_CONFIG_H -c ./w32/pathstuff.c -o pathstuff.o
gcc -mthreads -gstabs+ -ggdb3 -o gnumake.exe variable.o rule.o remote-stub.o commands.o file.o getloadavg.o default.o signame.o expand.o dir.o main.o getopt1.o job.o read.o version.o getopt.o arscan.o remake.o misc.o hash.o strcache.o ar.o function.o vpath.o implicit.o glob.o fnmatch.o pathstuff.o w32_misc.o sub_proc.o w32err.o -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lodbc32 -lodbccp32
:BuildEnd
echo on echo on

View File

@@ -1,21 +1,20 @@
/* Command processing for GNU Make. /* Command processing for GNU Make.
Copyright (C) 1988,89,91,92,93,94,95,96,97 Free Software Foundation, Inc. Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
This file is part of GNU Make. This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify GNU Make is free software; you can redistribute it and/or modify it under the
it under the terms of the GNU General Public License as published by terms of the GNU General Public License as published by the Free Software
the Free Software Foundation; either version 2, or (at your option) Foundation; either version 2, or (at your option) any later version.
any later version.
GNU Make is distributed in the hope that it will be useful, GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
but WITHOUT ANY WARRANTY; without even the implied warranty of WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the A PARTICULAR PURPOSE. See the GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License along with
along with GNU Make; see the file COPYING. If not, write to GNU Make; see the file COPYING. If not, write to the Free Software
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
Boston, MA 02111-1307, USA. */
#include "make.h" #include "make.h"
#include "dep.h" #include "dep.h"
@@ -23,6 +22,10 @@ Boston, MA 02111-1307, USA. */
#include "variable.h" #include "variable.h"
#include "job.h" #include "job.h"
#include "commands.h" #include "commands.h"
#ifdef WINDOWS32
#include <windows.h>
#include "w32err.h"
#endif
#if VMS #if VMS
# define FILE_LIST_SEPARATOR ',' # define FILE_LIST_SEPARATOR ','
@@ -38,10 +41,10 @@ extern int getpid ();
/* Set FILE's automatic variables up. */ /* Set FILE's automatic variables up. */
static void void
set_file_variables (file) set_file_variables (struct file *file)
register struct file *file;
{ {
struct dep *d;
char *at, *percent, *star, *less; char *at, *percent, *star, *less;
#ifndef NO_ARCHIVES #ifndef NO_ARCHIVES
@@ -106,8 +109,14 @@ set_file_variables (file)
} }
star = file->stem; star = file->stem;
/* $< is the first dependency. */ /* $< is the first not order-only dependency. */
less = file->deps != 0 ? dep_name (file->deps) : ""; less = "";
for (d = file->deps; d != 0; d = d->next)
if (!d->ignore_mtime)
{
less = dep_name (d);
break;
}
if (file->cmds == default_file->cmds) if (file->cmds == default_file->cmds)
/* This file got its commands from .DEFAULT. /* This file got its commands from .DEFAULT.
@@ -127,14 +136,14 @@ set_file_variables (file)
/* Compute the values for $^, $+, $?, and $|. */ /* Compute the values for $^, $+, $?, and $|. */
{ {
static char *plus_value=0, *bar_value=0, *qmark_value=0;
static unsigned int qmark_max=0, plus_max=0, bar_max=0;
unsigned int qmark_len, plus_len, bar_len; unsigned int qmark_len, plus_len, bar_len;
char *caret_value, *plus_value;
char *cp; char *cp;
char *qmark_value; char *caret_value;
char *bar_value;
char *qp; char *qp;
char *bp; char *bp;
struct dep *d;
unsigned int len; unsigned int len;
/* Compute first the value for $+, which is supposed to contain /* Compute first the value for $+, which is supposed to contain
@@ -147,7 +156,9 @@ set_file_variables (file)
if (plus_len == 0) if (plus_len == 0)
plus_len++; plus_len++;
cp = plus_value = (char *) alloca (plus_len); if (plus_len > plus_max)
plus_value = xrealloc (plus_value, plus_max = plus_len);
cp = plus_value;
qmark_len = plus_len + 1; /* Will be this or less. */ qmark_len = plus_len + 1; /* Will be this or less. */
for (d = file->deps; d != 0; d = d->next) for (d = file->deps; d != 0; d = d->next)
@@ -193,8 +204,14 @@ set_file_variables (file)
/* Compute the values for $^, $?, and $|. */ /* Compute the values for $^, $?, and $|. */
cp = caret_value = plus_value; /* Reuse the buffer; it's big enough. */ cp = caret_value = plus_value; /* Reuse the buffer; it's big enough. */
qp = qmark_value = (char *) alloca (qmark_len);
bp = bar_value = (char *) alloca (bar_len); if (qmark_len > qmark_max)
qmark_value = xrealloc (qmark_value, qmark_max = qmark_len);
qp = qmark_value;
if (bar_len > bar_max)
bar_value = xrealloc (bar_value, bar_max = bar_len);
bp = bar_value;
for (d = file->deps; d != 0; d = d->next) for (d = file->deps; d != 0; d = d->next)
{ {
@@ -249,8 +266,7 @@ set_file_variables (file)
Also set the `lines_flags' and `any_recurse' members. */ Also set the `lines_flags' and `any_recurse' members. */
void void
chop_commands (cmds) chop_commands (struct commands *cmds)
register struct commands *cmds;
{ {
register char *p; register char *p;
unsigned int nlines, idx; unsigned int nlines, idx;
@@ -333,13 +349,11 @@ chop_commands (cmds)
flags |= COMMANDS_NOERROR; flags |= COMMANDS_NOERROR;
break; break;
} }
if (!(flags & COMMANDS_RECURSE))
{ /* If no explicit '+' was given, look for MAKE variable references. */
unsigned int len = strlen (p); if (!(flags & COMMANDS_RECURSE)
if (sindex (p, len, "$(MAKE)", 7) != 0 && (strstr (p, "$(MAKE)") != 0 || strstr (p, "${MAKE}") != 0))
|| sindex (p, len, "${MAKE}", 7) != 0) flags |= COMMANDS_RECURSE;
flags |= COMMANDS_RECURSE;
}
cmds->lines_flags[idx] = flags; cmds->lines_flags[idx] = flags;
cmds->any_recurse |= flags & COMMANDS_RECURSE; cmds->any_recurse |= flags & COMMANDS_RECURSE;
@@ -351,8 +365,7 @@ chop_commands (cmds)
fork off a child process to run the first command line in the sequence. */ fork off a child process to run the first command line in the sequence. */
void void
execute_file_commands (file) execute_file_commands (struct file *file)
struct file *file;
{ {
register char *p; register char *p;
@@ -389,8 +402,7 @@ int handling_fatal_signal = 0;
/* Handle fatal signals. */ /* Handle fatal signals. */
RETSIGTYPE RETSIGTYPE
fatal_error_signal (sig) fatal_error_signal (int sig)
int sig;
{ {
#ifdef __MSDOS__ #ifdef __MSDOS__
extern int dos_status, dos_command_running; extern int dos_status, dos_command_running;
@@ -411,6 +423,27 @@ fatal_error_signal (sig)
exit (10); exit (10);
#else /* not Amiga */ #else /* not Amiga */
#ifdef WINDOWS32
extern HANDLE main_thread;
/* Windows creates a sperate thread for handling Ctrl+C, so we need
to suspend the main thread, or else we will have race conditions
when both threads call reap_children. */
if (main_thread)
{
DWORD susp_count = SuspendThread (main_thread);
if (susp_count != 0)
fprintf (stderr, "SuspendThread: suspend count = %ld\n", susp_count);
else if (susp_count == (DWORD)-1)
{
DWORD ierr = GetLastError ();
fprintf (stderr, "SuspendThread: error %ld: %s\n",
ierr, map_windows32_error_to_string (ierr));
}
}
#endif
handling_fatal_signal = 1; handling_fatal_signal = 1;
/* Set the handling for this signal to the default. /* Set the handling for this signal to the default.
@@ -472,10 +505,18 @@ fatal_error_signal (sig)
exit (EXIT_FAILURE); exit (EXIT_FAILURE);
#endif #endif
#ifdef WINDOWS32
if (main_thread)
CloseHandle (main_thread);
/* Cannot call W32_kill with a pid (it needs a handle). The exit
status of 130 emulates what happens in Bash. */
exit (130);
#else
/* Signal the same code; this time it will really be fatal. The signal /* Signal the same code; this time it will really be fatal. The signal
will be unblocked when we return and arrive then to kill us. */ will be unblocked when we return and arrive then to kill us. */
if (kill (getpid (), sig) < 0) if (kill (getpid (), sig) < 0)
pfatal_with_name ("kill"); pfatal_with_name ("kill");
#endif /* not WINDOWS32 */
#endif /* not Amiga */ #endif /* not Amiga */
#endif /* not __MSDOS__ */ #endif /* not __MSDOS__ */
} }
@@ -484,11 +525,10 @@ fatal_error_signal (sig)
and it has changed on disk since we last stat'd it. */ and it has changed on disk since we last stat'd it. */
static void static void
delete_target (file, on_behalf_of) delete_target (struct file *file, char *on_behalf_of)
struct file *file;
char *on_behalf_of;
{ {
struct stat st; struct stat st;
int e;
if (file->precious || file->phony) if (file->precious || file->phony)
return; return;
@@ -512,7 +552,8 @@ delete_target (file, on_behalf_of)
} }
#endif #endif
if (stat (file->name, &st) == 0 EINTRLOOP (e, stat (file->name, &st));
if (e == 0
&& S_ISREG (st.st_mode) && S_ISREG (st.st_mode)
&& FILE_TIMESTAMP_STAT_MODTIME (file->name, st) != file->last_mtime) && FILE_TIMESTAMP_STAT_MODTIME (file->name, st) != file->last_mtime)
{ {
@@ -531,8 +572,7 @@ delete_target (file, on_behalf_of)
Set the flag in CHILD to say they've been deleted. */ Set the flag in CHILD to say they've been deleted. */
void void
delete_child_targets (child) delete_child_targets (struct child *child)
struct child *child;
{ {
struct dep *d; struct dep *d;
@@ -552,8 +592,7 @@ delete_child_targets (child)
/* Print out the commands in CMDS. */ /* Print out the commands in CMDS. */
void void
print_commands (cmds) print_commands (struct commands *cmds)
register struct commands *cmds;
{ {
register char *s; register char *s;

View File

@@ -1,21 +1,20 @@
/* Definition of data structures describing shell commands for GNU Make. /* Definition of data structures describing shell commands for GNU Make.
Copyright (C) 1988, 1989, 1991, 1993 Free Software Foundation, Inc. Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
This file is part of GNU Make. This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify GNU Make is free software; you can redistribute it and/or modify it under the
it under the terms of the GNU General Public License as published by terms of the GNU General Public License as published by the Free Software
the Free Software Foundation; either version 2, or (at your option) Foundation; either version 2, or (at your option) any later version.
any later version.
GNU Make is distributed in the hope that it will be useful, GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
but WITHOUT ANY WARRANTY; without even the implied warranty of WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the A PARTICULAR PURPOSE. See the GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License along with
along with GNU Make; see the file COPYING. If not, write to GNU Make; see the file COPYING. If not, write to the Free Software
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
Boston, MA 02111-1307, USA. */
/* Structure that gives the commands to make a file /* Structure that gives the commands to make a file
and information about where these commands came from. */ and information about where these commands came from. */
@@ -40,3 +39,4 @@ extern void execute_file_commands PARAMS ((struct file *file));
extern void print_commands PARAMS ((struct commands *cmds)); extern void print_commands PARAMS ((struct commands *cmds));
extern void delete_child_targets PARAMS ((struct child *child)); extern void delete_child_targets PARAMS ((struct child *child));
extern void chop_commands PARAMS ((struct commands *cmds)); extern void chop_commands PARAMS ((struct commands *cmds));
extern void set_file_variables PARAMS ((struct file *file));

View File

@@ -1,4 +1,19 @@
/* config.h.in. Generated automatically from configure.in by autoheader. */ /* config.h -- hand-massaged for Amiga -*-C-*-
Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
GNU Make; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
/* Define if on AIX 3. /* Define if on AIX 3.
System headers sometimes define this. System headers sometimes define this.
@@ -146,6 +161,9 @@
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */ /* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
/* #undef STAT_MACROS_BROKEN */ /* #undef STAT_MACROS_BROKEN */
/* Define if your compiler conforms to the ANSI C standard. */
#define HAVE_ANSI_COMPILER 1
/* Define if you have the ANSI C header files. */ /* Define if you have the ANSI C header files. */
#define STDC_HEADERS #define STDC_HEADERS
@@ -277,6 +295,9 @@
/* Define if you have the <ndir.h> header file. */ /* Define if you have the <ndir.h> header file. */
/* #undef HAVE_NDIR_H */ /* #undef HAVE_NDIR_H */
/* Define to 1 if you have the <stdarg.h> header file. */
#define HAVE_STDARG_H 1
/* Define if you have the <stdlib.h> header file. */ /* Define if you have the <stdlib.h> header file. */
/* #undef HAVE_STDLIB_H */ /* #undef HAVE_STDLIB_H */

View File

@@ -1,4 +1,21 @@
/* config.h-vms. Generated by hand by Klaus Kämpf <kkaempf@rmi.de> */ /* config.h-vms. Generated by hand by Klaus Kämpf <kkaempf@rmi.de> -*-C-*-
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
GNU Make; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
/* config.h. Generated automatically by configure. */ /* config.h. Generated automatically by configure. */
/* config.h.in. Generated automatically from configure.in by autoheader. */ /* config.h.in. Generated automatically from configure.in by autoheader. */
@@ -306,6 +323,12 @@
/* Define if you have the <ndir.h> header file. */ /* Define if you have the <ndir.h> header file. */
/* #undef HAVE_NDIR_H */ /* #undef HAVE_NDIR_H */
/* Define if your compiler conforms to the ANSI C standard. */
#define HAVE_ANSI_COMPILER 1
/* Define to 1 if you have the <stdarg.h> header file. */
#define HAVE_STDARG_H 1
/* Define if you have the <stdlib.h> header file. */ /* Define if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1 #define HAVE_STDLIB_H 1
@@ -344,7 +367,7 @@
/* Define for case insensitve filenames */ /* Define for case insensitve filenames */
#define HAVE_CASE_INSENSITIVE_FS 1 #define HAVE_CASE_INSENSITIVE_FS 1
/* VMS specific, define it if you want to use case sensitve targets */ /* VMS specific, define it if you want to use case sensitive targets */
/* #undef WANT_CASE_SENSITIVE_TARGETS */ /* #undef WANT_CASE_SENSITIVE_TARGETS */
/* VMS specific, V7.0 has opendir() and friends, so it's undefined */ /* VMS specific, V7.0 has opendir() and friends, so it's undefined */
@@ -377,11 +400,13 @@
#ifdef __DECC #ifdef __DECC
#include <stdio.h> #include <stdio.h>
#include <unistd.h> #include <unistd.h>
#define getopt gnu_getopt #define getopt gnu_getopt
#define optarg gnu_optarg #define optarg gnu_optarg
#define optopt gnu_optopt #define optopt gnu_optopt
#define optind gnu_optind #define optind gnu_optind
#define opterr gnu_opterr #define opterr gnu_opterr
#define globfree gnu_globfree
#define glob gnu_glob
#endif #endif
#if defined (__cplusplus) || (defined (__STDC__) && __STDC__) #if defined (__cplusplus) || (defined (__STDC__) && __STDC__)

View File

@@ -1,82 +1,432 @@
/* config.h.in. Generated automatically from configure.in by autoheader. */ /* config.h.W32 -- hand-massaged config.h file for Windows builds -*-C-*-
/* Define if on AIX 3. Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
GNU Make; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
/* Suppress some Visual C++ warnings.
Maybe after the code cleanup for ISO C we can remove some/all of these. */
#if _MSC_VER > 1000
# pragma warning(disable:4100) /* unreferenced formal parameter */
# pragma warning(disable:4102) /* unreferenced label */
# pragma warning(disable:4127) /* conditional expression is constant */
# pragma warning(disable:4131) /* uses old-style declarator */
# pragma warning(disable:4702) /* unreachable code */
#endif
/* Define to 1 if the `closedir' function returns void instead of `int'. */
/* #undef CLOSEDIR_VOID */
/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
systems. This function is required for `alloca.c' support on those systems.
*/
/* #undef CRAY_STACKSEG_END */
/* Define to 1 if using `alloca.c'. */
/* #undef C_ALLOCA */
/* Define to 1 if using `getloadavg.c'. */
/*#define C_GETLOADAVG 1*/
/* Define to 1 for DGUX with <sys/dg_sys_info.h>. */
/* #undef DGUX */
/* Define to 1 if translation of program messages to the user's native
language is requested. */
/* #undef ENABLE_NLS */
/* Use high resolution file timestamps if nonzero. */
#define FILE_TIMESTAMP_HI_RES 0
/* Define to 1 if the `getloadavg' function needs to be run setuid or setgid.
*/
/* #undef GETLOADAVG_PRIVILEGED */
/* Define to 1 if you have `alloca', as a function or macro. */
#define HAVE_ALLOCA 1
/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
*/
/* #undef HAVE_ALLOCA_H */
/* Define if your compiler conforms to the ANSI C standard. */
#define HAVE_ANSI_COMPILER 1
/* Define to 1 if you have the `bsd_signal' function. */
/* #undef HAVE_BSD_SIGNAL */
/* Use case insensitive file names */
/* #undef HAVE_CASE_INSENSITIVE_FS */
/* Define if you have the clock_gettime function. */
/* #undef HAVE_CLOCK_GETTIME */
/* Define if the GNU dcgettext() function is already present or preinstalled.
*/
/* #undef HAVE_DCGETTEXT */
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
*/
#define HAVE_DIRENT_H 1
/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */
/* #undef HAVE_DOPRNT */
/* Use platform specific coding */
#define HAVE_DOS_PATHS 1
/* Define to 1 if you have the `dup2' function. */
#define HAVE_DUP2 1
/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1
/* Define to 1 if you have the `fdopen' function. */
/*#define HAVE_FDOPEN 1*/
/* Define to 1 if you have the `fork' function. */
/* #undef HAVE_FORK */
/* Define to 1 if you have the `getcwd' function. */
#define HAVE_GETCWD 1
/* Define to 1 if you have the `getgroups' function. */
/* #undef HAVE_GETGROUPS */
/* Define to 1 if you have the `gethostbyname' function. */
/* #undef HAVE_GETHOSTBYNAME */
/* Define to 1 if you have the `gethostname' function. */
/* #undef HAVE_GETHOSTNAME */
/* Define to 1 if you have the `getloadavg' function. */
/* #undef HAVE_GETLOADAVG */
/* Define to 1 if you have the `getrlimit' function. */
/* #undef HAVE_GETRLIMIT */
/* Define if the GNU gettext() function is already present or preinstalled. */
/* #undef HAVE_GETTEXT */
/* Define if you have a standard gettimeofday function */
/* #undef HAVE_GETTIMEOFDAY */
/* Define if you have the iconv() function. */
/* #undef HAVE_ICONV */
/* Define to 1 if you have the <inttypes.h> header file. */
/*#define HAVE_INTTYPES_H 1*/
/* Define to 1 if you have the `dgc' library (-ldgc). */
/* #undef HAVE_LIBDGC */
/* Define to 1 if you have the `kstat' library (-lkstat). */
/* #undef HAVE_LIBKSTAT */
/* Define to 1 if you have the <limits.h> header file. */
#define HAVE_LIMITS_H 1
/* Define to 1 if you have the <locale.h> header file. */
/*#define HAVE_LOCALE_H 1*/
/* Define to 1 if you have the <mach/mach.h> header file. */
/* #undef HAVE_MACH_MACH_H */
/* Define to 1 if you have the `memmove' function. */
#define HAVE_MEMMOVE 1
/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1
/* Define to 1 if you have the `mkstemp' function. */
/* #undef HAVE_MKSTEMP */
/* Define to 1 if you have the `mktemp' function. */
#define HAVE_MKTEMP 1
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
/* #undef HAVE_NDIR_H */
/* Define to 1 if you have the <nlist.h> header file. */
/* #undef HAVE_NLIST_H */
/* Define to 1 if you have the `pipe' function. */
/* #undef HAVE_PIPE */
/* Define to 1 if you have the `pstat_getdynamic' function. */
/* #undef HAVE_PSTAT_GETDYNAMIC */
/* Define to 1 if you have the `realpath' function. */
/* #undef HAVE_REALPATH */
/* Define if <signal.h> defines the SA_RESTART constant. */
/* #undef HAVE_SA_RESTART */
/* Define to 1 if you have the `setegid' function. */
/* #undef HAVE_SETEGID */
/* Define to 1 if you have the `seteuid' function. */
/* #undef HAVE_SETEUID */
/* Define to 1 if you have the `setlinebuf' function. */
/* #undef HAVE_SETLINEBUF */
/* Define to 1 if you have the `setlocale' function. */
/*#define HAVE_SETLOCALE 1*/
/* Define to 1 if you have the `setregid' function. */
/* #undef HAVE_SETREGID */
/* Define to 1 if you have the `setreuid' function. */
/* #undef HAVE_SETREUID */
/* Define to 1 if you have the `setrlimit' function. */
/* #undef HAVE_SETRLIMIT */
/* Define to 1 if you have the `setvbuf' function. */
/*#define HAVE_SETVBUF 1 */
/* Define to 1 if you have the `sigaction' function. */
/* #undef HAVE_SIGACTION */
/* Define to 1 if you have the `sigsetmask' function. */
/* #undef HAVE_SIGSETMASK */
/* Define to 1 if you have the `socket' function. */
/* #undef HAVE_SOCKET */
/* Define to 1 if you have the <stdarg.h> header file. */
#define HAVE_STDARG_H 1
/* Define to 1 if you have the <stdint.h> header file. */
/*#define HAVE_STDINT_H 1*/
/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1
/* Define to 1 if you have the `strcasecmp' function. */
/* #undef HAVE_STRCASECMP */
/* Define to 1 if you have the `strchr' function. */
#define HAVE_STRCHR 1
/* Define to 1 if you have the `strcoll' function and it is properly defined.
*/
#define HAVE_STRCOLL 1
/* Define to 1 if you have the `strdup' function. */
/* #define HAVE_STRDUP 1*/
/* Define to 1 if you have the `strerror' function. */
#define HAVE_STRERROR 1
/* Define to 1 if you have the <strings.h> header file. */
/* #define HAVE_STRINGS_H 1 */
/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1
/* Define to 1 if you have the `strsignal' function. */
/* #undef HAVE_STRSIGNAL */
/* Define to 1 if `n_un.n_name' is member of `struct nlist'. */
/* #undef HAVE_STRUCT_NLIST_N_UN_N_NAME */
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
*/
/* #undef HAVE_SYS_DIR_H */
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
*/
/* #undef HAVE_SYS_NDIR_H */
/* Define to 1 if you have the <sys/param.h> header file. */
/* #define HAVE_SYS_PARAM_H 1 */
/* Define to 1 if you have the <sys/resource.h> header file. */
/* #undef HAVE_SYS_RESOURCE_H */
/* Define to 1 if you have the <sys/stat.h> header file. */
/* #define HAVE_SYS_STAT_H 1 */
/* Define to 1 if you have the <sys/timeb.h> header file. */
/*#define HAVE_SYS_TIMEB_H 1*/
/* Define to 1 if you have the <sys/time.h> header file. */
/*#define HAVE_SYS_TIME_H 1*/
/* Define to 1 if you have the <sys/types.h> header file. */
/*#define HAVE_SYS_TYPES_H 1*/
/* Define to 1 if you have the <sys/wait.h> header file. */
/* #undef HAVE_SYS_WAIT_H */
/* Define this if you have the \`union wait' type in <sys/wait.h>. */
/* #undef HAVE_UNION_WAIT */
/* Define to 1 if you have the <unistd.h> header file. */
/* #define HAVE_UNISTD_H 1*/
/* Define to 1 if you have the <varargs.h> header file. */
/* #undef HAVE_VARARGS_H */
/* Define to 1 if you have the `vfork' function. */
/* #undef HAVE_VFORK */
/* Define to 1 if you have the <vfork.h> header file. */
/* #undef HAVE_VFORK_H */
/* Define to 1 if you have the `vprintf' function. */
#define HAVE_VPRINTF 1
/* Define to 1 if you have the `wait3' function. */
/* #undef HAVE_WAIT3 */
/* Define to 1 if you have the `waitpid' function. */
/* #undef HAVE_WAITPID */
/* Define to 1 if `fork' works. */
/* #undef HAVE_WORKING_FORK */
/* Define to 1 if `vfork' works. */
/* #undef HAVE_WORKING_VFORK */
/* Build host information. */
#define MAKE_HOST "Windows32"
/* Define this to enable job server support in GNU make. */
/* #undef MAKE_JOBSERVER */
/* Define to 1 if your `struct nlist' has an `n_un' member. Obsolete, depend
on `HAVE_STRUCT_NLIST_N_UN_N_NAME */
/* #undef NLIST_NAME_UNION */
/* Define if struct nlist.n_name is a pointer rather than an array. */
/* #undef NLIST_STRUCT */
/* Define to 1 if your C compiler doesn't accept -c and -o together. */
/* #undef NO_MINUS_C_MINUS_O */
/* Name of this package (needed by automake) */
#define PACKAGE "%PACKAGE%"
/* Define to 1 if the C compiler supports function prototypes. */
#define PROTOTYPES 1
/* Define as the return type of signal handlers (`int' or `void'). */
#define RETSIGTYPE void
/* Define to the name of the SCCS 'get' command. */
#define SCCS_GET "echo no sccs get"
/* Define this if the SCCS 'get' command understands the '-G<file>' option. */
/* #undef SCCS_GET_MINUS_G */
/* Define to 1 if the `setvbuf' function takes the buffering type as its
second argument and the buffer pointer as the third, as on System V before
release 3. */
/* #undef SETVBUF_REVERSED */
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown */
/* #undef STACK_DIRECTION */
/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
/* #undef STAT_MACROS_BROKEN */
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define if struct stat contains a nanoseconds field */
/* #undef ST_MTIM_NSEC */
/* Define to 1 on System V Release 4. */
/* #undef SVR4 */
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
/* #define TIME_WITH_SYS_TIME 1 */
/* Define to 1 for Encore UMAX. */
/* #undef UMAX */
/* Define to 1 for Encore UMAX 4.3 that has <inq_status/cpustats.h> instead of
<sys/cpustats.h>. */
/* #undef UMAX4_3 */
/* Version number of package */
#define VERSION "%VERSION%"
/* Define if using the dmalloc debugging malloc package */
/* #undef WITH_DMALLOC */
/* Define to 1 if on AIX 3.
System headers sometimes define this. System headers sometimes define this.
We just want to avoid a redefinition error message. */ We just want to avoid a redefinition error message. */
#ifndef _ALL_SOURCE #ifndef _ALL_SOURCE
/* #undef _ALL_SOURCE */ /* # undef _ALL_SOURCE */
#endif #endif
/* Define if using alloca.c. */ /* Number of bits in a file offset, on hosts where this is settable. */
/* #undef C_ALLOCA */ /* #undef _FILE_OFFSET_BITS */
/* Define if the closedir function returns void instead of int. */ /* Define for large files, on AIX-style hosts. */
/* #undef CLOSEDIR_VOID */ /* #undef _LARGE_FILES */
/* Define to empty if the keyword does not work. */ /* Define to 1 if on MINIX. */
/* #undef _MINIX */
/* Define to 2 if the system does not provide POSIX.1 features except with
this defined. */
/* #undef _POSIX_1_SOURCE */
/* Define to 1 if you need to in order for `stat' and other things to work. */
#define _POSIX_SOURCE 1
/* Define like PROTOTYPES; this can be used by system headers. */
/*#define __PROTOTYPES 1*/
/* Define to empty if `const' does not conform to ANSI C. */
/* #undef const */ /* #undef const */
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems. /* Define to `int' if <sys/types.h> doesn't define. */
This function is required for alloca.c support on those systems. */ #define gid_t int
/* #undef CRAY_STACKSEG_END */
/* Define for DGUX with <sys/dg_sys_info.h>. */ /* Define to `int' if <sys/types.h> does not define. */
/* #undef DGUX */ #define pid_t int
/* Define if the `getloadavg' function needs to be run setuid or setgid. */ /* Define to `int' if <sys/types.h> doesn't define. */
/* #undef GETLOADAVG_PRIVILEGED */ #define uid_t int
/* Define uintmax_t if not defined in <stdint.h> or <inttypes.h>. */
#define uintmax_t unsigned long
/* Define as `fork' if `vfork' does not work. */
/*#define vfork fork*/
/* Define to `unsigned long' or `unsigned long long' /* Define to `unsigned long' or `unsigned long long'
if <inttypes.h> doesn't define. */ if <inttypes.h> doesn't define. */
#define uintmax_t unsigned long #define uintmax_t unsigned long
/* Define to `int' if <sys/types.h> doesn't define. */
#undef gid_t
#define gid_t int
/* Define if you have alloca, as a function or macro. */
#undef HAVE_ALLOCA
#define HAVE_ALLOCA 1
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
/* #undef HAVE_ALLOCA_H */
/* Define if you don't have vprintf but do have _doprnt. */
/* #undef HAVE_DOPRNT */
/* Define if your system has a working fnmatch function. */
/* #undef HAVE_FNMATCH */
/* Define if your system has its own `getloadavg' function. */
/* #undef HAVE_GETLOADAVG */
/* Define if you have the getmntent function. */
/* #undef HAVE_GETMNTENT */
/* Define if the `long double' type works. */
/* #undef HAVE_LONG_DOUBLE */
/* Define if you support file names longer than 14 characters. */ /* Define if you support file names longer than 14 characters. */
#undef HAVE_LONG_FILE_NAMES
#define HAVE_LONG_FILE_NAMES 1 #define HAVE_LONG_FILE_NAMES 1
/* Define if you have a working `mmap' system call. */
/* #undef HAVE_MMAP */
/* Define if system calls automatically restart after interruption
by a signal. */
/* #undef HAVE_RESTARTABLE_SYSCALLS */
/* Define if your struct stat has st_blksize. */
/* #undef HAVE_ST_BLKSIZE */
/* Define if your struct stat has st_blocks. */
/* #undef HAVE_ST_BLOCKS */
/* Define if you have the strcoll function and it is properly defined. */
#undef HAVE_STRCOLL
#define HAVE_STRCOLL 1
/* Define if your struct stat has st_rdev. */ /* Define if your struct stat has st_rdev. */
#undef HAVE_ST_RDEV #undef HAVE_ST_RDEV
#define HAVE_ST_RDEV 1 #define HAVE_ST_RDEV 1
@@ -96,293 +446,36 @@
#undef HAVE_TZNAME #undef HAVE_TZNAME
#define HAVE_TZNAME 1 #define HAVE_TZNAME 1
/* Define if you have <unistd.h>. */
/* #undef HAVE_UNISTD_H */
/* Define if utime(file, NULL) sets file's timestamp to the present. */ /* Define if utime(file, NULL) sets file's timestamp to the present. */
#undef HAVE_UTIME_NULL #undef HAVE_UTIME_NULL
#define HAVE_UTIME_NULL 1 #define HAVE_UTIME_NULL 1
/* Define if you have <vfork.h>. */
/* #undef HAVE_VFORK_H */
/* Define if you have the vprintf function. */
#undef HAVE_VPRINTF
#define HAVE_VPRINTF 1
/* Define if you have the wait3 system call. */
/* #undef HAVE_WAIT3 */
/* Define if on MINIX. */
/* #undef _MINIX */
/* Define if your struct nlist has an n_un member. */
/* #undef NLIST_NAME_UNION */
/* Define if you have <nlist.h>. */
/* #undef NLIST_STRUCT */
/* Define if your C compiler doesn't accept -c and -o together. */
/* #undef NO_MINUS_C_MINUS_O */
/* Define to `int' if <sys/types.h> doesn't define. */
#undef pid_t
#define pid_t int
/* Define if the system does not provide POSIX.1 features except
with this defined. */
/* #undef _POSIX_1_SOURCE */
/* Define if you need to in order for stat and other things to work. */
#undef _POSIX_SOURCE
#define _POSIX_SOURCE 1
/* Define as the return type of signal handlers (int or void). */
#undef RETSIGTYPE
#define RETSIGTYPE void
/* Define if the setvbuf function takes the buffering type as its second
argument and the buffer pointer as the third, as on System V
before release 3. */
/* #undef SETVBUF_REVERSED */
/* If using the C implementation of alloca, define if you know the
direction of stack growth for your system; otherwise it will be
automatically deduced at run-time.
STACK_DIRECTION > 0 => grows toward higher addresses
STACK_DIRECTION < 0 => grows toward lower addresses
STACK_DIRECTION = 0 => direction of growth unknown
*/
/* #undef STACK_DIRECTION */
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
/* #undef STAT_MACROS_BROKEN */
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
#define STDC_HEADERS 1
/* Define on System V Release 4. */
/* #undef SVR4 */
/* Define if `sys_siglist' is declared by <signal.h>. */
/* #undef SYS_SIGLIST_DECLARED */
/* Define to `int' if <sys/types.h> doesn't define. */
#undef uid_t
#define uid_t int
/* Define for Encore UMAX. */
/* #undef UMAX */
/* Define for Encore UMAX 4.3 that has <inq_status/cpustats.h>
instead of <sys/cpustats.h>. */
/* #undef UMAX4_3 */
/* Define vfork as fork if vfork does not work. */
/* #undef vfork */
/* Name of this package (needed by automake) */
#define PACKAGE "%PACKAGE%"
/* Version of this package (needed by automake) */
#define VERSION "%VERSION%"
/* Define to the name of the SCCS `get' command. */
#undef SCCS_GET
#define SCCS_GET "echo no sccs get"
/* Define to 1 if NLS is requested. */
/* #undef ENABLE_NLS */
/* Define as 1 if you have dcgettext. */
/* #undef HAVE_DCGETTEXT */
/* Define as 1 if you have gettext and don't want to use GNU gettext. */
/* #undef HAVE_GETTEXT */
/* Define if your locale.h file contains LC_MESSAGES. */
/* #undef HAVE_LC_MESSAGES */
/* Define to the installation directory for locales. */ /* Define to the installation directory for locales. */
#define LOCALEDIR "" #define LOCALEDIR ""
/* Define this if the SCCS `get' command understands the `-G<file>' option. */
/* #undef SCCS_GET_MINUS_G */
/* Define this to enable job server support in GNU make. */
/* #undef MAKE_JOBSERVER */
/* Define to be the nanoseconds member of struct stat's st_mtim,
if it exists. */
/* #undef ST_MTIM_NSEC */
/* Define this if the C library defines the variable `sys_siglist'. */
/* #undef HAVE_SYS_SIGLIST */
/* Define this if the C library defines the variable `_sys_siglist'. */
/* #undef HAVE__SYS_SIGLIST */
/* Define this if you have the `union wait' type in <sys/wait.h>. */
/* #undef HAVE_UNION_WAIT */
/* Define if you have the dup2 function. */
#undef HAVE_DUP2
#define HAVE_DUP2 1
/* Define if you have the getcwd function. */
#undef HAVE_GETCWD
#define HAVE_GETCWD 1
/* Define if you have the getgroups function. */
/* #undef HAVE_GETGROUPS */
/* Define if you have the gethostbyname function. */
/* #undef HAVE_GETHOSTBYNAME */
/* Define if you have the gethostname function. */
/* #undef HAVE_GETHOSTNAME */
/* Define if you have the getloadavg function. */
/* #undef HAVE_GETLOADAVG */
/* Define if you have the memmove function. */
#undef HAVE_MEMMOVE
#define HAVE_MEMMOVE 1
/* Define if you have the mktemp function. */
#undef HAVE_MKTEMP
#define HAVE_MKTEMP 1
/* Define if you have the psignal function. */
/* #undef HAVE_PSIGNAL */
/* Define if you have the pstat_getdynamic function. */
/* #undef HAVE_PSTAT_GETDYNAMIC */
/* Define if you have the setegid function. */
/* #undef HAVE_SETEGID */
/* Define if you have the seteuid function. */
/* #undef HAVE_SETEUID */
/* Define if you have the setlinebuf function. */
/* #undef HAVE_SETLINEBUF */
/* Define if you have the setregid function. */
/* #undef HAVE_SETREGID */
/* Define if you have the setreuid function. */
/* #undef HAVE_SETREUID */
/* Define if you have the sigsetmask function. */
/* #undef HAVE_SIGSETMASK */
/* Define if you have the socket function. */
/* #undef HAVE_SOCKET */
/* Define if you have the strcasecmp function. */
/* #undef HAVE_STRCASECMP */
/* Define if you have the strerror function. */
#undef HAVE_STRERROR
#define HAVE_STRERROR 1
/* Define if you have the strsignal function. */
/* #undef HAVE_STRSIGNAL */
/* Define if you have the wait3 function. */
/* #undef HAVE_WAIT3 */
/* Define if you have the waitpid function. */
/* #undef HAVE_WAITPID */
/* Define if you have the <dirent.h> header file. */
#undef HAVE_DIRENT_H
#define HAVE_DIRENT_H 1
/* Define if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
#define HAVE_FCNTL_H 1
/* Define if you have the <limits.h> header file. */
#undef HAVE_LIMITS_H
#define HAVE_LIMITS_H 1
/* Define if you have the <mach/mach.h> header file. */
/* #undef HAVE_MACH_MACH_H */
/* Define if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
#define HAVE_MEMORY_H 1
/* Define if you have the <ndir.h> header file. */
/* #undef HAVE_NDIR_H */
/* Define if you have the <string.h> header file. */
#undef HAVE_STRING_H
#define HAVE_STRING_H 1
/* Define if you have the <sys/dir.h> header file. */
/* #undef HAVE_SYS_DIR_H */
/* Define if you have the <sys/ndir.h> header file. */
/* #undef HAVE_SYS_NDIR_H */
/* Define if you have the <sys/param.h> header file. */
/* #undef HAVE_SYS_PARAM_H */
/* Define if you have the <sys/timeb.h> header file. */
#undef HAVE_SYS_TIMEB_H
#define HAVE_SYS_TIMEB_H 1
/* Define if you have the <sys/wait.h> header file. */
/* #undef HAVE_SYS_WAIT_H */
/* Define if you have the <unistd.h> header file. */
/* #undef HAVE_UNISTD_H */
/* Define if you have the dgc library (-ldgc). */
/* #undef HAVE_LIBDGC */
/* Define if you have the kstat library (-lkstat). */
/* #undef HAVE_LIBKSTAT */
/* Define if you have the sun library (-lsun). */
/* #undef HAVE_LIBSUN */
/* Use high resolution file timestamps if nonzero. */
#define FILE_TIMESTAMP_HI_RES 0
/* Build host information. */
#define MAKE_HOST "Windows32"
/* Grok DOS paths (drive specs and backslash path element separators) */
#define HAVE_DOS_PATHS
/* /*
* Refer to README.W32 for info on the following settings * Refer to README.W32 for info on the following settings
*/ */
/* /*
* If you have a shell that does not grok 'sh -c quoted-command-line' * If you have a shell that does not grok 'sh -c quoted-command-line'
* correctly, you need this setting. Please see below for specific * correctly, you need this setting. Please see below for specific
* shell support. * shell support.
*/ */
#undef BATCH_MODE_ONLY_SHELL /*#define BATCH_MODE_ONLY_SHELL 1 */
#define BATCH_MODE_ONLY_SHELL 1
/* /*
* Define if you have the Cygnus "Cygwin" GNU Windows32 tool set. * Define if you have the Cygnus "Cygwin" GNU Windows32 tool set.
* Do NOT define BATCH_MODE_ONLY_SHELL if you define HAVE_CYGWIN_SHELL * Do NOT define BATCH_MODE_ONLY_SHELL if you define HAVE_CYGWIN_SHELL
*/ */
#undef HAVE_CYGWIN_SHELL /*#define HAVE_CYGWIN_SHELL 1 */
/* /*
* Define if you have the MKS tool set or shell. Do NOT define * Define if you have the MKS tool set or shell. Do NOT define
* BATCH_MODE_ONLY_SHELL if you define HAVE_MKS_SHELL * BATCH_MODE_ONLY_SHELL if you define HAVE_MKS_SHELL
*/ */
#undef HAVE_MKS_SHELL /*#define HAVE_MKS_SHELL 1 */
/* /*
* Enforce the mutual exclusivity restriction. * Enforce the mutual exclusivity restriction.
@@ -394,6 +487,3 @@
#ifdef HAVE_CYGWIN_SHELL #ifdef HAVE_CYGWIN_SHELL
#undef BATCH_MODE_ONLY_SHELL #undef BATCH_MODE_ONLY_SHELL
#endif #endif
/* Define if you prefer Case Insensitive behavior */
#undef HAVE_CASE_INSENSITIVE_FS

View File

@@ -1,4 +1,7 @@
*.m4 *.m4
config.* config.*
mkinstalldirs
texinfo.tex
mdate-sh
Makefile Makefile.in Makefile Makefile.in

View File

@@ -1,3 +1,18 @@
2006-03-09 Paul Smith <psmith@gnu.org>
* dospaths.m4: Add MSYS to the list of targets allowing DOS-style
pathnames. Reported by David Ergo <david.ergo@alterface.com>.
2005-07-01 Paul D. Smith <psmith@gnu.org>
* Makefile.am (EXTRA_DIST): Added more M4 files to EXTRA_DIST, so
users can re-run aclocal.
2003-04-30 Paul D. Smith <psmith@gnu.org>
* dospaths.m4: New macro to test for DOS-style pathnames, based on
coreutils 5.0 "dos.m4" by Jim Meyering.
2002-04-21 gettextize <bug-gnu-gettext@gnu.org> 2002-04-21 gettextize <bug-gnu-gettext@gnu.org>
* codeset.m4: New file, from gettext-0.11.1. * codeset.m4: New file, from gettext-0.11.1.
@@ -11,4 +26,19 @@
* lib-prefix.m4: New file, from gettext-0.11.1. * lib-prefix.m4: New file, from gettext-0.11.1.
* progtest.m4: New file, from gettext-0.11.1. * progtest.m4: New file, from gettext-0.11.1.
* Makefile.am: New file. * Makefile.am: New file.
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
GNU Make; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

View File

@@ -1,4 +1,22 @@
EXTRA_DIST = codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 \ # -*-Makefile-*-, or close enough
# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This file is part of GNU Make.
#
# GNU Make is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2, or (at your option) any later version.
#
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# GNU Make; see the file COPYING. If not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
EXTRA_DIST = codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 nls.m4 \
intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 \ intdiv0.m4 inttypes-pri.m4 inttypes.m4 inttypes_h.m4 \
isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 \ isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 \
progtest.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 progtest.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 longlong.m4 \
dospaths.m4 po.m4 signed.m4 longdouble.m4 wchar_t.m4 \
wint_t.m4 intmax.m4 printf-posix.m4 xsize.m4 size_max.m4

37
config/dospaths.m4 Normal file
View File

@@ -0,0 +1,37 @@
# 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, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This file is part of GNU Make.
#
# GNU Make is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2, or (at your option) any later version.
#
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# GNU Make; see the file COPYING. If not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
AC_DEFUN([pds_AC_DOS_PATHS],
[
AC_CACHE_CHECK([whether system uses MSDOS-style paths], [ac_cv_dos_paths],
[
AC_COMPILE_IFELSE([
#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __EMX__ && !defined __MSYS__
neither MSDOS nor Windows nor OS2
#endif
],
[ac_cv_dos_paths=yes],
[ac_cv_dos_paths=no])
])
if test x"$ac_cv_dos_paths" = xyes; then
AC_DEFINE_UNQUOTED([HAVE_DOS_PATHS], 1,
[Define if the system uses DOS-style pathnames.])
fi
])

View File

@@ -1,3 +1,20 @@
/* configh.dos -- hand-massaged config.h file for MS-DOS builds -*-C-*-
Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
GNU Make; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
/* Many things are defined already by a system header. */ /* Many things are defined already by a system header. */
#include <sys/config.h> #include <sys/config.h>
@@ -56,6 +73,12 @@
/* Define if you have the select function. */ /* Define if you have the select function. */
#define HAVE_SELECT 1 #define HAVE_SELECT 1
/* Define if your compiler conforms to the ANSI C standard. */
#define HAVE_ANSI_COMPILER 1
/* Define to 1 if you have the <stdarg.h> header file. */
#define HAVE_STDARG_H 1
/* Define if you have the vprintf library function. */ /* Define if you have the vprintf library function. */
#undef HAVE_VPRINTF #undef HAVE_VPRINTF
#define HAVE_VPRINTF 1 #define HAVE_VPRINTF 1

View File

@@ -1,4 +1,22 @@
@echo off @echo off
rem Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
rem 2004, 2005, 2006 Free Software Foundation, Inc.
rem This file is part of GNU Make.
rem GNU Make is free software; you can redistribute it and/or modify it under
rem the terms of the GNU General Public License as published by the Free
rem Software Foundation; either version 2, or (at your option) any later
rem version.
rem GNU Make is distributed in the hope that it will be useful, but WITHOUT
rem ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
rem FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
rem more details.
rem You should have received a copy of the GNU General Public License along
rem with GNU Make; see the file COPYING. If not, write to the Free Software
rem Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
echo Configuring MAKE for DJGPP echo Configuring MAKE for DJGPP
rem The SmallEnv trick protects against too small environment block, rem The SmallEnv trick protects against too small environment block,

View File

@@ -1,9 +1,24 @@
# Process this file with autoconf to produce a configure script. # Process this file with autoconf to produce a configure script.
#
# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This file is part of GNU Make.
#
# GNU Make is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2, or (at your option) any later version.
#
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# GNU Make; see the file COPYING. If not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
AC_INIT(GNU make,3.80,bug-make@gnu.org) AC_INIT([GNU make],[3.81],[bug-make@gnu.org])
AC_PREREQ(2.54)
AC_PREREQ(2.59)
AC_REVISION([[$Id$]]) AC_REVISION([[$Id$]])
# Autoconf setup # Autoconf setup
@@ -12,8 +27,7 @@ AC_CONFIG_SRCDIR(vpath.c)
AC_CONFIG_HEADERS(config.h) AC_CONFIG_HEADERS(config.h)
# Automake setup # Automake setup
AM_INIT_AUTOMAKE AM_INIT_AUTOMAKE([1.9])
AC_PROG_MAKE_SET
# Checks for programs. # Checks for programs.
AC_PROG_CC AC_PROG_CC
@@ -30,9 +44,12 @@ AC_AIX
AC_ISC_POSIX AC_ISC_POSIX
AC_MINIX AC_MINIX
# Needed for ansi2knr
AM_C_PROTOTYPES
# Enable gettext, in "external" mode. # Enable gettext, in "external" mode.
AM_GNU_GETTEXT_VERSION(0.11.5) AM_GNU_GETTEXT_VERSION(0.14.1)
AM_GNU_GETTEXT([external]) AM_GNU_GETTEXT([external])
# This test must come as early as possible after the compiler configuration # This test must come as early as possible after the compiler configuration
@@ -49,10 +66,19 @@ AC_HEADER_DIRENT
AC_HEADER_STAT AC_HEADER_STAT
AC_HEADER_TIME AC_HEADER_TIME
AC_CHECK_HEADERS(stdlib.h locale.h unistd.h limits.h fcntl.h string.h \ AC_CHECK_HEADERS(stdlib.h locale.h unistd.h limits.h fcntl.h string.h \
memory.h sys/param.h sys/time.h sys/timeb.h) memory.h sys/param.h sys/resource.h sys/time.h sys/timeb.h)
# Set a flag if we have an ANSI C compiler
if test "$ac_cv_prog_cc_stdc" != no; then
AC_DEFINE(HAVE_ANSI_COMPILER, 1,
[Define if your compiler conforms to the ANSI C standard.])
fi
# Determine what kind of variadic function calls we support
AC_CHECK_HEADERS(stdarg.h varargs.h, break)
AM_PROG_CC_C_O AM_PROG_CC_C_O
AM_PROG_CC_STDC
AC_C_CONST AC_C_CONST
AC_TYPE_SIGNAL AC_TYPE_SIGNAL
AC_TYPE_UID_T AC_TYPE_UID_T
@@ -63,7 +89,8 @@ AC_TYPE_PID_T
AC_CHECK_TYPE(uintmax_t,,[ AC_CHECK_TYPE(uintmax_t,,[
uintmax_t="unsigned long" uintmax_t="unsigned long"
AC_CHECK_TYPE(unsigned long long,[uintmax_t="unsigned long long"]) AC_CHECK_TYPE(unsigned long long,[uintmax_t="unsigned long long"])
AC_DEFINE_UNQUOTED(uintmax_t,$uintmax_t,[Define uintmax_t if not defined in <stdint.h> or <inttypes.h>.])]) AC_DEFINE_UNQUOTED(uintmax_t,$uintmax_t,
[Define uintmax_t if not defined in <stdint.h> or <inttypes.h>.])])
# Find out whether our struct stat returns nanosecond resolution timestamps. # Find out whether our struct stat returns nanosecond resolution timestamps.
@@ -72,12 +99,13 @@ AC_MSG_CHECKING([whether to use high resolution file timestamps])
AC_CACHE_VAL(make_cv_file_timestamp_hi_res, [ AC_CACHE_VAL(make_cv_file_timestamp_hi_res, [
make_cv_file_timestamp_hi_res=no make_cv_file_timestamp_hi_res=no
if test "$ac_cv_struct_st_mtim_nsec" != no; then if test "$ac_cv_struct_st_mtim_nsec" != no; then
AC_TRY_COMPILE([ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
# if HAVE_INTTYPES_H # if HAVE_INTTYPES_H
# include <inttypes.h> # include <inttypes.h>
# endif], # endif]],
[char a[0x7fffffff < (uintmax_t) -1 >> 30 ? 1 : -1];], [[char a[0x7fffffff < (uintmax_t)-1 >> 30 ? 1 : -1];]])],
make_cv_file_timestamp_hi_res=yes) [make_cv_file_timestamp_hi_res=yes],
[])
fi]) fi])
AC_MSG_RESULT($make_cv_file_timestamp_hi_res) AC_MSG_RESULT($make_cv_file_timestamp_hi_res)
if test "$make_cv_file_timestamp_hi_res" = yes; then if test "$make_cv_file_timestamp_hi_res" = yes; then
@@ -98,39 +126,42 @@ if test "$make_cv_file_timestamp_hi_res" = yes; then
fi fi
fi fi
# Check for DOS-style pathnames.
pds_AC_DOS_PATHS
# See if we have a standard version of gettimeofday(). Since actual # See if we have a standard version of gettimeofday(). Since actual
# implementations can differ, just make sure we have the most common # implementations can differ, just make sure we have the most common
# one. # one.
AC_CACHE_CHECK([for standard gettimeofday], ac_cv_func_gettimeofday, AC_CACHE_CHECK([for standard gettimeofday], ac_cv_func_gettimeofday,
[ac_cv_func_gettimeofday=no [ac_cv_func_gettimeofday=no
AC_TRY_RUN([#include <sys/time.h> AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <sys/time.h>
int main () int main ()
{ {
struct timeval t; t.tv_sec = -1; t.tv_usec = -1; struct timeval t; t.tv_sec = -1; t.tv_usec = -1;
exit (gettimeofday (&t, 0) != 0 exit (gettimeofday (&t, 0) != 0
|| t.tv_sec < 0 || t.tv_usec < 0); || t.tv_sec < 0 || t.tv_usec < 0);
}], }]])],
ac_cv_func_gettimeofday=yes, [ac_cv_func_gettimeofday=yes],
ac_cv_func_gettimeofday=no, [ac_cv_func_gettimeofday=no],
ac_cv_func_gettimeofday="no (cross-compiling)")]) [ac_cv_func_gettimeofday="no (cross-compiling)"])])
if test "$ac_cv_func_gettimeofday" = yes; then if test "$ac_cv_func_gettimeofday" = yes; then
AC_DEFINE(HAVE_GETTIMEOFDAY, 1, AC_DEFINE(HAVE_GETTIMEOFDAY, 1,
[Define if you have a standard gettimeofday function]) [Define if you have a standard gettimeofday function])
fi fi
AC_CHECK_FUNCS( memcpy memmove strchr strdup mkstemp mktemp fdopen \ AC_CHECK_FUNCS( memcpy memmove strchr strdup mkstemp mktemp fdopen \
bsd_signal dup2 getcwd sigsetmask sigaction getgroups \ bsd_signal dup2 getcwd realpath sigsetmask sigaction \
seteuid setegid setlinebuf setreuid setregid setvbuf pipe \ getgroups seteuid setegid setlinebuf setreuid setregid \
strerror strsignal) getrlimit setrlimit setvbuf pipe strerror strsignal \
lstat readlink atexit)
make_FUNC_SETVBUF_REVERSED AC_FUNC_SETVBUF_REVERSED
# strcoll() is used by the GNU glob library # strcoll() is used by the GNU glob library
AC_FUNC_STRCOLL AC_FUNC_STRCOLL
AC_FUNC_ALLOCA AC_FUNC_ALLOCA
AC_FUNC_VFORK AC_FUNC_FORK([])
AC_FUNC_VPRINTF AC_FUNC_VPRINTF
AC_FUNC_CLOSEDIR_VOID AC_FUNC_CLOSEDIR_VOID
@@ -140,52 +171,70 @@ AC_FUNC_GETLOADAVG
# doesn't. So, we will. # doesn't. So, we will.
if test "$ac_cv_header_nlist_h" = yes; then if test "$ac_cv_header_nlist_h" = yes; then
AC_TRY_COMPILE([#include <nlist.h>], AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <nlist.h>]],
[struct nlist nl; [[struct nlist nl;
nl.n_name = "string"; nl.n_name = "string";
return 0;], return 0;]])],
make_cv_nlist_struct=yes, [make_cv_nlist_struct=yes],
make_cv_nlist_struct=no) [make_cv_nlist_struct=no])
if test "$make_cv_nlist_struct" = yes; then if test "$make_cv_nlist_struct" = yes; then
AC_DEFINE(NLIST_STRUCT, 1, AC_DEFINE(NLIST_STRUCT, 1,
[Define if struct nlist.n_name is a pointer rather than an array.]) [Define if struct nlist.n_name is a pointer rather than an array.])
fi fi
fi fi
AC_DECL_SYS_SIGLIST AC_CHECK_DECLS([sys_siglist, _sys_siglist, __sys_siglist], , ,
[AC_INCLUDES_DEFAULT
#include <signal.h>
/* NetBSD declares sys_siglist in unistd.h. */
#if HAVE_UNISTD_H
# include <unistd.h>
#endif
])
# Check out the wait reality. # Check out the wait reality.
AC_CHECK_HEADERS(sys/wait.h) AC_CHECK_HEADERS(sys/wait.h)
AC_CHECK_FUNCS(waitpid wait3) AC_CHECK_FUNCS(waitpid wait3)
AC_MSG_CHECKING(for union wait) AC_MSG_CHECKING(for union wait)
AC_CACHE_VAL(make_cv_union_wait, [dnl AC_CACHE_VAL(make_cv_union_wait, [dnl
AC_TRY_LINK([#include <sys/types.h> AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
#include <sys/wait.h>], #include <sys/wait.h>]],
[union wait status; int pid; pid = wait (&status); [[union wait status; int pid; pid = wait (&status);
#ifdef WEXITSTATUS #ifdef WEXITSTATUS
/* Some POSIXoid systems have both the new-style macros and the old /* Some POSIXoid systems have both the new-style macros and the old
union wait type, and they do not work together. If union wait union wait type, and they do not work together. If union wait
conflicts with WEXITSTATUS et al, we don't want to use it at all. */ conflicts with WEXITSTATUS et al, we don't want to use it at all. */
if (WEXITSTATUS (status) != 0) pid = -1; if (WEXITSTATUS (status) != 0) pid = -1;
#ifdef WTERMSIG #ifdef WTERMSIG
/* If we have WEXITSTATUS and WTERMSIG, just use them on ints. */ /* If we have WEXITSTATUS and WTERMSIG, just use them on ints. */
-- blow chunks here -- -- blow chunks here --
#endif #endif
#endif #endif
#ifdef HAVE_WAITPID #ifdef HAVE_WAITPID
/* Make sure union wait works with waitpid. */ /* Make sure union wait works with waitpid. */
pid = waitpid (-1, &status, 0); pid = waitpid (-1, &status, 0);
#endif #endif
], ]])],
[make_cv_union_wait=yes], [make_cv_union_wait=no])]) [make_cv_union_wait=yes],
[make_cv_union_wait=no])])
if test "$make_cv_union_wait" = yes; then if test "$make_cv_union_wait" = yes; then
AC_DEFINE(HAVE_UNION_WAIT, 1, [Define this if you have the \`union wait' type in <sys/wait.h>.]) AC_DEFINE(HAVE_UNION_WAIT, 1,
[Define this if you have the \`union wait' type in <sys/wait.h>.])
fi fi
AC_MSG_RESULT($make_cv_union_wait) AC_MSG_RESULT($make_cv_union_wait)
# If we're building on Windows/DOS/OS/2, add some support for DOS drive specs.
if test "$PATH_SEPARATOR" = ';'; then
AC_DEFINE(HAVE_DOS_PATHS, 1,
[Define this if your system requires backslashes or drive specs in pathnames.])
fi
# See if the user wants to use pmake's "customs" distributed build capability # See if the user wants to use pmake's "customs" distributed build capability
AC_SUBST(REMOTE) REMOTE=stub
use_customs=false use_customs=false
AC_ARG_WITH(customs, AC_ARG_WITH(customs,
AC_HELP_STRING([--with-customs=DIR], AC_HELP_STRING([--with-customs=DIR],
@@ -201,6 +250,7 @@ AC_ARG_WITH(customs,
CF_NETLIBS CF_NETLIBS
AC_CHECK_HEADER(customs.h, AC_CHECK_HEADER(customs.h,
[use_customs=true [use_customs=true
REMOTE=cstms
LIBS="$LIBS -lcustoms" LDFLAGS="$make_ldflags"], LIBS="$LIBS -lcustoms" LDFLAGS="$make_ldflags"],
[with_customs=no [with_customs=no
CPPFLAGS="$make_cppflags" make_badcust=yes]) CPPFLAGS="$make_cppflags" make_badcust=yes])
@@ -209,6 +259,15 @@ AC_ARG_WITH(customs,
# Tell automake about this, so it can include the right .c files. # Tell automake about this, so it can include the right .c files.
AM_CONDITIONAL(USE_CUSTOMS, test "$use_customs" = true) AM_CONDITIONAL(USE_CUSTOMS, test "$use_customs" = true)
# See if the user asked to handle case insensitive file systems.
AH_TEMPLATE(HAVE_CASE_INSENSITIVE_FS, [Use case insensitive file names])
AC_ARG_ENABLE(case-insensitive-file-system,
AC_HELP_STRING([--enable-case-insensitive-file-system],
[enable case insensitive file system support]),
case_insensitive_fs="yes" AC_DEFINE(HAVE_CASE_INSENSITIVE_FS),
case_insensitive_fs="no")
# See if we can handle the job server feature, and if the user wants it. # See if we can handle the job server feature, and if the user wants it.
AC_ARG_ENABLE(job-server, AC_ARG_ENABLE(job-server,
@@ -223,21 +282,36 @@ case "$ac_cv_func_waitpid/$ac_cv_func_wait3" in
esac esac
AC_CACHE_CHECK(for SA_RESTART, make_cv_sa_restart, [ AC_CACHE_CHECK(for SA_RESTART, make_cv_sa_restart, [
AC_TRY_COMPILE([#include <signal.h>], AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <signal.h>]],
[return SA_RESTART;], [[return SA_RESTART;]])],
make_cv_sa_restart=yes, [make_cv_sa_restart=yes],
make_cv_sa_restart=no)]) [make_cv_sa_restart=no])])
if test "$make_cv_sa_restart" != no; then if test "$make_cv_sa_restart" != no; then
AC_DEFINE(HAVE_SA_RESTART, 1, AC_DEFINE(HAVE_SA_RESTART, 1,
[Define if <signal.h> defines the SA_RESTART constant.]) [Define if <signal.h> defines the SA_RESTART constant.])
fi fi
# enable make_cv_sa_restart for OS/2 so that the jobserver will be enabled,
# but do it after HAVE_SA_RESTART has been defined.
case "$host_os" in
os2*) make_cv_sa_restart=yes ;;
esac
case "$ac_cv_func_pipe/$ac_cv_func_sigaction/$make_cv_sa_restart/$has_wait_nohang/$make_cv_job_server" in case "$ac_cv_func_pipe/$ac_cv_func_sigaction/$make_cv_sa_restart/$has_wait_nohang/$make_cv_job_server" in
yes/yes/yes/yes/yes) yes/yes/yes/yes/yes)
AC_DEFINE(MAKE_JOBSERVER, 1, AC_DEFINE(MAKE_JOBSERVER, 1,
[Define this to enable job server support in GNU make.]);; [Define this to enable job server support in GNU make.]);;
esac esac
# if we have both lstat() and readlink() then we can support symlink
# timechecks.
case "$ac_cv_func_lstat/$ac_cv_func_readlink" in
yes/yes)
AC_DEFINE(MAKE_SYMLINKS, 1,
[Define this to enable symbolic link timestamp checking.]);;
esac
# Find the SCCS commands, so we can include them in our default rules. # Find the SCCS commands, so we can include them in our default rules.
AC_CACHE_CHECK(for location of SCCS get command, make_cv_path_sccs_get, [ AC_CACHE_CHECK(for location of SCCS get command, make_cv_path_sccs_get, [
@@ -246,7 +320,8 @@ if test -f /usr/sccs/get; then
else else
make_cv_path_sccs_get=get make_cv_path_sccs_get=get
fi]) fi])
AC_DEFINE_UNQUOTED(SCCS_GET, ["$make_cv_path_sccs_get"], [Define to the name of the SCCS 'get' command.]) AC_DEFINE_UNQUOTED(SCCS_GET, ["$make_cv_path_sccs_get"],
[Define to the name of the SCCS 'get' command.])
ac_clean_files="$ac_clean_files s.conftest conftoast" # Remove these later. ac_clean_files="$ac_clean_files s.conftest conftoast" # Remove these later.
if ( /usr/sccs/admin -n s.conftest || admin -n s.conftest ) >/dev/null 2>&1 && if ( /usr/sccs/admin -n s.conftest || admin -n s.conftest ) >/dev/null 2>&1 &&
@@ -291,27 +366,24 @@ make_cv_sys_gnu_glob=no])])
# Tell automake about this, so it can build the right .c files. # Tell automake about this, so it can build the right .c files.
AM_CONDITIONAL(USE_LOCAL_GLOB, test "$make_cv_sys_gnu_glob" = no) AM_CONDITIONAL(USE_LOCAL_GLOB, test "$make_cv_sys_gnu_glob" = no)
# PTX systems have a broken implementation of SA_RESTART. I know of
# no way to test for this behavior, so I'll just test for PTX
case "$host" in
i386-sequent-sysv4)
AC_DEFINE(HAVE_BROKEN_RESTART, 1, [This system has SA_RESTART, but it doesn't work properly.])
echo ""
echo "WARNING: The SA_RESTART sigaction() flag does not work on PTX."
echo " This causes 'make -j' to fail at random times."
echo " I am installing a workaround, which is mostly but not 100%"
echo " effective. If you see random failures during 'make -j'"
echo " you should either contact the bug list, or not use -j."
echo "" ;;
esac
# Let the makefile know what our build host is # Let the makefile know what our build host is
AC_DEFINE_UNQUOTED(MAKE_HOST,"$host",[Build host information.]) AC_DEFINE_UNQUOTED(MAKE_HOST,"$host",[Build host information.])
MAKE_HOST="$host" MAKE_HOST="$host"
AC_SUBST(MAKE_HOST) AC_SUBST(MAKE_HOST)
w32_target_env=no
AM_CONDITIONAL([WINDOWSENV], false)
case "$host" in
*-*-mingw32)
AM_CONDITIONAL(WINDOWSENV, true)
w32_target_env=yes
AC_DEFINE([WINDOWS32], [1], [Use platform specific coding])
AC_DEFINE([HAVE_DOS_PATHS], [1], [Use platform specific coding])
;;
esac
# Include the Maintainer's Makefile section, if it's here. # Include the Maintainer's Makefile section, if it's here.
MAINT_MAKEFILE=/dev/null MAINT_MAKEFILE=/dev/null
@@ -323,6 +395,9 @@ AC_SUBST_FILE(MAINT_MAKEFILE)
# Allow building with dmalloc # Allow building with dmalloc
AM_WITH_DMALLOC AM_WITH_DMALLOC
# Forcibly disable SET_MAKE. If it's set it breaks things like the test
# scripts, etc.
SET_MAKE=
# Sanity check and inform the user of what we found # Sanity check and inform the user of what we found
@@ -367,20 +442,18 @@ esac
# Specify what files are to be created. # Specify what files are to be created.
# We only generate the build.sh if we have a build.sh.in; we won't have AC_CONFIG_FILES(Makefile glob/Makefile po/Makefile.in config/Makefile doc/Makefile w32/Makefile)
# one before we've created a distribution.
AC_CONFIG_FILES(Makefile glob/Makefile po/Makefile.in config/Makefile doc/Makefile)
if test -f $srcdir/build.sh.in; then
AC_CONFIG_FILES(build.sh)
fi
# OK, do it! # OK, do it!
AC_OUTPUT AC_OUTPUT
# We only generate the build.sh if we have a build.sh.in; we won't have
# one before we've created a distribution.
if test -f "$srcdir/build.sh.in"; then
./config.status --file build.sh
chmod +x build.sh
fi
dnl Local Variables: dnl Local Variables:
dnl comment-start: "dnl " dnl comment-start: "dnl "

25
debug.h
View File

@@ -1,22 +1,19 @@
/* Debugging macros and interface. /* Debugging macros and interface.
Copyright (C) 1999 Free Software Foundation, Inc. Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
This file is part of GNU Make. This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify GNU Make is free software; you can redistribute it and/or modify it under the
it under the terms of the GNU General Public License as published by terms of the GNU General Public License as published by the Free Software
the Free Software Foundation; either version 2, or (at your option) Foundation; either version 2, or (at your option) any later version.
any later version.
GNU Make is distributed in the hope that it will be useful, GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
but WITHOUT ANY WARRANTY; without even the implied warranty of WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the A PARTICULAR PURPOSE. See the GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GNU Make; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
You should have received a copy of the GNU General Public License along with
GNU Make; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
#define DB_NONE (0x000) #define DB_NONE (0x000)
#define DB_BASIC (0x001) #define DB_BASIC (0x001)

View File

@@ -1,34 +1,33 @@
/* Data base of default implicit rules for GNU Make. /* Data base of default implicit rules for GNU Make.
Copyright (C) 1988,89,90,91,92,93,94,95,96 Free Software Foundation, Inc. Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
This file is part of GNU Make. This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify GNU Make is free software; you can redistribute it and/or modify it under the
it under the terms of the GNU General Public License as published by terms of the GNU General Public License as published by the Free Software
the Free Software Foundation; either version 2, or (at your option) Foundation; either version 2, or (at your option) any later version.
any later version.
GNU Make is distributed in the hope that it will be useful, GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
but WITHOUT ANY WARRANTY; without even the implied warranty of WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the A PARTICULAR PURPOSE. See the GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License along with
along with GNU Make; see the file COPYING. If not, write to GNU Make; see the file COPYING. If not, write to the Free Software
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
Boston, MA 02111-1307, USA. */
#include "make.h" #include "make.h"
#include "filedef.h"
#include "variable.h"
#include "rule.h" #include "rule.h"
#include "dep.h" #include "dep.h"
#include "filedef.h"
#include "job.h" #include "job.h"
#include "commands.h" #include "commands.h"
#include "variable.h"
/* Define GCC_IS_NATIVE if gcc is the native development environment on /* Define GCC_IS_NATIVE if gcc is the native development environment on
your system (gcc/bison/flex vs cc/yacc/lex). */ your system (gcc/bison/flex vs cc/yacc/lex). */
#ifdef __MSDOS__ #if defined(__MSDOS__) || defined(__EMX__)
#define GCC_IS_NATIVE # define GCC_IS_NATIVE
#endif #endif
@@ -41,6 +40,10 @@ static char default_suffixes[]
= ".exe .olb .ln .obj .c .cxx .cc .pas .p .for .f .r .y .l .mar \ = ".exe .olb .ln .obj .c .cxx .cc .pas .p .for .f .r .y .l .mar \
.s .ss .i .ii .mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \ .s .ss .i .ii .mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
.w .ch .cweb .web .com .sh .elc .el"; .w .ch .cweb .web .com .sh .elc .el";
#elif defined(__EMX__)
= ".out .a .ln .o .c .cc .C .cpp .p .f .F .r .y .l .s .S \
.mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
.w .ch .web .sh .elc .el .obj .exe .dll .lib";
#else #else
= ".out .a .ln .o .c .cc .C .cpp .p .f .F .r .y .l .s .S \ = ".out .a .ln .o .c .cc .C .cpp .p .f .F .r .y .l .s .S \
.mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \ .mod .sym .def .h .info .dvi .tex .texinfo .texi .txinfo \
@@ -153,6 +156,8 @@ static char *default_suffix_rules[] =
"$(COMPILE.cc)/noprep/noobj/machine /list=$@ $<", "$(COMPILE.cc)/noprep/noobj/machine /list=$@ $<",
".cc.obj", ".cc.obj",
"$(COMPILE.cc) /obj=$@ $<", "$(COMPILE.cc) /obj=$@ $<",
".cxx.obj",
"$(COMPILE.cxx) /obj=$@ $<",
".for.obj", ".for.obj",
"$(COMPILE.for) /obj=$@ $<", "$(COMPILE.for) /obj=$@ $<",
".pas.obj", ".pas.obj",
@@ -302,7 +307,11 @@ static char *default_variables[] =
#ifdef VMS #ifdef VMS
#ifdef __ALPHA #ifdef __ALPHA
"ARCH", "ALPHA", "ARCH", "ALPHA",
#else #endif
#ifdef __ia64
"ARCH", "IA64",
#endif
#ifdef __VAX
"ARCH", "VAX", "ARCH", "VAX",
#endif #endif
"AR", "library/obj", "AR", "library/obj",
@@ -511,7 +520,7 @@ static char *default_variables[] =
/* Set up the default .SUFFIXES list. */ /* Set up the default .SUFFIXES list. */
void void
set_default_suffixes () set_default_suffixes (void)
{ {
suffix_file = enter_file (".SUFFIXES"); suffix_file = enter_file (".SUFFIXES");
@@ -533,7 +542,7 @@ set_default_suffixes ()
installed after. */ installed after. */
void void
install_default_suffix_rules () install_default_suffix_rules (void)
{ {
register char **s; register char **s;
@@ -558,7 +567,7 @@ install_default_suffix_rules ()
/* Install the default pattern rules. */ /* Install the default pattern rules. */
void void
install_default_implicit_rules () install_default_implicit_rules (void)
{ {
register struct pspec *p; register struct pspec *p;
@@ -573,7 +582,7 @@ install_default_implicit_rules ()
} }
void void
define_default_variables () define_default_variables (void)
{ {
register char **s; register char **s;

39
dep.h
View File

@@ -1,21 +1,20 @@
/* Definitions of dependency data structures for GNU Make. /* Definitions of dependency data structures for GNU Make.
Copyright (C) 1988, 1989, 1991, 1992, 1993, 1996 Free Software Foundation, Inc. Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
This file is part of GNU Make. This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify GNU Make is free software; you can redistribute it and/or modify it under the
it under the terms of the GNU General Public License as published by terms of the GNU General Public License as published by the Free Software
the Free Software Foundation; either version 2, or (at your option) Foundation; either version 2, or (at your option) any later version.
any later version.
GNU Make is distributed in the hope that it will be useful, GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
but WITHOUT ANY WARRANTY; without even the implied warranty of WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the A PARTICULAR PURPOSE. See the GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License along with
along with GNU Make; see the file COPYING. If not, write to GNU Make; see the file COPYING. If not, write to the Free Software
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
Boston, MA 02111-1307, USA. */
/* Flag bits for the second argument to `read_makefile'. /* Flag bits for the second argument to `read_makefile'.
These flags are saved in the `changed' field of each These flags are saved in the `changed' field of each
@@ -29,7 +28,8 @@ Boston, MA 02111-1307, USA. */
/* Structure representing one dependency of a file. /* Structure representing one dependency of a file.
Each struct file's `deps' points to a chain of these, Each struct file's `deps' points to a chain of these,
chained through the `next'. chained through the `next'. `stem' is the stem for this
dep line of static pattern rule or NULL.
Note that the first two words of this match a struct nameseq. */ Note that the first two words of this match a struct nameseq. */
@@ -37,9 +37,12 @@ struct dep
{ {
struct dep *next; struct dep *next;
char *name; char *name;
char *stem;
struct file *file; struct file *file;
unsigned int changed : 8; unsigned int changed : 8;
unsigned int ignore_mtime : 1; unsigned int ignore_mtime : 1;
unsigned int staticpattern : 1;
unsigned int need_2nd_expansion : 1;
}; };
@@ -71,8 +74,12 @@ extern struct nameseq *ar_glob PARAMS ((char *arname, char *member_pattern, unsi
extern char *dep_name (); extern char *dep_name ();
#endif #endif
extern struct dep *copy_dep_chain PARAMS ((struct dep *d)); extern struct dep *alloc_dep PARAMS ((void));
extern void free_dep PARAMS ((struct dep *d));
extern struct dep *copy_dep_chain PARAMS ((const struct dep *d));
extern void free_dep_chain PARAMS ((struct dep *d));
extern void free_ns_chain PARAMS ((struct nameseq *n));
extern struct dep *read_all_makefiles PARAMS ((char **makefiles)); extern struct dep *read_all_makefiles PARAMS ((char **makefiles));
extern int eval_buffer PARAMS ((char *buffer)); extern int eval_buffer PARAMS ((char *buffer));
extern int update_goal_chain PARAMS ((struct dep *goals, int makefiles)); extern int update_goal_chain PARAMS ((struct dep *goals));
extern void uniquize_deps PARAMS ((struct dep *)); extern void uniquize_deps PARAMS ((struct dep *));

220
dir.c
View File

@@ -1,22 +1,20 @@
/* Directory hashing for GNU Make. /* Directory hashing for GNU Make.
Copyright (C) 1988, 1989, 1991, 1992, 1993, 1994, 1995, 1996, 1997, Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
2002 Free Software Foundation, Inc. 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
This file is part of GNU Make. This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify GNU Make is free software; you can redistribute it and/or modify it under the
it under the terms of the GNU General Public License as published by terms of the GNU General Public License as published by the Free Software
the Free Software Foundation; either version 2, or (at your option) Foundation; either version 2, or (at your option) any later version.
any later version.
GNU Make is distributed in the hope that it will be useful, GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
but WITHOUT ANY WARRANTY; without even the implied warranty of WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the A PARTICULAR PURPOSE. See the GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License along with
along with GNU Make; see the file COPYING. If not, write to GNU Make; see the file COPYING. If not, write to the Free Software
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
Boston, MA 02111-1307, USA. */
#include "make.h" #include "make.h"
#include "hash.h" #include "hash.h"
@@ -70,8 +68,7 @@ extern char *vmsify PARAMS ((char *name, int type));
#endif #endif
static char * static char *
dosify (filename) dosify (char *filename)
char *filename;
{ {
static char dos_filename[14]; static char dos_filename[14];
char *df; char *df;
@@ -121,14 +118,9 @@ dosify (filename)
#ifdef HAVE_CASE_INSENSITIVE_FS #ifdef HAVE_CASE_INSENSITIVE_FS
static char * static char *
downcase (filename) downcase (char *filename)
char *filename;
{ {
#ifdef _AMIGA static PATH_VAR (new_filename);
static char new_filename[136];
#else
static char new_filename[PATH_MAX];
#endif
char *df; char *df;
int i; int i;
@@ -153,8 +145,7 @@ downcase (filename)
#ifdef VMS #ifdef VMS
static int static int
vms_hash (name) vms_hash (char *name)
char *name;
{ {
int h = 0; int h = 0;
int g; int g;
@@ -162,7 +153,11 @@ vms_hash (name)
while (*name) while (*name)
{ {
unsigned char uc = *name; unsigned char uc = *name;
#ifdef HAVE_CASE_INSENSITIVE_FS
h = (h << 4) + (isupper (uc) ? tolower (uc) : uc); h = (h << 4) + (isupper (uc) ? tolower (uc) : uc);
#else
h = (h << 4) + uc;
#endif
name++; name++;
g = h & 0xf0000000; g = h & 0xf0000000;
if (g) if (g)
@@ -176,9 +171,7 @@ vms_hash (name)
/* fake stat entry for a directory */ /* fake stat entry for a directory */
static int static int
vmsstat_dir (name, st) vmsstat_dir (char *name, struct stat *st)
char *name;
struct stat *st;
{ {
char *s; char *s;
int h; int h;
@@ -248,13 +241,13 @@ struct directory_contents
}; };
static unsigned long static unsigned long
directory_contents_hash_1 (key_0) directory_contents_hash_1 (const void *key_0)
const void *key_0;
{ {
struct directory_contents const *key = (struct directory_contents const *) key_0; struct directory_contents const *key = (struct directory_contents const *) key_0;
unsigned long hash; unsigned long hash;
#ifdef WINDOWS32 #ifdef WINDOWS32
hash = 0;
ISTRING_HASH_1 (key->path_key, hash); ISTRING_HASH_1 (key->path_key, hash);
hash ^= ((unsigned int) key->dev << 4) ^ (unsigned int) key->ctime; hash ^= ((unsigned int) key->dev << 4) ^ (unsigned int) key->ctime;
#else #else
@@ -271,13 +264,13 @@ directory_contents_hash_1 (key_0)
} }
static unsigned long static unsigned long
directory_contents_hash_2 (key_0) directory_contents_hash_2 (const void *key_0)
const void *key_0;
{ {
struct directory_contents const *key = (struct directory_contents const *) key_0; struct directory_contents const *key = (struct directory_contents const *) key_0;
unsigned long hash; unsigned long hash;
#ifdef WINDOWS32 #ifdef WINDOWS32
hash = 0;
ISTRING_HASH_2 (key->path_key, hash); ISTRING_HASH_2 (key->path_key, hash);
hash ^= ((unsigned int) key->dev << 4) ^ (unsigned int) ~key->ctime; hash ^= ((unsigned int) key->dev << 4) ^ (unsigned int) ~key->ctime;
#else #else
@@ -294,10 +287,19 @@ directory_contents_hash_2 (key_0)
return hash; return hash;
} }
/* Sometimes it's OK to use subtraction to get this value:
result = X - Y;
But, if we're not sure of the type of X and Y they may be too large for an
int (on a 64-bit system for example). So, use ?: instead.
See Savannah bug #15534.
NOTE! This macro has side-effects!
*/
#define MAKECMP(_x,_y) ((_x)<(_y)?-1:((_x)==(_y)?0:1))
static int static int
directory_contents_hash_cmp (xv, yv) directory_contents_hash_cmp (const void *xv, const void *yv)
const void *xv;
const void *yv;
{ {
struct directory_contents const *x = (struct directory_contents const *) xv; struct directory_contents const *x = (struct directory_contents const *) xv;
struct directory_contents const *y = (struct directory_contents const *) yv; struct directory_contents const *y = (struct directory_contents const *) yv;
@@ -307,28 +309,28 @@ directory_contents_hash_cmp (xv, yv)
ISTRING_COMPARE (x->path_key, y->path_key, result); ISTRING_COMPARE (x->path_key, y->path_key, result);
if (result) if (result)
return result; return result;
result = x->ctime - y->ctime; result = MAKECMP(x->ctime, y->ctime);
if (result) if (result)
return result; return result;
#else #else
# ifdef VMS # ifdef VMS
result = x->ino[0] - y->ino[0]; result = MAKECMP(x->ino[0], y->ino[0]);
if (result) if (result)
return result; return result;
result = x->ino[1] - y->ino[1]; result = MAKECMP(x->ino[1], y->ino[1]);
if (result) if (result)
return result; return result;
result = x->ino[2] - y->ino[2]; result = MAKECMP(x->ino[2], y->ino[2]);
if (result) if (result)
return result; return result;
# else # else
result = x->ino - y->ino; result = MAKECMP(x->ino, y->ino);
if (result) if (result)
return result; return result;
# endif # endif
#endif /* WINDOWS32 */ #endif /* WINDOWS32 */
return x->dev - y->dev; return MAKECMP(x->dev, y->dev);
} }
/* Table of directory contents hashed by device and inode number. */ /* Table of directory contents hashed by device and inode number. */
@@ -345,23 +347,19 @@ struct directory
}; };
static unsigned long static unsigned long
directory_hash_1 (key) directory_hash_1 (const void *key)
const void *key;
{ {
return_ISTRING_HASH_1 (((struct directory const *) key)->name); return_ISTRING_HASH_1 (((struct directory const *) key)->name);
} }
static unsigned long static unsigned long
directory_hash_2 (key) directory_hash_2 (const void *key)
const void *key;
{ {
return_ISTRING_HASH_2 (((struct directory const *) key)->name); return_ISTRING_HASH_2 (((struct directory const *) key)->name);
} }
static int static int
directory_hash_cmp (x, y) directory_hash_cmp (const void *x, const void *y)
const void *x;
const void *y;
{ {
return_ISTRING_COMPARE (((struct directory const *) x)->name, return_ISTRING_COMPARE (((struct directory const *) x)->name,
((struct directory const *) y)->name); ((struct directory const *) y)->name);
@@ -387,23 +385,19 @@ struct dirfile
}; };
static unsigned long static unsigned long
dirfile_hash_1 (key) dirfile_hash_1 (const void *key)
const void *key;
{ {
return_ISTRING_HASH_1 (((struct dirfile const *) key)->name); return_ISTRING_HASH_1 (((struct dirfile const *) key)->name);
} }
static unsigned long static unsigned long
dirfile_hash_2 (key) dirfile_hash_2 (const void *key)
const void *key;
{ {
return_ISTRING_HASH_2 (((struct dirfile const *) key)->name); return_ISTRING_HASH_2 (((struct dirfile const *) key)->name);
} }
static int static int
dirfile_hash_cmp (xv, yv) dirfile_hash_cmp (const void *xv, const void *yv)
const void *xv;
const void *yv;
{ {
struct dirfile const *x = ((struct dirfile const *) xv); struct dirfile const *x = ((struct dirfile const *) xv);
struct dirfile const *y = ((struct dirfile const *) yv); struct dirfile const *y = ((struct dirfile const *) yv);
@@ -423,8 +417,7 @@ static struct directory *find_directory PARAMS ((char *name));
/* Find the directory named NAME and return its `struct directory'. */ /* Find the directory named NAME and return its `struct directory'. */
static struct directory * static struct directory *
find_directory (name) find_directory (char *name)
register char *name;
{ {
register char *p; register char *p;
register struct directory *dir; register struct directory *dir;
@@ -435,9 +428,9 @@ find_directory (name)
char* w32_path; char* w32_path;
char fs_label[BUFSIZ]; char fs_label[BUFSIZ];
char fs_type[BUFSIZ]; char fs_type[BUFSIZ];
long fs_serno; unsigned long fs_serno;
long fs_flags; unsigned long fs_flags;
long fs_len; unsigned long fs_len;
#endif #endif
#ifdef VMS #ifdef VMS
if ((*name == '.') && (*(name+1) == 0)) if ((*name == '.') && (*(name+1) == 0))
@@ -473,7 +466,7 @@ find_directory (name)
#ifdef VMS #ifdef VMS
r = vmsstat_dir (name, &st); r = vmsstat_dir (name, &st);
#else #else
r = stat (name, &st); EINTRLOOP (r, stat (name, &st));
#endif #endif
#ifdef WINDOWS32 #ifdef WINDOWS32
@@ -554,7 +547,7 @@ find_directory (name)
# endif # endif
#endif /* WINDOWS32 */ #endif /* WINDOWS32 */
hash_insert_at (&directory_contents, dc, dc_slot); hash_insert_at (&directory_contents, dc, dc_slot);
dc->dirstream = opendir (name); ENULLLOOP (dc->dirstream, opendir (name));
if (dc->dirstream == 0) if (dc->dirstream == 0)
/* Couldn't open the directory. Mark this by /* Couldn't open the directory. Mark this by
setting the `files' member to a nil pointer. */ setting the `files' member to a nil pointer. */
@@ -584,9 +577,7 @@ find_directory (name)
FILENAME must contain no slashes. */ FILENAME must contain no slashes. */
static int static int
dir_contents_file_exists_p (dir, filename) dir_contents_file_exists_p (struct directory_contents *dir, char *filename)
register struct directory_contents *dir;
register char *filename;
{ {
unsigned int hash; unsigned int hash;
struct dirfile *df; struct dirfile *df;
@@ -609,6 +600,11 @@ dir_contents_file_exists_p (dir, filename)
filename = downcase (filename); filename = downcase (filename);
#endif #endif
#ifdef __EMX__
if (filename != 0)
_fnlwr (filename); /* lower case for FAT drives */
#endif
#ifdef VMS #ifdef VMS
filename = vmsify (filename,0); filename = vmsify (filename,0);
#endif #endif
@@ -643,21 +639,28 @@ dir_contents_file_exists_p (dir, filename)
* filesystems force a rehash always as mtime does not change * filesystems force a rehash always as mtime does not change
* on directories (ugh!). * on directories (ugh!).
*/ */
if (dir->path_key if (dir->path_key)
&& (dir->fs_flags & FS_FAT
|| (stat(dir->path_key, &st) == 0
&& st.st_mtime > dir->mtime)))
{ {
/* reset date stamp to show most recent re-process */ if ((dir->fs_flags & FS_FAT) != 0)
dir->mtime = st.st_mtime; {
dir->mtime = time ((time_t *) 0);
rehash = 1;
}
else if (stat(dir->path_key, &st) == 0 && st.st_mtime > dir->mtime)
{
/* reset date stamp to show most recent re-process. */
dir->mtime = st.st_mtime;
rehash = 1;
}
/* make sure directory can still be opened */ /* If it has been already read in, all done. */
dir->dirstream = opendir(dir->path_key); if (!rehash)
return 0;
if (dir->dirstream) /* make sure directory can still be opened; if not return. */
rehash = 1; dir->dirstream = opendir(dir->path_key);
else if (!dir->dirstream)
return 0; /* couldn't re-read - fail */ return 0;
} }
else else
#endif #endif
@@ -665,13 +668,17 @@ dir_contents_file_exists_p (dir, filename)
return 0; return 0;
} }
while ((d = readdir (dir->dirstream)) != 0) while (1)
{ {
/* Enter the file in the hash table. */ /* Enter the file in the hash table. */
unsigned int len; unsigned int len;
struct dirfile dirfile_key; struct dirfile dirfile_key;
struct dirfile **dirfile_slot; struct dirfile **dirfile_slot;
ENULLLOOP (d, readdir (dir->dirstream));
if (d == 0)
break;
#if defined(VMS) && defined(HAVE_DIRENT_H) #if defined(VMS) && defined(HAVE_DIRENT_H)
/* In VMS we get file versions too, which have to be stripped off */ /* In VMS we get file versions too, which have to be stripped off */
{ {
@@ -724,9 +731,7 @@ dir_contents_file_exists_p (dir, filename)
FILENAME must contain no slashes. */ FILENAME must contain no slashes. */
int int
dir_file_exists_p (dirname, filename) dir_file_exists_p (char *dirname, char *filename)
register char *dirname;
register char *filename;
{ {
return dir_contents_file_exists_p (find_directory (dirname)->contents, return dir_contents_file_exists_p (find_directory (dirname)->contents,
filename); filename);
@@ -735,8 +740,7 @@ dir_file_exists_p (dirname, filename)
/* Return 1 if the file named NAME exists. */ /* Return 1 if the file named NAME exists. */
int int
file_exists_p (name) file_exists_p (char *name)
register char *name;
{ {
char *dirend; char *dirend;
char *dirname; char *dirname;
@@ -751,8 +755,7 @@ file_exists_p (name)
dirend = strrchr (name, ']'); dirend = strrchr (name, ']');
if (dirend == 0) if (dirend == 0)
dirend = strrchr (name, ':'); dirend = strrchr (name, ':');
dirend++; if (dirend == (char *)0)
if (dirend == (char *)1)
return dir_file_exists_p ("[]", name); return dir_file_exists_p ("[]", name);
#else /* !VMS */ #else /* !VMS */
dirend = strrchr (name, '/'); dirend = strrchr (name, '/');
@@ -798,8 +801,7 @@ file_exists_p (name)
as an intermediate file, and it has failed. */ as an intermediate file, and it has failed. */
void void
file_impossible (filename) file_impossible (char *filename)
register char *filename;
{ {
char *dirend; char *dirend;
register char *p = filename; register char *p = filename;
@@ -882,8 +884,7 @@ file_impossible (filename)
/* Return nonzero if FILENAME has been marked impossible. */ /* Return nonzero if FILENAME has been marked impossible. */
int int
file_impossible_p (filename) file_impossible_p (char *filename)
char *filename;
{ {
char *dirend; char *dirend;
register char *p = filename; register char *p = filename;
@@ -964,8 +965,7 @@ file_impossible_p (filename)
directory hash table that matches DIR. */ directory hash table that matches DIR. */
char * char *
dir_name (dir) dir_name (char *dir)
char *dir;
{ {
return find_directory (dir)->name; return find_directory (dir)->name;
} }
@@ -973,7 +973,7 @@ dir_name (dir)
/* Print the data base of directories. */ /* Print the data base of directories. */
void void
print_dir_data_base () print_dir_data_base (void)
{ {
register unsigned int files; register unsigned int files;
register unsigned int impossible; register unsigned int impossible;
@@ -1096,8 +1096,7 @@ static __ptr_t open_dirstream PARAMS ((const char *));
static struct dirent *read_dirstream PARAMS ((__ptr_t)); static struct dirent *read_dirstream PARAMS ((__ptr_t));
static __ptr_t static __ptr_t
open_dirstream (directory) open_dirstream (const char *directory)
const char *directory;
{ {
struct dirstream *new; struct dirstream *new;
struct directory *dir = find_directory ((char *)directory); struct directory *dir = find_directory ((char *)directory);
@@ -1120,8 +1119,7 @@ open_dirstream (directory)
} }
static struct dirent * static struct dirent *
read_dirstream (stream) read_dirstream (__ptr_t stream)
__ptr_t stream;
{ {
struct dirstream *const ds = (struct dirstream *) stream; struct dirstream *const ds = (struct dirstream *) stream;
struct directory_contents *dc = ds->contents; struct directory_contents *dc = ds->contents;
@@ -1148,6 +1146,12 @@ read_dirstream (stream)
buf = xmalloc (bufsz); buf = xmalloc (bufsz);
} }
d = (struct dirent *) buf; d = (struct dirent *) buf;
#ifdef __MINGW32__
# if __MINGW32_MAJOR_VERSION < 3 || (__MINGW32_MAJOR_VERSION == 3 && \
__MINGW32_MINOR_VERSION == 0)
d->d_name = xmalloc(len);
# endif
#endif
FAKE_DIR_ENTRY (d); FAKE_DIR_ENTRY (d);
#ifdef _DIRENT_HAVE_D_NAMLEN #ifdef _DIRENT_HAVE_D_NAMLEN
d->d_namlen = len - 1; d->d_namlen = len - 1;
@@ -1164,11 +1168,10 @@ read_dirstream (stream)
} }
static void static void
ansi_free(p) ansi_free (void *p)
void *p;
{ {
if (p) if (p)
free(p); free(p);
} }
/* On 64 bit ReliantUNIX (5.44 and above) in LFS mode, stat() is actually a /* On 64 bit ReliantUNIX (5.44 and above) in LFS mode, stat() is actually a
@@ -1177,21 +1180,22 @@ ansi_free(p)
*/ */
#ifndef stat #ifndef stat
# ifndef VMS # ifndef VMS
extern int stat (); extern int stat PARAMS ((const char *path, struct stat *sbuf));
# endif # endif
# define local_stat stat # define local_stat stat
#else #else
static int local_stat (path, buf) static int
char *path; local_stat (const char *path, struct stat *buf)
struct stat *buf;
{ {
return stat (path, buf); int e;
EINTRLOOP (e, stat (path, buf));
return e;
} }
#endif #endif
void void
dir_setup_glob (gl) dir_setup_glob (glob_t *gl)
glob_t *gl;
{ {
/* Bogus sunos4 compiler complains (!) about & before functions. */ /* Bogus sunos4 compiler complains (!) about & before functions. */
gl->gl_opendir = open_dirstream; gl->gl_opendir = open_dirstream;
@@ -1203,7 +1207,7 @@ dir_setup_glob (gl)
} }
void void
hash_init_directories () hash_init_directories (void)
{ {
hash_init (&directories, DIRECTORY_BUCKETS, hash_init (&directories, DIRECTORY_BUCKETS,
directory_hash_1, directory_hash_2, directory_hash_cmp); directory_hash_1, directory_hash_2, directory_hash_cmp);

View File

@@ -1,7 +1,8 @@
Makefile Makefile.in Makefile Makefile.in
fdl.texi make-stds.texi texinfo.tex version.texi fdl.texi make-stds.texi texinfo.tex
make.info* make.info*
make*.html make*.html
make.aux make.cp make.cps make.fn make.fns make.ky make.aux make.cp make.cps make.fn make.fns make.ky
make.pg make.toc make.tp make.vr make.log make.pg make.toc make.tp make.vr make.log
make.dvi make.ps make.pdf make.dvi make.ps make.pdf
stamp-vti

View File

@@ -1,7 +1,19 @@
## Process this file with automake to create Makefile.in. # -*-Makefile-*-, or close enough
# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
## Makefile for GNU make documentation. # Foundation, Inc.
## Copyright 2002 Free Software Foundation, Inc. # This file is part of GNU Make.
#
# GNU Make is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2, or (at your option) any later version.
#
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# GNU Make; see the file COPYING. If not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
TEXI2HTML = texi2html TEXI2HTML = texi2html
TEXI2HTML_FLAGS = -split_chapter TEXI2HTML_FLAGS = -split_chapter

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +1,23 @@
@echo Building Make for MSDOS @echo off
@rem Echo ON so they will see what is going on. rem Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
rem Software Foundation, Inc.
rem This file is part of GNU Make.
rem GNU Make is free software; you can redistribute it and/or modify it under the
rem terms of the GNU General Public License as published by the Free Software
rem Foundation; either version 2, or (at your option) any later version.
rem GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
rem WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
rem A PARTICULAR PURPOSE. See the GNU General Public License for more details.
rem You should have received a copy of the GNU General Public License along with
rem GNU Make; see the file COPYING. If not, write to the Free Software
rem Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
echo Building Make for MSDOS
rem Echo ON so they will see what is going on.
@echo on @echo on
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g commands.c -o commands.o gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g commands.c -o commands.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g job.c -o job.o gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g job.c -o job.o
@@ -16,6 +34,8 @@ gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g variable.c -o variable.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g expand.c -o expand.o gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g expand.c -o expand.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g function.c -o function.o gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g function.c -o function.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g vpath.c -o vpath.o gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g vpath.c -o vpath.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g hash.c -o hash.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g strcache.c -o strcache.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g version.c -o version.o gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g version.c -o version.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g ar.c -o ar.o gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g ar.c -o ar.o
gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g arscan.c -o arscan.o gcc -c -I. -I./glob -DHAVE_CONFIG_H -O2 -g arscan.c -o arscan.o
@@ -32,7 +52,7 @@ ar rv libglob.a glob.o fnmatch.o
cd .. cd ..
echo commands.o > respf.$$$ echo commands.o > respf.$$$
for %%f in (job dir file misc main read remake rule implicit default variable) do echo %%f.o >> respf.$$$ for %%f in (job dir file misc main read remake rule implicit default variable) do echo %%f.o >> respf.$$$
for %%f in (expand function vpath version ar arscan signame remote-stub getopt getopt1) do echo %%f.o >> respf.$$$ for %%f in (expand function vpath hash strcache version ar arscan signame remote-stub getopt getopt1) do echo %%f.o >> respf.$$$
echo glob/libglob.a >> respf.$$$ echo glob/libglob.a >> respf.$$$
@echo Linking... @echo Linking...
@echo on @echo on

254
expand.c
View File

@@ -1,21 +1,20 @@
/* Variable expansion functions for GNU Make. /* Variable expansion functions for GNU Make.
Copyright (C) 1988, 89, 91, 92, 93, 95 Free Software Foundation, Inc. Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
This file is part of GNU Make. This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify GNU Make is free software; you can redistribute it and/or modify it under the
it under the terms of the GNU General Public License as published by terms of the GNU General Public License as published by the Free Software
the Free Software Foundation; either version 2, or (at your option) Foundation; either version 2, or (at your option) any later version.
any later version.
GNU Make is distributed in the hope that it will be useful, GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
but WITHOUT ANY WARRANTY; without even the implied warranty of WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the A PARTICULAR PURPOSE. See the GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License along with
along with GNU Make; see the file COPYING. If not, write to GNU Make; see the file COPYING. If not, write to the Free Software
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
Boston, MA 02111-1307, USA. */
#include "make.h" #include "make.h"
@@ -27,6 +26,10 @@ Boston, MA 02111-1307, USA. */
#include "variable.h" #include "variable.h"
#include "rule.h" #include "rule.h"
/* Initially, any errors reported when expanding strings will be reported
against the file where the error appears. */
const struct floc **expanding_var = &reading_file;
/* The next two describe the variable output buffer. /* The next two describe the variable output buffer.
This buffer is used to hold the variable-expansion of a line of the This buffer is used to hold the variable-expansion of a line of the
makefile. It is made bigger with realloc whenever it is too small. makefile. It is made bigger with realloc whenever it is too small.
@@ -52,9 +55,7 @@ char *variable_buffer;
the following call. */ the following call. */
char * char *
variable_buffer_output (ptr, string, length) variable_buffer_output (char *ptr, char *string, unsigned int length)
char *ptr, *string;
unsigned int length;
{ {
register unsigned int newlen = length + (ptr - variable_buffer); register unsigned int newlen = length + (ptr - variable_buffer);
@@ -76,7 +77,7 @@ variable_buffer_output (ptr, string, length)
/* Return a pointer to the beginning of the variable buffer. */ /* Return a pointer to the beginning of the variable buffer. */
static char * static char *
initialize_variable_output () initialize_variable_output (void)
{ {
/* If we don't have a variable output buffer yet, get one. */ /* If we don't have a variable output buffer yet, get one. */
@@ -95,18 +96,35 @@ initialize_variable_output ()
static char *allocated_variable_append PARAMS ((const struct variable *v)); static char *allocated_variable_append PARAMS ((const struct variable *v));
char * char *
recursively_expand_for_file (v, file) recursively_expand_for_file (struct variable *v, struct file *file)
struct variable *v;
struct file *file;
{ {
char *value; char *value;
const struct floc *this_var;
const struct floc **saved_varp;
struct variable_set_list *save = 0; struct variable_set_list *save = 0;
int set_reading = 0;
/* Don't install a new location if this location is empty.
This can happen for command-line variables, builtin variables, etc. */
saved_varp = expanding_var;
if (v->fileinfo.filenm)
{
this_var = &v->fileinfo;
expanding_var = &this_var;
}
/* If we have no other file-reading context, use the variable's context. */
if (!reading_file)
{
set_reading = 1;
reading_file = &v->fileinfo;
}
if (v->expanding) if (v->expanding)
{ {
if (!v->exp_count) if (!v->exp_count)
/* Expanding V causes infinite recursion. Lose. */ /* Expanding V causes infinite recursion. Lose. */
fatal (reading_file, fatal (*expanding_var,
_("Recursive variable `%s' references itself (eventually)"), _("Recursive variable `%s' references itself (eventually)"),
v->name); v->name);
--v->exp_count; --v->exp_count;
@@ -125,9 +143,14 @@ recursively_expand_for_file (v, file)
value = allocated_variable_expand (v->value); value = allocated_variable_expand (v->value);
v->expanding = 0; v->expanding = 0;
if (set_reading)
reading_file = 0;
if (file) if (file)
current_variable_set_list = save; current_variable_set_list = save;
expanding_var = saved_varp;
return value; return value;
} }
@@ -137,10 +160,7 @@ recursively_expand_for_file (v, file)
__inline __inline
#endif #endif
static char * static char *
reference_variable (o, name, length) reference_variable (char *o, char *name, unsigned int length)
char *o;
char *name;
unsigned int length;
{ {
register struct variable *v; register struct variable *v;
char *value; char *value;
@@ -150,7 +170,8 @@ reference_variable (o, name, length)
if (v == 0) if (v == 0)
warn_undefined (name, length); warn_undefined (name, length);
if (v == 0 || *v->value == '\0') /* If there's no variable by that name or it has no value, stop now. */
if (v == 0 || (*v->value == '\0' && !v->append))
return o; return o;
value = (v->recursive ? recursively_expand (v) : v->value); value = (v->recursive ? recursively_expand (v) : v->value);
@@ -173,10 +194,7 @@ reference_variable (o, name, length)
NULL. */ NULL. */
char * char *
variable_expand_string (line, string, length) variable_expand_string (char *line, char *string, long length)
register char *line;
char *string;
long length;
{ {
register struct variable *v; register struct variable *v;
register char *p, *o, *p1; register char *p, *o, *p1;
@@ -204,7 +222,7 @@ variable_expand_string (line, string, length)
p1 = strchr (p, '$'); p1 = strchr (p, '$');
o = variable_buffer_output (o, p, p1 != 0 ? p1 - p : strlen (p) + 1); o = variable_buffer_output (o, p, p1 != 0 ? (unsigned int)(p1 - p) : strlen (p) + 1);
if (p1 == 0) if (p1 == 0)
break; break;
@@ -245,7 +263,7 @@ variable_expand_string (line, string, length)
end = strchr (beg, closeparen); end = strchr (beg, closeparen);
if (end == 0) if (end == 0)
/* Unterminated variable reference. */ /* Unterminated variable reference. */
fatal (reading_file, _("unterminated variable reference")); fatal (*expanding_var, _("unterminated variable reference"));
p1 = lindex (beg, end, '$'); p1 = lindex (beg, end, '$');
if (p1 != 0) if (p1 != 0)
{ {
@@ -286,7 +304,7 @@ variable_expand_string (line, string, length)
char *subst_beg, *subst_end, *replace_beg, *replace_end; char *subst_beg, *subst_end, *replace_beg, *replace_end;
subst_beg = colon + 1; subst_beg = colon + 1;
subst_end = strchr (subst_beg, '='); subst_end = lindex (subst_beg, end, '=');
if (subst_end == 0) if (subst_end == 0)
/* There is no = in sight. Punt on the substitution /* There is no = in sight. Punt on the substitution
reference and treat this as a variable name containing reference and treat this as a variable name containing
@@ -303,51 +321,49 @@ variable_expand_string (line, string, length)
if (v == 0) if (v == 0)
warn_undefined (beg, colon - beg); warn_undefined (beg, colon - beg);
/* If the variable is not empty, perform the
substitution. */
if (v != 0 && *v->value != '\0') if (v != 0 && *v->value != '\0')
{ {
char *value = (v->recursive ? recursively_expand (v) char *pattern, *replace, *ppercent, *rpercent;
char *value = (v->recursive
? recursively_expand (v)
: v->value); : v->value);
char *pattern, *percent;
if (free_beg)
{
*subst_end = '\0';
pattern = subst_beg;
}
else
{
pattern = (char *) alloca (subst_end - subst_beg
+ 1);
bcopy (subst_beg, pattern, subst_end - subst_beg);
pattern[subst_end - subst_beg] = '\0';
}
percent = find_percent (pattern);
if (percent != 0)
{
char *replace;
if (free_beg)
{
*replace_end = '\0';
replace = replace_beg;
}
else
{
replace = (char *) alloca (replace_end
- replace_beg
+ 1);
bcopy (replace_beg, replace,
replace_end - replace_beg);
replace[replace_end - replace_beg] = '\0';
}
o = patsubst_expand (o, value, pattern, replace, /* Copy the pattern and the replacement. Add in an
percent, (char *) 0); extra % at the beginning to use in case there
} isn't one in the pattern. */
pattern = (char *) alloca (subst_end - subst_beg + 2);
*(pattern++) = '%';
bcopy (subst_beg, pattern, subst_end - subst_beg);
pattern[subst_end - subst_beg] = '\0';
replace = (char *) alloca (replace_end
- replace_beg + 2);
*(replace++) = '%';
bcopy (replace_beg, replace,
replace_end - replace_beg);
replace[replace_end - replace_beg] = '\0';
/* Look for %. Set the percent pointers properly
based on whether we find one or not. */
ppercent = find_percent (pattern);
if (ppercent)
{
++ppercent;
rpercent = 0;
}
else else
o = subst_expand (o, value, {
pattern, replace_beg, ppercent = pattern;
strlen (pattern), rpercent = replace;
end - replace_beg, --pattern;
0, 1); --replace;
}
o = patsubst_expand (o, value, pattern, replace,
ppercent, rpercent);
if (v->recursive) if (v->recursive)
free (value); free (value);
} }
@@ -373,19 +389,7 @@ variable_expand_string (line, string, length)
/* A $ followed by a random char is a variable reference: /* A $ followed by a random char is a variable reference:
$a is equivalent to $(a). */ $a is equivalent to $(a). */
{ o = reference_variable (o, p, 1);
/* We could do the expanding here, but this way
avoids code repetition at a small performance cost. */
char name[5];
name[0] = '$';
name[1] = '(';
name[2] = *p;
name[3] = ')';
name[4] = '\0';
p1 = allocated_variable_expand (name);
o = variable_buffer_output (o, p1, strlen (p1));
free (p1);
}
break; break;
} }
@@ -409,8 +413,7 @@ variable_expand_string (line, string, length)
and is valid only until the next time this function is called. */ and is valid only until the next time this function is called. */
char * char *
variable_expand (line) variable_expand (char *line)
char *line;
{ {
return variable_expand_string(NULL, line, (long)-1); return variable_expand_string(NULL, line, (long)-1);
} }
@@ -422,8 +425,7 @@ variable_expand (line)
variable-expansion that is in progress. */ variable-expansion that is in progress. */
char * char *
expand_argument (str, end) expand_argument (const char *str, const char *end)
char *str, *end;
{ {
char *tmp; char *tmp;
@@ -431,13 +433,11 @@ expand_argument (str, end)
return xstrdup(""); return xstrdup("");
if (!end || *end == '\0') if (!end || *end == '\0')
tmp = str; return allocated_variable_expand ((char *)str);
else
{ tmp = (char *) alloca (end - str + 1);
tmp = (char *) alloca (end - str + 1); bcopy (str, tmp, end - str);
bcopy (str, tmp, end - str); tmp[end - str] = '\0';
tmp[end - str] = '\0';
}
return allocated_variable_expand (tmp); return allocated_variable_expand (tmp);
} }
@@ -445,10 +445,8 @@ expand_argument (str, end)
/* Expand LINE for FILE. Error messages refer to the file and line where /* Expand LINE for FILE. Error messages refer to the file and line where
FILE's commands were found. Expansion uses FILE's variable set list. */ FILE's commands were found. Expansion uses FILE's variable set list. */
static char * char *
variable_expand_for_file (line, file) variable_expand_for_file (char *line, struct file *file)
char *line;
register struct file *file;
{ {
char *result; char *result;
struct variable_set_list *save; struct variable_set_list *save;
@@ -474,10 +472,8 @@ variable_expand_for_file (line, file)
any upper variable sets. Then expand the resulting value. */ any upper variable sets. Then expand the resulting value. */
static char * static char *
variable_append (name, length, set) variable_append (const char *name, unsigned int length,
const char *name; const struct variable_set_list *set)
unsigned int length;
const struct variable_set_list *set;
{ {
const struct variable *v; const struct variable *v;
char *buf = 0; char *buf = 0;
@@ -505,15 +501,19 @@ variable_append (name, length, set)
if (buf > variable_buffer) if (buf > variable_buffer)
buf = variable_buffer_output (buf, " ", 1); buf = variable_buffer_output (buf, " ", 1);
return variable_buffer_output (buf, v->value, strlen (v->value)); /* Either expand it or copy it, depending. */
if (! v->recursive)
return variable_buffer_output (buf, v->value, strlen (v->value));
buf = variable_expand_string (buf, v->value, strlen (v->value));
return (buf + strlen (buf));
} }
static char * static char *
allocated_variable_append (v) allocated_variable_append (const struct variable *v)
const struct variable *v;
{ {
char *val, *retval; char *val;
/* Construct the appended variable value. */ /* Construct the appended variable value. */
@@ -529,21 +529,14 @@ allocated_variable_append (v)
variable_buffer = obuf; variable_buffer = obuf;
variable_buffer_length = olen; variable_buffer_length = olen;
/* Now expand it and return that. */ return val;
retval = allocated_variable_expand (val);
free (val);
return retval;
} }
/* Like variable_expand_for_file, but the returned string is malloc'd. /* Like variable_expand_for_file, but the returned string is malloc'd.
This function is called a lot. It wants to be efficient. */ This function is called a lot. It wants to be efficient. */
char * char *
allocated_variable_expand_for_file (line, file) allocated_variable_expand_for_file (char *line, struct file *file)
char *line;
struct file *file;
{ {
char *value; char *value;
@@ -564,3 +557,28 @@ allocated_variable_expand_for_file (line, file)
return value; return value;
} }
/* Install a new variable_buffer context, returning the current one for
safe-keeping. */
void
install_variable_buffer (char **bufp, unsigned int *lenp)
{
*bufp = variable_buffer;
*lenp = variable_buffer_length;
variable_buffer = 0;
initialize_variable_output ();
}
/* Restore a previously-saved variable_buffer setting (free the current one).
*/
void
restore_variable_buffer (char *buf, unsigned int len)
{
free (variable_buffer);
variable_buffer = buf;
variable_buffer_length = len;
}

436
file.c
View File

@@ -1,22 +1,20 @@
/* Target file hash table management for GNU Make. /* Target file management for GNU Make.
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
2002 Free Software Foundation, Inc. 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
This file is part of GNU Make. This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify GNU Make is free software; you can redistribute it and/or modify it under the
it under the terms of the GNU General Public License as published by terms of the GNU General Public License as published by the Free Software
the Free Software Foundation; either version 2, or (at your option) Foundation; either version 2, or (at your option) any later version.
any later version.
GNU Make is distributed in the hope that it will be useful, GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
but WITHOUT ANY WARRANTY; without even the implied warranty of WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the A PARTICULAR PURPOSE. See the GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License along with
along with GNU Make; see the file COPYING. If not, write to GNU Make; see the file COPYING. If not, write to the Free Software
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
Boston, MA 02111-1307, USA. */
#include "make.h" #include "make.h"
@@ -31,26 +29,31 @@ Boston, MA 02111-1307, USA. */
#include "hash.h" #include "hash.h"
/* Remember whether snap_deps has been invoked: we need this to be sure we
don't add new rules (via $(eval ...)) afterwards. In the future it would
be nice to support this, but it means we'd need to re-run snap_deps() or
at least its functionality... it might mean changing snap_deps() to be run
per-file, so we can invoke it after the eval... or remembering which files
in the hash have been snapped (a new boolean flag?) and having snap_deps()
only work on files which have not yet been snapped. */
int snapped_deps = 0;
/* Hash table of files the makefile knows how to make. */ /* Hash table of files the makefile knows how to make. */
static unsigned long static unsigned long
file_hash_1 (key) file_hash_1 (const void *key)
const void *key;
{ {
return_ISTRING_HASH_1 (((struct file const *) key)->hname); return_ISTRING_HASH_1 (((struct file const *) key)->hname);
} }
static unsigned long static unsigned long
file_hash_2 (key) file_hash_2 (const void *key)
const void *key;
{ {
return_ISTRING_HASH_2 (((struct file const *) key)->hname); return_ISTRING_HASH_2 (((struct file const *) key)->hname);
} }
static int static int
file_hash_cmp (x, y) file_hash_cmp (const void *x, const void *y)
const void *x;
const void *y;
{ {
return_ISTRING_COMPARE (((struct file const *) x)->hname, return_ISTRING_COMPARE (((struct file const *) x)->hname,
((struct file const *) y)->hname); ((struct file const *) y)->hname);
@@ -70,8 +73,7 @@ static int all_secondary = 0;
enter_file similar, but create one if there is none. */ enter_file similar, but create one if there is none. */
struct file * struct file *
lookup_file (name) lookup_file (char *name)
char *name;
{ {
register struct file *f; register struct file *f;
struct file file_key; struct file file_key;
@@ -86,14 +88,15 @@ lookup_file (name)
on the command line. */ on the command line. */
#ifdef VMS #ifdef VMS
# ifndef WANT_CASE_SENSITIVE_TARGETS # ifndef WANT_CASE_SENSITIVE_TARGETS
{ if (*name != '.')
register char *n; {
lname = (char *) malloc (strlen (name) + 1); register char *n;
for (n = name, ln = lname; *n != '\0'; ++n, ++ln) lname = (char *) malloc (strlen (name) + 1);
*ln = isupper ((unsigned char)*n) ? tolower ((unsigned char)*n) : *n; for (n = name, ln = lname; *n != '\0'; ++n, ++ln)
*ln = '\0'; *ln = isupper ((unsigned char)*n) ? tolower ((unsigned char)*n) : *n;
name = lname; *ln = '\0';
} name = lname;
}
# endif # endif
while (name[0] == '[' && name[1] == ']' && name[2] != '\0') while (name[0] == '[' && name[1] == ']' && name[2] != '\0')
@@ -122,14 +125,14 @@ lookup_file (name)
file_key.hname = name; file_key.hname = name;
f = (struct file *) hash_find_item (&files, &file_key); f = (struct file *) hash_find_item (&files, &file_key);
#if defined(VMS) && !defined(WANT_CASE_SENSITIVE_TARGETS) #if defined(VMS) && !defined(WANT_CASE_SENSITIVE_TARGETS)
free (lname); if (*name != '.')
free (lname);
#endif #endif
return f; return f;
} }
struct file * struct file *
enter_file (name) enter_file (char *name)
char *name;
{ {
register struct file *f; register struct file *f;
register struct file *new; register struct file *new;
@@ -142,22 +145,23 @@ enter_file (name)
assert (*name != '\0'); assert (*name != '\0');
#if defined(VMS) && !defined(WANT_CASE_SENSITIVE_TARGETS) #if defined(VMS) && !defined(WANT_CASE_SENSITIVE_TARGETS)
{ if (*name != '.')
register char *n; {
lname = (char *) malloc (strlen (name) + 1); register char *n;
for (n = name, ln = lname; *n != '\0'; ++n, ++ln) lname = (char *) malloc (strlen (name) + 1);
{ for (n = name, ln = lname; *n != '\0'; ++n, ++ln)
if (isupper ((unsigned char)*n)) {
*ln = tolower ((unsigned char)*n); if (isupper ((unsigned char)*n))
else *ln = tolower ((unsigned char)*n);
*ln = *n; else
} *ln = *n;
}
*ln = 0; *ln = 0;
/* Creates a possible leak, old value of name is unreachable, but I /* Creates a possible leak, old value of name is unreachable, but I
currently don't know how to fix it. */ currently don't know how to fix it. */
name = lname; name = lname;
} }
#endif #endif
file_key.hname = name; file_key.hname = name;
@@ -166,7 +170,8 @@ enter_file (name)
if (! HASH_VACANT (f) && !f->double_colon) if (! HASH_VACANT (f) && !f->double_colon)
{ {
#if defined(VMS) && !defined(WANT_CASE_SENSITIVE_TARGETS) #if defined(VMS) && !defined(WANT_CASE_SENSITIVE_TARGETS)
free(lname); if (*name != '.')
free (lname);
#endif #endif
return f; return f;
} }
@@ -177,14 +182,16 @@ enter_file (name)
new->update_status = -1; new->update_status = -1;
if (HASH_VACANT (f)) if (HASH_VACANT (f))
hash_insert_at (&files, new, file_slot); {
new->last = new;
hash_insert_at (&files, new, file_slot);
}
else else
{ {
/* There is already a double-colon entry for this file. */ /* There is already a double-colon entry for this file. */
new->double_colon = f; new->double_colon = f;
while (f->prev != 0) f->last->prev = new;
f = f->prev; f->last = new;
f->prev = new;
} }
return new; return new;
@@ -195,9 +202,7 @@ enter_file (name)
and possibly merged with an existing file called NAME. */ and possibly merged with an existing file called NAME. */
void void
rename_file (from_file, to_hname) rename_file (struct file *from_file, char *to_hname)
register struct file *from_file;
char *to_hname;
{ {
rehash_file (from_file, to_hname); rehash_file (from_file, to_hname);
while (from_file) while (from_file)
@@ -212,9 +217,7 @@ rename_file (from_file, to_hname)
and possibly merged with an existing file called NAME. */ and possibly merged with an existing file called NAME. */
void void
rehash_file (from_file, to_hname) rehash_file (struct file *from_file, char *to_hname)
register struct file *from_file;
char *to_hname;
{ {
struct file file_key; struct file file_key;
struct file **file_slot; struct file **file_slot;
@@ -333,8 +336,7 @@ rehash_file (from_file, to_hname)
the message will go to stderr rather than stdout. */ the message will go to stderr rather than stdout. */
void void
remove_intermediates (sig) remove_intermediates (int sig)
int sig;
{ {
register struct file **file_slot; register struct file **file_slot;
register struct file **file_end; register struct file **file_end;
@@ -353,6 +355,10 @@ remove_intermediates (sig)
if (! HASH_VACANT (*file_slot)) if (! HASH_VACANT (*file_slot))
{ {
register struct file *f = *file_slot; register struct file *f = *file_slot;
/* Is this file eligible for automatic deletion?
Yes, IFF: it's marked intermediate, it's not secondary, it wasn't
given on the command-line, and it's either a -include makefile or
it's not precious. */
if (f->intermediate && (f->dontcare || !f->precious) if (f->intermediate && (f->dontcare || !f->precious)
&& !f->secondary && !f->cmd_target) && !f->secondary && !f->cmd_target)
{ {
@@ -403,6 +409,216 @@ remove_intermediates (sig)
} }
} }
struct dep *
parse_prereqs (char *p)
{
struct dep *new = (struct dep *)
multi_glob (parse_file_seq (&p, '|', sizeof (struct dep), 1),
sizeof (struct dep));
if (*p)
{
/* Files that follow '|' are "order-only" prerequisites that satisfy the
dependency by existing: their modification times are irrelevant. */
struct dep *ood;
++p;
ood = (struct dep *)
multi_glob (parse_file_seq (&p, '\0', sizeof (struct dep), 1),
sizeof (struct dep));
if (! new)
new = ood;
else
{
struct dep *dp;
for (dp = new; dp->next != NULL; dp = dp->next)
;
dp->next = ood;
}
for (; ood != NULL; ood = ood->next)
ood->ignore_mtime = 1;
}
return new;
}
/* 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)
{
struct dep *d;
struct dep *old = f->deps;
char *file_stem = f->stem;
unsigned int last_dep_has_cmds = f->updating;
int initialized = 0;
f->updating = 0;
f->deps = 0;
for (d = old; d != 0; d = d->next)
{
struct dep *new, *d1;
char *p;
if (! d->name)
continue;
/* Create the dependency list.
If we're not doing 2nd expansion, then it's just the name. */
if (! d->need_2nd_expansion)
p = d->name;
else
{
/* If it's from a static pattern rule, convert the patterns into
"$*" so they'll expand properly. */
if (d->staticpattern)
{
char *o;
char *buffer = variable_expand ("");
o = subst_expand (buffer, d->name, "%", "$*", 1, 2, 0);
free (d->name);
d->name = savestring (buffer, o - buffer);
d->staticpattern = 0; /* Clear staticpattern so that we don't
re-expand %s below. */
}
/* We are going to do second expansion so initialize file variables
for the file. Since the stem for static pattern rules comes from
individual dep lines, we will temporarily set f->stem to d->stem.
*/
if (!initialized)
{
initialize_file_variables (f, 0);
initialized = 1;
}
if (d->stem != 0)
f->stem = d->stem;
set_file_variables (f);
p = variable_expand_for_file (d->name, f);
if (d->stem != 0)
f->stem = file_stem;
}
/* Parse the prerequisites. */
new = parse_prereqs (p);
/* If this dep list was from a static pattern rule, expand the %s. We
use patsubst_expand to translate the prerequisites' patterns into
plain prerequisite names. */
if (new && d->staticpattern)
{
char *pattern = "%";
char *buffer = variable_expand ("");
struct dep *dp = new, *dl = 0;
while (dp != 0)
{
char *percent = find_percent (dp->name);
if (percent)
{
/* We have to handle empty stems specially, because that
would be equivalent to $(patsubst %,dp->name,) which
will always be empty. */
if (d->stem[0] == '\0')
/* This needs memmove() in ISO C. */
bcopy (percent+1, percent, strlen (percent));
else
{
char *o = patsubst_expand (buffer, d->stem, pattern,
dp->name, pattern+1,
percent+1);
if (o == buffer)
dp->name[0] = '\0';
else
{
free (dp->name);
dp->name = savestring (buffer, o - buffer);
}
}
/* If the name expanded to the empty string, ignore it. */
if (dp->name[0] == '\0')
{
struct dep *df = dp;
if (dp == new)
dp = new = new->next;
else
dp = dl->next = dp->next;
/* @@ Are we leaking df->name here? */
df->name = 0;
free_dep (df);
continue;
}
}
dl = dp;
dp = dp->next;
}
}
/* Enter them as files. */
for (d1 = new; d1 != 0; d1 = d1->next)
{
d1->file = lookup_file (d1->name);
if (d1->file == 0)
d1->file = enter_file (d1->name);
else
free (d1->name);
d1->name = 0;
d1->staticpattern = 0;
d1->need_2nd_expansion = 0;
}
/* Add newly parsed deps to f->deps. If this is the last dependency
line and this target has commands then put it in front so the
last dependency line (the one with commands) ends up being the
first. This is important because people expect $< to hold first
prerequisite from the rule with commands. If it is not the last
dependency line or the rule does not have commands then link it
at the end so it appears in makefile order. */
if (new != 0)
{
if (d->next == 0 && last_dep_has_cmds)
{
struct dep **d_ptr;
for (d_ptr = &new; *d_ptr; d_ptr = &(*d_ptr)->next)
;
*d_ptr = f->deps;
f->deps = new;
}
else
{
struct dep **d_ptr;
for (d_ptr = &f->deps; *d_ptr; d_ptr = &(*d_ptr)->next)
;
*d_ptr = new;
}
}
}
free_dep_chain (old);
}
/* For each dependency of each file, make the `struct dep' point /* For each dependency of each file, make the `struct dep' point
at the appropriate `struct file' (which may have to be created). at the appropriate `struct file' (which may have to be created).
@@ -410,33 +626,34 @@ remove_intermediates (sig)
and various other special targets. */ and various other special targets. */
void void
snap_deps () snap_deps (void)
{ {
register struct file *f; struct file *f;
register struct file *f2; struct file *f2;
register struct dep *d; struct dep *d;
register struct file **file_slot_0; struct file **file_slot_0;
register struct file **file_slot; struct file **file_slot;
register struct file **file_end; struct file **file_end;
/* Perform second expansion and enter each dependency
name as a file. */
/* Expand .SUFFIXES first; it's dependencies are used for
$$* calculation. */
for (f = lookup_file (".SUFFIXES"); f != 0; f = f->prev)
expand_deps (f);
/* Enter each dependency name as a file. */
/* We must use hash_dump (), because within this loop /* We must use hash_dump (), because within this loop
we might add new files to the table, possibly causing we might add new files to the table, possibly causing
an in-situ table expansion. */ an in-situ table expansion. */
file_slot_0 = (struct file **) hash_dump (&files, 0, 0); file_slot_0 = (struct file **) hash_dump (&files, 0, 0);
file_end = file_slot_0 + files.ht_fill; file_end = file_slot_0 + files.ht_fill;
for (file_slot = file_slot_0; file_slot < file_end; file_slot++) for (file_slot = file_slot_0; file_slot < file_end; file_slot++)
for (f2 = *file_slot; f2 != 0; f2 = f2->prev) for (f = *file_slot; f != 0; f = f->prev)
for (d = f2->deps; d != 0; d = d->next) {
if (d->name != 0) if (strcmp (f->name, ".SUFFIXES") != 0)
{ expand_deps (f);
d->file = lookup_file (d->name); }
if (d->file == 0)
d->file = enter_file (d->name);
else
free (d->name);
d->name = 0;
}
free (file_slot_0); free (file_slot_0);
for (f = lookup_file (".PRECIOUS"); f != 0; f = f->prev) for (f = lookup_file (".PRECIOUS"); f != 0; f = f->prev)
@@ -453,8 +670,9 @@ snap_deps ()
for (d = f->deps; d != 0; d = d->next) for (d = f->deps; d != 0; d = d->next)
for (f2 = d->file; f2 != 0; f2 = f2->prev) for (f2 = d->file; f2 != 0; f2 = f2->prev)
{ {
/* Mark this file as phony and nonexistent. */ /* Mark this file as phony nonexistent target. */
f2->phony = 1; f2->phony = 1;
f2->is_target = 1;
f2->last_mtime = NONEXISTENT_MTIME; f2->last_mtime = NONEXISTENT_MTIME;
f2->mtime_before_update = NONEXISTENT_MTIME; f2->mtime_before_update = NONEXISTENT_MTIME;
} }
@@ -484,7 +702,10 @@ snap_deps ()
f2->intermediate = f2->secondary = 1; f2->intermediate = f2->secondary = 1;
/* .SECONDARY with no deps listed marks *all* files that way. */ /* .SECONDARY with no deps listed marks *all* files that way. */
else else
all_secondary = 1; {
all_secondary = 1;
hash_map (&files, set_intermediate);
}
} }
f = lookup_file (".EXPORT_ALL_VARIABLES"); f = lookup_file (".EXPORT_ALL_VARIABLES");
@@ -513,21 +734,26 @@ snap_deps ()
f2->command_flags |= COMMANDS_SILENT; f2->command_flags |= COMMANDS_SILENT;
} }
f = lookup_file (".POSIX");
if (f != 0 && f->is_target)
posix_pedantic = 1;
f = lookup_file (".NOTPARALLEL"); f = lookup_file (".NOTPARALLEL");
if (f != 0 && f->is_target) if (f != 0 && f->is_target)
not_parallel = 1; not_parallel = 1;
#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?
if (posix_pedantic)
define_variable (STRING_SIZE_TUPLE("OUTPUT_OPTION"), "", o_default, 1);
*/
#endif
/* Remember that we've done this. */
snapped_deps = 1;
} }
/* Set the `command_state' member of FILE and all its `also_make's. */ /* Set the `command_state' member of FILE and all its `also_make's. */
void void
set_command_state (file, state) set_command_state (struct file *file, enum cmd_state state)
struct file *file;
int state;
{ {
struct dep *d; struct dep *d;
@@ -540,10 +766,7 @@ set_command_state (file, state)
/* Convert an external file timestamp to internal form. */ /* Convert an external file timestamp to internal form. */
FILE_TIMESTAMP FILE_TIMESTAMP
file_timestamp_cons (fname, s, ns) file_timestamp_cons (const char *fname, time_t s, int ns)
char const *fname;
time_t s;
int ns;
{ {
int offset = ORDINARY_MTIME_MIN + (FILE_TIMESTAMP_HI_RES ? ns : 0); int offset = ORDINARY_MTIME_MIN + (FILE_TIMESTAMP_HI_RES ? ns : 0);
FILE_TIMESTAMP product = (FILE_TIMESTAMP) s << FILE_TIMESTAMP_LO_BITS; FILE_TIMESTAMP product = (FILE_TIMESTAMP) s << FILE_TIMESTAMP_LO_BITS;
@@ -565,8 +788,7 @@ file_timestamp_cons (fname, s, ns)
/* Return the current time as a file timestamp, setting *RESOLUTION to /* Return the current time as a file timestamp, setting *RESOLUTION to
its resolution. */ its resolution. */
FILE_TIMESTAMP FILE_TIMESTAMP
file_timestamp_now (resolution) file_timestamp_now (int *resolution)
int *resolution;
{ {
int r; int r;
time_t s; time_t s;
@@ -606,7 +828,9 @@ file_timestamp_now (resolution)
s = time ((time_t *) 0); s = time ((time_t *) 0);
ns = 0; ns = 0;
#if FILE_TIMESTAMP_HI_RES
got_time: got_time:
#endif
*resolution = r; *resolution = r;
return file_timestamp_cons (0, s, ns); return file_timestamp_cons (0, s, ns);
} }
@@ -614,9 +838,7 @@ file_timestamp_now (resolution)
/* Place into the buffer P a printable representation of the file /* Place into the buffer P a printable representation of the file
timestamp TS. */ timestamp TS. */
void void
file_timestamp_sprintf (p, ts) file_timestamp_sprintf (char *p, FILE_TIMESTAMP ts)
char *p;
FILE_TIMESTAMP ts;
{ {
time_t t = FILE_TIMESTAMP_S (ts); time_t t = FILE_TIMESTAMP_S (ts);
struct tm *tm = localtime (&t); struct tm *tm = localtime (&t);
@@ -648,9 +870,9 @@ file_timestamp_sprintf (p, ts)
/* Print the data base of files. */ /* Print the data base of files. */
static void static void
print_file (f) print_file (const void *item)
struct file *f;
{ {
struct file *f = (struct file *) item;
struct dep *d; struct dep *d;
struct dep *ood = 0; struct dep *ood = 0;
@@ -684,7 +906,7 @@ print_file (f)
if (f->cmd_target) if (f->cmd_target)
puts (_("# Command-line target.")); puts (_("# Command-line target."));
if (f->dontcare) if (f->dontcare)
puts (_("# A default or MAKEFILES makefile.")); puts (_("# A default, MAKEFILES, or -include/sinclude makefile."));
puts (f->tried_implicit puts (f->tried_implicit
? _("# Implicit rule search has been done.") ? _("# Implicit rule search has been done.")
: _("# Implicit rule search has not been done.")); : _("# Implicit rule search has not been done."));
@@ -756,10 +978,13 @@ print_file (f)
if (f->cmds != 0) if (f->cmds != 0)
print_commands (f->cmds); print_commands (f->cmds);
if (f->prev)
print_file ((const void *) f->prev);
} }
void void
print_file_data_base () print_file_data_base (void)
{ {
puts (_("\n# Files")); puts (_("\n# Files"));
@@ -772,8 +997,7 @@ print_file_data_base ()
#define EXPANSION_INCREMENT(_l) ((((_l) / 500) + 1) * 500) #define EXPANSION_INCREMENT(_l) ((((_l) / 500) + 1) * 500)
char * char *
build_target_list (value) build_target_list (char *value)
char *value;
{ {
static unsigned long last_targ_count = 0; static unsigned long last_targ_count = 0;
@@ -819,7 +1043,7 @@ build_target_list (value)
} }
void void
init_hash_files () init_hash_files (void)
{ {
hash_init (&files, 1000, file_hash_1, file_hash_2, file_hash_cmp); hash_init (&files, 1000, file_hash_1, file_hash_2, file_hash_cmp);
} }

View File

@@ -1,22 +1,20 @@
/* Definition of target file data structures for GNU Make. /* Definition of target file data structures for GNU Make.
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1997, Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
2002 Free Software Foundation, Inc. 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
This file is part of GNU Make. This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify GNU Make is free software; you can redistribute it and/or modify it under the
it under the terms of the GNU General Public License as published by terms of the GNU General Public License as published by the Free Software
the Free Software Foundation; either version 2, or (at your option) Foundation; either version 2, or (at your option) any later version.
any later version.
GNU Make is distributed in the hope that it will be useful, GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
but WITHOUT ANY WARRANTY; without even the implied warranty of WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the A PARTICULAR PURPOSE. See the GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License along with
along with GNU Make; see the file COPYING. If not, write to GNU Make; see the file COPYING. If not, write to the Free Software
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
Boston, MA 02111-1307, USA. */
/* Structure that represents the info on one file /* Structure that represents the info on one file
@@ -42,6 +40,7 @@ struct file
struct file *prev; /* Previous entry for same file name; struct file *prev; /* Previous entry for same file name;
used when there are multiple double-colon used when there are multiple double-colon
entries for the same file. */ entries for the same file. */
struct file *last; /* Last entry for the same file name. */
/* File that this file was renamed to. After any time that a /* File that this file was renamed to. After any time that a
file could be renamed, call `check_renamed' (below). */ file could be renamed, call `check_renamed' (below). */
@@ -65,7 +64,7 @@ struct file
short int update_status; /* Status of the last attempt to update, short int update_status; /* Status of the last attempt to update,
or -1 if none has been made. */ or -1 if none has been made. */
enum /* State of the commands. */ enum cmd_state /* State of the commands. */
{ /* Note: It is important that cs_not_started be zero. */ { /* Note: It is important that cs_not_started be zero. */
cs_not_started, /* Not yet started. */ cs_not_started, /* Not yet started. */
cs_deps_running, /* Dep commands running. */ cs_deps_running, /* Dep commands running. */
@@ -84,31 +83,32 @@ struct file
unsigned int is_target:1; /* Nonzero if file is described as target. */ unsigned int is_target:1; /* Nonzero if file is described as target. */
unsigned int cmd_target:1; /* Nonzero if file was given on cmd line. */ unsigned int cmd_target:1; /* Nonzero if file was given on cmd line. */
unsigned int phony:1; /* Nonzero if this is a phony file unsigned int phony:1; /* Nonzero if this is a phony file
i.e., a dependency of .PHONY. */ i.e., a prerequisite of .PHONY. */
unsigned int intermediate:1;/* Nonzero if this is an intermediate file. */ unsigned int intermediate:1;/* Nonzero if this is an intermediate file. */
/* Nonzero, for an intermediate file, unsigned int secondary:1; /* Nonzero means remove_intermediates should
means remove_intermediates should not delete it. */ not delete it. */
unsigned int secondary:1;
unsigned int dontcare:1; /* Nonzero if no complaint is to be made if unsigned int dontcare:1; /* Nonzero if no complaint is to be made if
this target cannot be remade. */ this target cannot be remade. */
unsigned int ignore_vpath:1;/* Nonzero if we threw out VPATH name. */ unsigned int ignore_vpath:1;/* Nonzero if we threw out VPATH name. */
unsigned int pat_searched:1;/* Nonzero if we already searched for unsigned int pat_searched:1;/* Nonzero if we already searched for
pattern-specific variables. */ pattern-specific variables. */
unsigned int considered:1; /* equal to `considered' if file has been unsigned int considered:1; /* equal to 'considered' if file has been
considered on current scan of goal chain */ considered on current scan of goal chain */
}; };
extern struct file *default_goal_file, *suffix_file, *default_file; extern struct file *default_goal_file, *suffix_file, *default_file;
extern char **default_goal_name;
extern struct file *lookup_file PARAMS ((char *name)); extern struct file *lookup_file PARAMS ((char *name));
extern struct file *enter_file PARAMS ((char *name)); extern struct file *enter_file PARAMS ((char *name));
extern struct dep *parse_prereqs PARAMS ((char *prereqs));
extern void remove_intermediates PARAMS ((int sig)); extern void remove_intermediates PARAMS ((int sig));
extern void snap_deps PARAMS ((void)); extern void snap_deps PARAMS ((void));
extern void rename_file PARAMS ((struct file *file, char *name)); extern void rename_file PARAMS ((struct file *file, char *name));
extern void rehash_file PARAMS ((struct file *file, char *name)); extern void rehash_file PARAMS ((struct file *file, char *name));
extern void set_command_state PARAMS ((struct file *file, int state)); extern void set_command_state PARAMS ((struct file *file, enum cmd_state state));
extern void notice_finished_file PARAMS ((struct file *file)); extern void notice_finished_file PARAMS ((struct file *file));
extern void init_hash_files PARAMS ((void)); extern void init_hash_files PARAMS ((void));
extern char *build_target_list PARAMS ((char *old_list)); extern char *build_target_list PARAMS ((char *old_list));
@@ -197,3 +197,6 @@ extern FILE_TIMESTAMP f_mtime PARAMS ((struct file *file, int search));
#define check_renamed(file) \ #define check_renamed(file) \
while ((file)->renamed != 0) (file) = (file)->renamed /* No ; here. */ while ((file)->renamed != 0) (file) = (file)->renamed /* No ; here. */
/* Have we snapped deps yet? */
extern int snapped_deps;

File diff suppressed because it is too large Load Diff

View File

@@ -1,21 +1,21 @@
/* Get the system load averages. /* Get the system load averages.
Copyright (C) 1985, 86, 87, 88, 89, 91, 92, 93, 1994, 1995, 1997 Copyright (C) 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
Free Software Foundation, Inc. 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation; either version 2, or (at your option)
any later version. any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License along with
along with this program; if not, write to the Free Software this program; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
USA. */
/* Compile-time symbols that this file uses: /* Compile-time symbols that this file uses:
@@ -355,7 +355,7 @@ extern int errno;
/* LOAD_AVE_TYPE should only get defined if we're going to use the /* LOAD_AVE_TYPE should only get defined if we're going to use the
nlist method. */ nlist method. */
# if !defined(LOAD_AVE_TYPE) && (defined(BSD) || defined(LDAV_CVT) || defined(KERNEL_FILE) || defined(LDAV_SYMBOL)) # if !defined(LOAD_AVE_TYPE) && (defined(BSD) || defined(LDAV_CVT) || defined(KERNEL_FILE) || defined(LDAV_SYMBOL)) && !defined(__riscos__)
# define LOAD_AVE_TYPE double # define LOAD_AVE_TYPE double
# endif # endif
@@ -498,9 +498,7 @@ static kvm_t *kd;
or -1 if an error occurred. */ or -1 if an error occurred. */
int int
getloadavg (loadavg, nelem) getloadavg (double loadavg[], int nelem)
double loadavg[];
int nelem;
{ {
int elem = 0; /* Return value. */ int elem = 0; /* Return value. */
@@ -994,9 +992,7 @@ getloadavg (loadavg, nelem)
#include "make.h" #include "make.h"
int int
main (argc, argv) main (int argc, char **argv)
int argc;
char **argv;
{ {
int naptime = 0; int naptime = 0;

View File

@@ -1,29 +1,29 @@
/* Getopt for GNU. /* Getopt for GNU.
NOTE: getopt is now part of the C library, so if you don't know what 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 "Keep this file name-space clean" means, talk to drepper@gnu.org
before changing it! before changing it!
Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98 Copyright (C) 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996,
Free Software Foundation, Inc. 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library. NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@gnu.org. Bugs can be reported to bug-glibc@gnu.org.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any Free Software Foundation; either version 2, or (at your option) any
later version. later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
this program; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
USA. */
/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>. /* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
Ditto for AIX 3.2 and <stdlib.h>. */ Ditto for AIX 3.2 and <stdlib.h>. */
#ifndef _NO_PROTO #ifndef _NO_PROTO
@@ -210,9 +210,7 @@ extern char *getenv ();
#endif #endif
static char * static char *
my_index (str, chr) my_index (const char *str, int chr)
const char *str;
int chr;
{ {
while (*str) while (*str)
{ {
@@ -262,8 +260,7 @@ static char *const *original_argv;
/* Make sure the environment variable bash 2.0 puts in the environment /* Make sure the environment variable bash 2.0 puts in the environment
is valid for the getopt call we must make sure that the ARGV passed is valid for the getopt call we must make sure that the ARGV passed
to getopt is that one passed to the process. */ to getopt is that one passed to the process. */
static void static void __attribute__ ((unused))
__attribute__ ((unused))
store_args_and_env (int argc, char *const *argv) store_args_and_env (int argc, char *const *argv)
{ {
/* XXX This is no good solution. We should rather copy the args so /* XXX This is no good solution. We should rather copy the args so
@@ -300,8 +297,7 @@ static void exchange (char **);
#endif #endif
static void static void
exchange (argv) exchange (char **argv)
char **argv;
{ {
int bottom = first_nonopt; int bottom = first_nonopt;
int middle = last_nonopt; int middle = last_nonopt;
@@ -385,10 +381,7 @@ exchange (argv)
static const char *_getopt_initialize (int, char *const *, const char *); static const char *_getopt_initialize (int, char *const *, const char *);
#endif #endif
static const char * static const char *
_getopt_initialize (argc, argv, optstring) _getopt_initialize (int argc, char *const *argv, const char *optstring)
int argc;
char *const *argv;
const char *optstring;
{ {
/* Start processing options with ARGV-element 1 (since ARGV-element 0 /* Start processing options with ARGV-element 1 (since ARGV-element 0
is the program name); the sequence of previously skipped is the program name); the sequence of previously skipped
@@ -507,13 +500,8 @@ _getopt_initialize (argc, argv, optstring)
long-named options. */ long-named options. */
int int
_getopt_internal (argc, argv, optstring, longopts, longind, long_only) _getopt_internal (int argc, char *const *argv, const char *optstring,
int argc; const struct option *longopts, int *longind, int long_only)
char *const *argv;
const char *optstring;
const struct option *longopts;
int *longind;
int long_only;
{ {
optarg = NULL; optarg = NULL;
@@ -961,10 +949,7 @@ _getopt_internal (argc, argv, optstring, longopts, longind, long_only)
} }
int int
getopt (argc, argv, optstring) getopt (int argc, char *const *argv, const char *optstring)
int argc;
char *const *argv;
const char *optstring;
{ {
return _getopt_internal (argc, argv, optstring, return _getopt_internal (argc, argv, optstring,
(const struct option *) 0, (const struct option *) 0,
@@ -980,9 +965,7 @@ getopt (argc, argv, optstring)
the above definition of `getopt'. */ the above definition of `getopt'. */
int int
main (argc, argv) main (int argc, char **argv)
int argc;
char **argv;
{ {
int c; int c;
int digit_optind = 0; int digit_optind = 0;

View File

@@ -1,23 +1,23 @@
/* Declarations for getopt. /* Declarations for getopt.
Copyright (C) 1989,90,91,92,93,94,96,97 Free Software Foundation, Inc. Copyright (C) 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library. NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@gnu.org. Bugs can be reported to bug-glibc@gnu.org.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any Free Software Foundation; either version 2, or (at your option) any
later version. later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License along with
along with this program; if not, write to the Free Software this program; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
USA. */
#ifndef _GETOPT_H #ifndef _GETOPT_H
#define _GETOPT_H 1 #define _GETOPT_H 1

View File

@@ -1,24 +1,24 @@
/* getopt_long and getopt_long_only entry points for GNU getopt. /* getopt_long and getopt_long_only entry points for GNU getopt.
Copyright (C) 1987,88,89,90,91,92,93,94,96,97,98 Copyright (C) 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997,
Free Software Foundation, Inc. 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library. NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@prep.ai.mit.edu. Bugs can be reported to bug-glibc@gnu.org.
This program is free software; you can redistribute it and/or modify it This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the under the terms of the GNU General Public License as published by the
Free Software Foundation; either version 2, or (at your option) any Free Software Foundation; either version 2, or (at your option) any
later version. later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License along with
along with this program; if not, write to the Free Software this program; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
USA. */
#ifdef HAVE_CONFIG_H #ifdef HAVE_CONFIG_H
#include <config.h> #include <config.h>
@@ -66,12 +66,8 @@
#endif #endif
int int
getopt_long (argc, argv, options, long_options, opt_index) getopt_long (int argc, char *const *argv, const char *options,
int argc; const struct option *long_options, int *opt_index)
char *const *argv;
const char *options;
const struct option *long_options;
int *opt_index;
{ {
return _getopt_internal (argc, argv, options, long_options, opt_index, 0); return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
} }
@@ -82,12 +78,8 @@ getopt_long (argc, argv, options, long_options, opt_index)
instead. */ instead. */
int int
getopt_long_only (argc, argv, options, long_options, opt_index) getopt_long_only (int argc, char *const *argv, const char *options,
int argc; const struct option *long_options, int *opt_index)
char *const *argv;
const char *options;
const struct option *long_options;
int *opt_index;
{ {
return _getopt_internal (argc, argv, options, long_options, opt_index, 1); return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
} }
@@ -100,9 +92,7 @@ getopt_long_only (argc, argv, options, long_options, opt_index)
#include <stdio.h> #include <stdio.h>
int int
main (argc, argv) main (int argc, char **argv)
int argc;
char **argv;
{ {
int c; int c;
int digit_optind = 0; int digit_optind = 0;

View File

@@ -1,20 +1,19 @@
/* Convenience header for conditional use of GNU <libintl.h>. /* Convenience header for conditional use of GNU <libintl.h>.
Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc. Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2003, 2004, 2005,
2006 Free Software Foundation, Inc.
This file is part of GNU Make.
This program is free software; you can redistribute it and/or modify it GNU Make is free software; you can redistribute it and/or modify it under the
under the terms of the GNU Library General Public License as published terms of the GNU General Public License as published by the Free Software
by the Free Software Foundation; either version 2, or (at your option) Foundation; either version 2, or (at your option) any later version.
any later version.
This program is distributed in the hope that it will be useful, GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
but WITHOUT ANY WARRANTY; without even the implied warranty of WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU A PARTICULAR PURPOSE. See the GNU General Public License for more details.
Library General Public License for more details.
You should have received a copy of the GNU Library General Public You should have received a copy of the GNU General Public License along with
License along with this program; if not, write to the Free Software GNU Make; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
USA. */
#ifndef _LIBGETTEXT_H #ifndef _LIBGETTEXT_H
#define _LIBGETTEXT_H 1 #define _LIBGETTEXT_H 1

View File

@@ -1,3 +1,24 @@
2006-02-24 Eli Zaretskii <eliz@gnu.org>
* glob.c (my_malloc) [WINDOWS32]: Provide a full ISO C prototype,
to avoid compiler warnings.
2005-06-25 Paul D. Smith <psmith@gnu.org>
* fnmatch.h, glob.h [WINDOWS32]: Fix ifdefs in headers.
Fixes Savannah bug #13477.
2005-03-11 Paul D. Smith <psmith@gnu.org>
* glob.c (glob_in_dir): Change FNM_CASEFOLD to be enabled if
HAVE_CASE_INSENSITIVE_FS is defined.
2003-01-30 Paul D. Smith <psmith@gnu.org>
* glob.h: Patch for FreeBSD by Mike Barcroft <mike@freebsd.org>
Reported by Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>. On
FreeBSD, declare __size_t to simply size_t.
2002-04-22 Paul D. Smith <psmith@gnu.org> 2002-04-22 Paul D. Smith <psmith@gnu.org>
* Makefile.am: Use automake 1.6. * Makefile.am: Use automake 1.6.
@@ -133,4 +154,21 @@ Fri Jun 21 00:27:51 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* posix/fnmatch.c (fnmatch): Fix \*[*?]+ case to increment name ptr * posix/fnmatch.c (fnmatch): Fix \*[*?]+ case to increment name ptr
only for ?s, not for *s. Fix from Chet Ramey. only for ?s, not for *s. Fix from Chet Ramey.
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
GNU Make; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

View File

@@ -1,6 +1,21 @@
# -*-Makefile-*-, or close enough # -*-Makefile-*-, or close enough
# Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
# 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This file is part of GNU Make.
#
# GNU Make is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2, or (at your option) any later version.
#
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# GNU Make; see the file COPYING. If not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
AUTOMAKE_OPTIONS = 1.7 foreign AUTOMAKE_OPTIONS = foreign
# Only build the library when the system doesn't already have GNU glob. # Only build the library when the system doesn't already have GNU glob.
if USE_LOCAL_GLOB if USE_LOCAL_GLOB

View File

@@ -1,22 +1,19 @@
# Makefile for standalone distribution of libglob.a (fnmatch, glob). # Makefile for standalone libglob.a (fnmatch, glob). -*-Makefile-*-
# Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# Copyright (C) 1991, 92, 93, 94, 95, 97, 98 Free Software Foundation, Inc. # 2005, 2006 Free Software Foundation, Inc.
# This file is part of the GNU C Library. # This file is part of GNU Make.
#
# This library is free software; you can redistribute it and/or # GNU Make is free software; you can redistribute it and/or modify it under the
# modify it under the terms of the GNU Library General Public License # terms of the GNU General Public License as published by the Free Software
# as published by the Free Software Foundation; either version 2 of # Foundation; either version 2, or (at your option) any later version.
# the License, or (at your option) any later version. #
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
# This library is distributed in the hope that it will be useful, # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# but WITHOUT ANY WARRANTY; without even the implied warranty of # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU #
# Library General Public License for more details. # You should have received a copy of the GNU General Public License along with
# GNU Make; see the file COPYING. If not, write to the Free Software
# You should have received a copy of the GNU Library General Public # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
# License along with this library; see the file COPYING.LIB. If
# not, write to the Free Software Foundation, Inc.,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Ultrix 2.2 make doesn't expand the value of VPATH. # Ultrix 2.2 make doesn't expand the value of VPATH.
VPATH = /glob/ VPATH = /glob/

View File

@@ -1,22 +1,19 @@
# Makefile for standalone distribution of libglob.a (fnmatch, glob). # Makefile for standalone distribution of libglob.a (fnmatch, glob).
# Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# Copyright (C) 1991, 92, 93, 94, 95, 97, 98 Free Software Foundation, Inc. # 2005, 2006 Free Software Foundation, Inc.
# This file is part of the GNU C Library. # This file is part of GNU Make.
#
# This library is free software; you can redistribute it and/or # GNU Make is free software; you can redistribute it and/or modify it under the
# modify it under the terms of the GNU Library General Public License # terms of the GNU General Public License as published by the Free Software
# as published by the Free Software Foundation; either version 2 of # Foundation; either version 2, or (at your option) any later version.
# the License, or (at your option) any later version. #
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
# This library is distributed in the hope that it will be useful, # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# but WITHOUT ANY WARRANTY; without even the implied warranty of # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU #
# Library General Public License for more details. # You should have received a copy of the GNU General Public License along with
# GNU Make; see the file COPYING. If not, write to the Free Software
# You should have received a copy of the GNU Library General Public # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
# License along with this library; see the file COPYING.LIB. If
# not, write to the Free Software Foundation, Inc.,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Ultrix 2.2 make doesn't expand the value of VPATH. # Ultrix 2.2 make doesn't expand the value of VPATH.
VPATH = /glob/ VPATH = /glob/

View File

@@ -1,4 +1,22 @@
@echo off @echo off
rem Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
rem 2004, 2005, 2006 Free Software Foundation, Inc.
rem This file is part of GNU Make.
rem GNU Make is free software; you can redistribute it and/or modify it under
rem the terms of the GNU General Public License as published by the Free
rem Software Foundation; either version 2, or (at your option) any later
rem version.
rem GNU Make is distributed in the hope that it will be useful, but WITHOUT
rem ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
rem FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
rem more details.
rem You should have received a copy of the GNU General Public License along
rem with GNU Make; see the file COPYING. If not, write to the Free Software
rem Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
echo Configuring glob for DJGPP echo Configuring glob for DJGPP
rem This batch file assumes a unix-type "sed" program rem This batch file assumes a unix-type "sed" program

View File

@@ -1,20 +1,20 @@
/* Copyright (C) 1991, 92, 93, 96, 97, 98, 99 Free Software Foundation, Inc. /* Copyright (C) 1991, 92, 93, 96, 97, 98, 99 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version. License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details. Library General Public License for more details.
You should have received a copy of the GNU Library General Public You should have received a copy of the GNU Library General Public License
License along with this library; see the file COPYING.LIB. If not, along with this library; see the file COPYING.LIB. If not, write to the Free
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
Boston, MA 02111-1307, USA. */ USA. */
#if HAVE_CONFIG_H #if HAVE_CONFIG_H
# include <config.h> # include <config.h>

View File

@@ -1,20 +1,20 @@
/* Copyright (C) 1991, 92, 93, 96, 97, 98, 99 Free Software Foundation, Inc. /* Copyright (C) 1991, 92, 93, 96, 97, 98, 99 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version. License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful, The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details. Library General Public License for more details.
You should have received a copy of the GNU Library General Public You should have received a copy of the GNU Library General Public License
License along with the GNU C Library; see the file COPYING.LIB. If not, along with this library; see the file COPYING.LIB. If not, write to the Free
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
Boston, MA 02111-1307, USA. */ USA. */
#ifndef _FNMATCH_H #ifndef _FNMATCH_H
#define _FNMATCH_H 1 #define _FNMATCH_H 1
@@ -24,7 +24,7 @@ extern "C" {
#endif #endif
#if defined __cplusplus || (defined __STDC__ && __STDC__) || defined WINDOWS32 #if defined __cplusplus || (defined __STDC__ && __STDC__) || defined WINDOWS32
# if !defined __GLIBC__ || !defined __P # if !defined __GLIBC__
# undef __P # undef __P
# define __P(protos) protos # define __P(protos) protos
# endif # endif
@@ -37,7 +37,7 @@ extern "C" {
#endif /* C++ or ANSI C. */ #endif /* C++ or ANSI C. */
#ifndef const #ifndef const
# if (defined __STDC__ && __STDC__) || defined __cplusplus # if (defined __STDC__ && __STDC__) || defined __cplusplus || defined WINDOWS32
# define __const const # define __const const
# else # else
# define __const # define __const

View File

@@ -1,19 +1,19 @@
/* Copyright (C) 1991,92,93,94,95,96,97,98,99 Free Software Foundation, Inc. /* Copyright (C) 1991,92,93,94,95,96,97,98,99 Free Software Foundation, Inc.
This library is free software; you can redistribute it and/or This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version. License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details. Library General Public License for more details.
You should have received a copy of the GNU Library General Public You should have received a copy of the GNU Library General Public License
License along with this library; see the file COPYING.LIB. If not, along with this library; see the file COPYING.LIB. If not, write to the Free
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
Boston, MA 02111-1307, USA. */ USA. */
/* AIX requires this to be the first thing in the file. */ /* AIX requires this to be the first thing in the file. */
#if defined _AIX && !defined __GNUC__ #if defined _AIX && !defined __GNUC__
@@ -188,12 +188,13 @@ __inline
# ifndef __SASC # ifndef __SASC
# ifdef WINDOWS32 # ifdef WINDOWS32
static void * static void *
my_realloc (void *p, unsigned int n)
# else # else
static char * static char *
# endif
my_realloc (p, n) my_realloc (p, n)
char *p; char *p;
unsigned int n; unsigned int n;
# endif
{ {
/* These casts are the for sake of the broken Ultrix compiler, /* These casts are the for sake of the broken Ultrix compiler,
which warns of illegal pointer combinations otherwise. */ which warns of illegal pointer combinations otherwise. */
@@ -299,11 +300,8 @@ static int glob_in_dir __P ((const char *pattern, const char *directory,
static int prefix_array __P ((const char *prefix, char **array, size_t n)); static int prefix_array __P ((const char *prefix, char **array, size_t n));
static int collated_compare __P ((const __ptr_t, const __ptr_t)); static int collated_compare __P ((const __ptr_t, const __ptr_t));
#ifdef VMS
/* these compilers like prototypes */
#if !defined _LIBC || !defined NO_GLOB_PATTERN_P #if !defined _LIBC || !defined NO_GLOB_PATTERN_P
int __glob_pattern_p (const char *pattern, int quote); int __glob_pattern_p __P ((const char *pattern, int quote));
#endif
#endif #endif
/* Find the end of the sub-pattern in a brace expression. We define /* Find the end of the sub-pattern in a brace expression. We define
@@ -1303,7 +1301,7 @@ glob_in_dir (pattern, directory, flags, errfunc, pglob)
{ {
int fnm_flags = ((!(flags & GLOB_PERIOD) ? FNM_PERIOD : 0) int fnm_flags = ((!(flags & GLOB_PERIOD) ? FNM_PERIOD : 0)
| ((flags & GLOB_NOESCAPE) ? FNM_NOESCAPE : 0) | ((flags & GLOB_NOESCAPE) ? FNM_NOESCAPE : 0)
#if defined _AMIGA || defined VMS #if defined HAVE_CASE_INSENSITIVE_FS
| FNM_CASEFOLD | FNM_CASEFOLD
#endif #endif
); );

View File

@@ -1,19 +1,19 @@
/* Copyright (C) 1991, 92, 95, 96, 97, 98 Free Software Foundation, Inc. /* Copyright (C) 1991, 92, 95, 96, 97, 98 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as modify it under the terms of the GNU Library General Public License as
published by the Free Software Foundation; either version 2 of the published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version. License, or (at your option) any later version.
The GNU C Library is distributed in the hope that it will be useful, The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details. Library General Public License for more details.
You should have received a copy of the GNU Library General Public You should have received a copy of the GNU Library General Public License
License along with the GNU C Library; see the file COPYING.LIB. If not, along with this library; see the file COPYING.LIB. If not, write to the Free
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
Boston, MA 02111-1307, USA. */ USA. */
#ifndef _GLOB_H #ifndef _GLOB_H
#define _GLOB_H 1 #define _GLOB_H 1
@@ -24,7 +24,7 @@ extern "C" {
#undef __ptr_t #undef __ptr_t
#if defined __cplusplus || (defined __STDC__ && __STDC__) || defined WINDOWS32 #if defined __cplusplus || (defined __STDC__ && __STDC__) || defined WINDOWS32
# if !defined __GLIBC__ || !defined __P # if !defined __GLIBC__
# undef __P # undef __P
# undef __PMT # undef __PMT
# define __P(protos) protos # define __P(protos) protos
@@ -47,9 +47,12 @@ extern "C" {
/* We need `size_t' for the following definitions. */ /* We need `size_t' for the following definitions. */
#ifndef __size_t #ifndef __size_t
# if defined __GNUC__ && __GNUC__ >= 2 # if defined __FreeBSD__
typedef __SIZE_TYPE__ __size_t; # define __size_t size_t
# else # else
# if defined __GNUC__ && __GNUC__ >= 2
typedef __SIZE_TYPE__ __size_t;
# else
/* This is a guess. */ /* This is a guess. */
/*hb /*hb
* Conflicts with DECCs aready defined type __size_t. * Conflicts with DECCs aready defined type __size_t.
@@ -57,9 +60,10 @@ typedef __SIZE_TYPE__ __size_t;
* Anyway if DECC is used and __SIZE_T is defined then __size_t is * Anyway if DECC is used and __SIZE_T is defined then __size_t is
* already defined (and I hope it's exactly the one we need here). * already defined (and I hope it's exactly the one we need here).
*/ */
#if !(defined __DECC && defined __SIZE_T) # if !(defined __DECC && defined __SIZE_T)
typedef unsigned long int __size_t; typedef unsigned long int __size_t;
#endif # endif
# endif
# endif # endif
#else #else
/* The GNU CC stddef.h version defines __size_t as empty. We need a real /* The GNU CC stddef.h version defines __size_t as empty. We need a real

103
hash.c
View File

@@ -2,20 +2,19 @@
Copyright (C) 1995, 1999, 2002 Free Software Foundation, Inc. Copyright (C) 1995, 1999, 2002 Free Software Foundation, Inc.
Written by Greg McGary <gkm@gnu.org> <greg@mcgary.org> Written by Greg McGary <gkm@gnu.org> <greg@mcgary.org>
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation; either version 2, or (at your option)
any later version. any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License along with
along with this program; if not, write to the Free Software this program; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
*/
#include "make.h" #include "make.h"
#include "hash.h" #include "hash.h"
@@ -41,12 +40,8 @@ void *hash_deleted_item = &hash_deleted_item;
given size. */ given size. */
void void
hash_init (ht, size, hash_1, hash_2, hash_cmp) hash_init (struct hash_table *ht, unsigned long size,
struct hash_table* ht; hash_func_t hash_1, hash_func_t hash_2, hash_cmp_func_t hash_cmp)
unsigned long size;
hash_func_t hash_1;
hash_func_t hash_2;
hash_cmp_func_t hash_cmp;
{ {
ht->ht_size = round_up_2 (size); ht->ht_size = round_up_2 (size);
ht->ht_empty_slots = ht->ht_size; ht->ht_empty_slots = ht->ht_size;
@@ -71,11 +66,8 @@ hash_init (ht, size, hash_1, hash_2, hash_cmp)
/* Load an array of items into `ht'. */ /* Load an array of items into `ht'. */
void void
hash_load (ht, item_table, cardinality, size) hash_load (struct hash_table *ht, void *item_table,
struct hash_table* ht; unsigned long cardinality, unsigned long size)
void *item_table;
unsigned long cardinality;
unsigned long size;
{ {
char *items = (char *) item_table; char *items = (char *) item_table;
while (cardinality--) while (cardinality--)
@@ -91,9 +83,7 @@ hash_load (ht, item_table, cardinality, size)
ht_fill on insertion. */ ht_fill on insertion. */
void ** void **
hash_find_slot (ht, key) hash_find_slot (struct hash_table *ht, const void *key)
struct hash_table* ht;
void const *key;
{ {
void **slot; void **slot;
void **deleted_slot = 0; void **deleted_slot = 0;
@@ -128,32 +118,25 @@ hash_find_slot (ht, key)
} }
void * void *
hash_find_item (ht, key) hash_find_item (struct hash_table *ht, const void *key)
struct hash_table* ht;
void const *key;
{ {
void **slot = hash_find_slot (ht, key); void **slot = hash_find_slot (ht, key);
return ((HASH_VACANT (*slot)) ? 0 : *slot); return ((HASH_VACANT (*slot)) ? 0 : *slot);
} }
void * void *
hash_insert (ht, item) hash_insert (struct hash_table *ht, const void *item)
struct hash_table* ht;
void *item;
{ {
void **slot = hash_find_slot (ht, item); void **slot = hash_find_slot (ht, item);
void *old_item = slot ? *slot : 0; const void *old_item = slot ? *slot : 0;
hash_insert_at (ht, item, slot); hash_insert_at (ht, item, slot);
return ((HASH_VACANT (old_item)) ? 0 : old_item); return (void *)((HASH_VACANT (old_item)) ? 0 : old_item);
} }
void * void *
hash_insert_at (ht, item, slot) hash_insert_at (struct hash_table *ht, const void *item, const void *slot)
struct hash_table* ht;
void *item;
void const *slot;
{ {
void *old_item = *(void **) slot; const void *old_item = *(void **) slot;
if (HASH_VACANT (old_item)) if (HASH_VACANT (old_item))
{ {
ht->ht_fill++; ht->ht_fill++;
@@ -172,18 +155,14 @@ hash_insert_at (ht, item, slot)
} }
void * void *
hash_delete (ht, item) hash_delete (struct hash_table *ht, const void *item)
struct hash_table* ht;
void const *item;
{ {
void **slot = hash_find_slot (ht, item); void **slot = hash_find_slot (ht, item);
return hash_delete_at (ht, slot); return hash_delete_at (ht, slot);
} }
void * void *
hash_delete_at (ht, slot) hash_delete_at (struct hash_table *ht, const void *slot)
struct hash_table* ht;
void const *slot;
{ {
void *item = *(void **) slot; void *item = *(void **) slot;
if (!HASH_VACANT (item)) if (!HASH_VACANT (item))
@@ -197,8 +176,7 @@ hash_delete_at (ht, slot)
} }
void void
hash_free_items (ht) hash_free_items (struct hash_table *ht)
struct hash_table* ht;
{ {
void **vec = ht->ht_vec; void **vec = ht->ht_vec;
void **end = &vec[ht->ht_size]; void **end = &vec[ht->ht_size];
@@ -214,8 +192,7 @@ hash_free_items (ht)
} }
void void
hash_delete_items (ht) hash_delete_items (struct hash_table *ht)
struct hash_table* ht;
{ {
void **vec = ht->ht_vec; void **vec = ht->ht_vec;
void **end = &vec[ht->ht_size]; void **end = &vec[ht->ht_size];
@@ -229,9 +206,7 @@ hash_delete_items (ht)
} }
void void
hash_free (ht, free_items) hash_free (struct hash_table *ht, int free_items)
struct hash_table* ht;
int free_items;
{ {
if (free_items) if (free_items)
hash_free_items (ht); hash_free_items (ht);
@@ -246,9 +221,7 @@ hash_free (ht, free_items)
} }
void void
hash_map (ht, map) hash_map (struct hash_table *ht, hash_map_func_t map)
struct hash_table *ht;
hash_map_func_t map;
{ {
void **slot; void **slot;
void **end = &ht->ht_vec[ht->ht_size]; void **end = &ht->ht_vec[ht->ht_size];
@@ -261,10 +234,7 @@ hash_map (ht, map)
} }
void void
hash_map_arg (ht, map, arg) hash_map_arg (struct hash_table *ht, hash_map_arg_func_t map, void *arg)
struct hash_table *ht;
hash_map_arg_func_t map;
void *arg;
{ {
void **slot; void **slot;
void **end = &ht->ht_vec[ht->ht_size]; void **end = &ht->ht_vec[ht->ht_size];
@@ -279,8 +249,7 @@ hash_map_arg (ht, map, arg)
/* Double the size of the hash table in the event of overflow... */ /* Double the size of the hash table in the event of overflow... */
static void static void
hash_rehash (ht) hash_rehash (struct hash_table *ht)
struct hash_table* ht;
{ {
unsigned long old_ht_size = ht->ht_size; unsigned long old_ht_size = ht->ht_size;
void **old_vec = ht->ht_vec; void **old_vec = ht->ht_vec;
@@ -307,9 +276,7 @@ hash_rehash (ht)
} }
void void
hash_print_stats (ht, out_FILE) hash_print_stats (struct hash_table *ht, FILE *out_FILE)
struct hash_table *ht;
FILE *out_FILE;
{ {
/* GKM FIXME: honor NO_FLOAT */ /* GKM FIXME: honor NO_FLOAT */
fprintf (out_FILE, _("Load=%ld/%ld=%.0f%%, "), ht->ht_fill, ht->ht_size, fprintf (out_FILE, _("Load=%ld/%ld=%.0f%%, "), ht->ht_fill, ht->ht_size,
@@ -325,10 +292,7 @@ hash_print_stats (ht, out_FILE)
user-supplied vector, or malloc one. */ user-supplied vector, or malloc one. */
void ** void **
hash_dump (ht, vector_0, compare) hash_dump (struct hash_table *ht, void **vector_0, qsort_cmp_t compare)
struct hash_table *ht;
void **vector_0;
qsort_cmp_t compare;
{ {
void **vector; void **vector;
void **slot; void **slot;
@@ -351,8 +315,7 @@ hash_dump (ht, vector_0, compare)
/* Round a given number up to the nearest power of 2. */ /* Round a given number up to the nearest power of 2. */
static unsigned long static unsigned long
round_up_2 (n) round_up_2 (unsigned long n)
unsigned long n;
{ {
n |= (n >> 1); n |= (n >> 1);
n |= (n >> 2); n |= (n >> 2);

30
hash.h
View File

@@ -1,20 +1,20 @@
/* hash.h -- decls for hash table /* hash.h -- decls for hash table
Copyright (C) 1995, 1999, 2002 Free Software Foundation, Inc. Copyright (C) 1995, 1999, 2002 Free Software Foundation, Inc.
Written by Greg McGary <gkm@gnu.org> <greg@mcgary.org> Written by Greg McGary <gkm@gnu.org> <greg@mcgary.org>
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option) the Free Software Foundation; either version 2, or (at your option)
any later version. any later version.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License along with
along with this program; if not, write to the Free Software this program; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
#ifndef _hash_h_ #ifndef _hash_h_
#define _hash_h_ #define _hash_h_
@@ -63,8 +63,8 @@ void hash_load __P((struct hash_table *ht, void *item_table,
unsigned long cardinality, unsigned long size)); unsigned long cardinality, unsigned long size));
void **hash_find_slot __P((struct hash_table *ht, void const *key)); void **hash_find_slot __P((struct hash_table *ht, void const *key));
void *hash_find_item __P((struct hash_table *ht, void const *key)); void *hash_find_item __P((struct hash_table *ht, void const *key));
void *hash_insert __P((struct hash_table *ht, void *item)); void *hash_insert __P((struct hash_table *ht, const void *item));
void *hash_insert_at __P((struct hash_table *ht, void *item, void const *slot)); void *hash_insert_at __P((struct hash_table *ht, const void *item, void const *slot));
void *hash_delete __P((struct hash_table *ht, void const *item)); void *hash_delete __P((struct hash_table *ht, void const *item));
void *hash_delete_at __P((struct hash_table *ht, void const *slot)); void *hash_delete_at __P((struct hash_table *ht, void const *slot));
void hash_delete_items __P((struct hash_table *ht)); void hash_delete_items __P((struct hash_table *ht));

View File

@@ -1,30 +1,33 @@
/* Implicit rule searching for GNU Make. /* Implicit rule searching for GNU Make.
Copyright (C) 1988,89,90,91,92,93,94,97,2000 Free Software Foundation, Inc. Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
This file is part of GNU Make. This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify GNU Make is free software; you can redistribute it and/or modify it under the
it under the terms of the GNU General Public License as published by terms of the GNU General Public License as published by the Free Software
the Free Software Foundation; either version 2, or (at your option) Foundation; either version 2, or (at your option) any later version.
any later version.
GNU Make is distributed in the hope that it will be useful, GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
but WITHOUT ANY WARRANTY; without even the implied warranty of WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the A PARTICULAR PURPOSE. See the GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License along with
along with GNU Make; see the file COPYING. If not, write to GNU Make; see the file COPYING. If not, write to the Free Software
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
Boston, MA 02111-1307, USA. */
#include "make.h" #include "make.h"
#include "filedef.h"
#include "rule.h" #include "rule.h"
#include "dep.h" #include "dep.h"
#include "filedef.h"
#include "debug.h" #include "debug.h"
#include "variable.h"
#include "job.h" /* struct child, used inside commands.h */
#include "commands.h" /* set_file_variables */
static int pattern_search PARAMS ((struct file *file, int archive, unsigned int depth, static int
unsigned int recursions)); pattern_search PARAMS ((struct file *file, int archive,
unsigned int depth, unsigned int recursions));
/* For a FILE which has no commands specified, try to figure out some /* For a FILE which has no commands specified, try to figure out some
from the implicit pattern rules. from the implicit pattern rules.
@@ -33,9 +36,7 @@ static int pattern_search PARAMS ((struct file *file, int archive, unsigned int
or returns 0 if no implicit rule was found. */ or returns 0 if no implicit rule was found. */
int int
try_implicit_rule (file, depth) try_implicit_rule (struct file *file, unsigned int depth)
struct file *file;
unsigned int depth;
{ {
DBF (DB_IMPLICIT, _("Looking for an implicit rule for `%s'.\n")); DBF (DB_IMPLICIT, _("Looking for an implicit rule for `%s'.\n"));
@@ -63,6 +64,124 @@ try_implicit_rule (file, depth)
} }
/* Struct idep captures information about implicit prerequisites
that come from implicit rules. */
struct idep
{
struct idep *next; /* struct dep -compatible interface */
char *name; /* name of the prerequisite */
struct file *intermediate_file; /* intermediate file, 0 otherwise */
char *intermediate_pattern; /* pattern for intermediate file */
unsigned char had_stem; /* had % substituted with stem */
unsigned char ignore_mtime; /* ignore_mtime flag */
};
static void
free_idep_chain (struct idep *p)
{
struct idep *n;
for (; p != 0; p = n)
{
n = p->next;
if (p->name)
{
struct file *f = p->intermediate_file;
if (f != 0
&& (f->stem < f->name || f->stem > f->name + strlen (f->name)))
free (f->stem);
free (p->name);
}
free (p);
}
}
/* Scans the BUFFER for the next word with whitespace as a separator.
Returns the pointer to the beginning of the word. LENGTH hold the
length of the word. */
static char *
get_next_word (char *buffer, unsigned int *length)
{
char *p = buffer, *beg;
char c;
/* Skip any leading whitespace. */
while (isblank ((unsigned char)*p))
++p;
beg = p;
c = *(p++);
if (c == '\0')
return 0;
/* We already found the first value of "c", above. */
while (1)
{
char closeparen;
int count;
switch (c)
{
case '\0':
case ' ':
case '\t':
goto done_word;
case '$':
c = *(p++);
if (c == '$')
break;
/* This is a variable reference, so read it to the matching
close paren. */
if (c == '(')
closeparen = ')';
else if (c == '{')
closeparen = '}';
else
/* This is a single-letter variable reference. */
break;
for (count = 0; *p != '\0'; ++p)
{
if (*p == c)
++count;
else if (*p == closeparen && --count < 0)
{
++p;
break;
}
}
break;
case '|':
goto done;
default:
break;
}
c = *(p++);
}
done_word:
--p;
done:
if (length)
*length = p - beg;
return beg;
}
/* Search the pattern rules for a rule with an existing dependency to make /* Search the pattern rules for a rule with an existing dependency to make
FILE. If a rule is found, the appropriate commands and deps are put in FILE FILE. If a rule is found, the appropriate commands and deps are put in FILE
and 1 is returned. If not, 0 is returned. and 1 is returned. If not, 0 is returned.
@@ -78,11 +197,8 @@ try_implicit_rule (file, depth)
DEPTH is used for debugging messages. */ DEPTH is used for debugging messages. */
static int static int
pattern_search (file, archive, depth, recursions) pattern_search (struct file *file, int archive,
struct file *file; unsigned int depth, unsigned int recursions)
int archive;
unsigned int depth;
unsigned int recursions;
{ {
/* Filename we are searching for a rule for. */ /* Filename we are searching for a rule for. */
char *filename = archive ? strchr (file->name, '(') : file->name; char *filename = archive ? strchr (file->name, '(') : file->name;
@@ -98,18 +214,13 @@ pattern_search (file, archive, depth, recursions)
except during a recursive call. */ except during a recursive call. */
struct file *intermediate_file = 0; struct file *intermediate_file = 0;
/* List of dependencies found recursively. */ /* This linked list records all the prerequisites actually
struct file **intermediate_files found for a rule along with some other useful information
= (struct file **) xmalloc (max_pattern_deps * sizeof (struct file *)); (see struct idep for details). */
struct idep* deps = 0;
/* List of the patterns used to find intermediate files. */ /* 1 if we need to remove explicit prerequisites, 0 otherwise. */
char **intermediate_patterns unsigned int remove_explicit_deps = 0;
= (char **) alloca (max_pattern_deps * sizeof (char *));
/* This buffer records all the dependencies actually found for a rule. */
char **found_files = (char **) alloca (max_pattern_deps * sizeof (char *));
/* Number of dep names now in FOUND_FILES. */
unsigned int deps_found = 0;
/* Names of possible dependencies are constructed in this buffer. */ /* Names of possible dependencies are constructed in this buffer. */
register char *depname = (char *) alloca (namelen + max_pattern_dep_length); register char *depname = (char *) alloca (namelen + max_pattern_dep_length);
@@ -147,11 +258,17 @@ pattern_search (file, archive, depth, recursions)
that is not just `%'. */ that is not just `%'. */
int specific_rule_matched = 0; int specific_rule_matched = 0;
register unsigned int i = 0; /* uninit checks OK */ unsigned int i = 0; /* uninit checks OK */
register struct rule *rule; struct rule *rule;
register struct dep *dep; struct dep *dep, *expl_d;
char *p, *vp; char *p, *vname;
struct idep *d;
struct idep **id_ptr;
struct dep **d_ptr;
PATH_VAR (stem_str); /* @@ Need to get rid of stem, stemlen, etc. */
#ifndef NO_ARCHIVES #ifndef NO_ARCHIVES
if (archive || ar_name (filename)) if (archive || ar_name (filename))
@@ -227,17 +344,27 @@ pattern_search (file, archive, depth, recursions)
/* Set CHECK_LASTSLASH if FILENAME contains a directory /* Set CHECK_LASTSLASH if FILENAME contains a directory
prefix and the target pattern does not contain a slash. */ prefix and the target pattern does not contain a slash. */
check_lastslash = 0;
if (lastslash)
{
#ifdef VMS #ifdef VMS
check_lastslash = lastslash != 0 check_lastslash = (strchr (target, ']') == 0
&& ((strchr (target, ']') == 0) && strchr (target, ':') == 0);
&& (strchr (target, ':') == 0));
#else #else
check_lastslash = lastslash != 0 && strchr (target, '/') == 0; check_lastslash = strchr (target, '/') == 0;
#ifdef HAVE_DOS_PATHS
/* Didn't find it yet: check for DOS-type directories. */
if (check_lastslash)
{
char *b = strchr (target, '\\');
check_lastslash = !(b || (target[0] && target[1] == ':'));
}
#endif #endif
#endif
}
if (check_lastslash) if (check_lastslash)
{ {
/* In that case, don't include the /* If so, don't include the directory prefix in STEM here. */
directory prefix in STEM here. */
unsigned int difference = lastslash - filename + 1; unsigned int difference = lastslash - filename + 1;
if (difference > stemlen) if (difference > stemlen)
continue; continue;
@@ -298,19 +425,28 @@ pattern_search (file, archive, depth, recursions)
tryrules[i] = 0; tryrules[i] = 0;
} }
/* We are going to do second expansion so initialize file variables
for the rule. */
initialize_file_variables (file, 0);
/* Try each rule once without intermediate files, then once with them. */ /* Try each rule once without intermediate files, then once with them. */
for (intermed_ok = 0; intermed_ok == !!intermed_ok; ++intermed_ok) for (intermed_ok = 0; intermed_ok == !!intermed_ok; ++intermed_ok)
{ {
/* Try each pattern rule till we find one that applies. /* Try each pattern rule till we find one that applies.
If it does, copy the names of its dependencies (as substituted) If it does, expand its dependencies (as substituted)
and store them in FOUND_FILES. DEPS_FOUND is the number of them. */ and chain them in DEPS. */
for (i = 0; i < nrules; i++) for (i = 0; i < nrules; i++)
{ {
struct file *f;
unsigned int failed = 0;
int check_lastslash; int check_lastslash;
int file_variables_set = 0;
rule = tryrules[i]; rule = tryrules[i];
remove_explicit_deps = 0;
/* RULE is nil when we discover that a rule, /* RULE is nil when we discover that a rule,
already placed in TRYRULES, should not be applied. */ already placed in TRYRULES, should not be applied. */
if (rule == 0) if (rule == 0)
@@ -340,145 +476,301 @@ pattern_search (file, archive, depth, recursions)
DBS (DB_IMPLICIT, (_("Trying pattern rule with stem `%.*s'.\n"), DBS (DB_IMPLICIT, (_("Trying pattern rule with stem `%.*s'.\n"),
(int) stemlen, stem)); (int) stemlen, stem));
strncpy (stem_str, stem, stemlen);
stem_str[stemlen] = '\0';
/* Temporary assign STEM to file->stem (needed to set file
variables below). */
file->stem = stem_str;
/* Try each dependency; see if it "exists". */ /* Try each dependency; see if it "exists". */
deps_found = 0;
for (dep = rule->deps; dep != 0; dep = dep->next) for (dep = rule->deps; dep != 0; dep = dep->next)
{ {
/* If the dependency name has a %, substitute the stem. */ unsigned int len;
p = strchr (dep_name (dep), '%'); char *p2;
if (p != 0) unsigned int order_only = 0; /* Set if '|' was seen. */
{
register unsigned int i;
if (check_lastslash)
{
/* Copy directory name from the original FILENAME. */
i = lastslash - filename + 1;
bcopy (filename, depname, i);
}
else
i = 0;
bcopy (dep_name (dep), depname + i, p - dep_name (dep));
i += p - dep_name (dep);
bcopy (stem, depname + i, stemlen);
i += stemlen;
strcpy (depname + i, p + 1);
p = depname;
}
else
p = dep_name (dep);
/* P is now the actual dependency name as substituted. */ /* In an ideal world we would take the dependency line,
substitute the stem, re-expand the whole line and chop it
into individual prerequisites. Unfortunately this won't work
because of the "check_lastslash" twist. Instead, we will
have to go word by word, taking $()'s into account, for each
word we will substitute the stem, re-expand, chop it up, and,
if check_lastslash != 0, add the directory part to each
resulting prerequisite. */
if (file_impossible_p (p)) p = get_next_word (dep->name, &len);
{
/* If this dependency has already been ruled while (1)
"impossible", then the rule fails and don't {
bother trying it on the second pass either int add_dir = 0;
since we know that will fail too. */ int had_stem = 0;
DBS (DB_IMPLICIT,
(p == depname if (p == 0)
break; /* No more words */
/* Is there a pattern in this prerequisite? */
for (p2 = p; p2 < p + len && *p2 != '%'; ++p2)
;
if (dep->need_2nd_expansion)
{
/* If the dependency name has %, substitute the stem.
Watch out, we are going to do something tricky
here. If we just replace % with the stem value,
later, when we do the second expansion, we will
re-expand this stem value once again. This is not
good especially 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. */
if (p2 < p + len)
{
register unsigned int i = p2 - p;
bcopy (p, depname, i);
bcopy ("$*", depname + i, 2);
bcopy (p2 + 1, depname + i + 2, len - i - 1);
depname[len + 2 - 1] = '\0';
if (check_lastslash)
add_dir = 1;
had_stem = 1;
}
else
{
bcopy (p, depname, len);
depname[len] = '\0';
}
/* Set file variables. Note that we cannot do it once
at the beginning of the function because of the stem
value. */
if (!file_variables_set)
{
set_file_variables (file);
file_variables_set = 1;
}
p2 = variable_expand_for_file (depname, file);
}
else
{
if (p2 < p + len)
{
register unsigned int i = p2 - p;
bcopy (p, depname, i);
bcopy (stem_str, depname + i, stemlen);
bcopy (p2 + 1, depname + i + stemlen, len - i - 1);
depname[len + stemlen - 1] = '\0';
if (check_lastslash)
add_dir = 1;
had_stem = 1;
}
else
{
bcopy (p, depname, len);
depname[len] = '\0';
}
p2 = depname;
}
/* Parse the dependencies. */
while (1)
{
id_ptr = &deps;
for (; *id_ptr; id_ptr = &(*id_ptr)->next)
;
*id_ptr = (struct idep *)
multi_glob (
parse_file_seq (&p2,
order_only ? '\0' : '|',
sizeof (struct idep),
1), sizeof (struct idep));
/* @@ It would be nice to teach parse_file_seq or
multi_glob to add prefix. This would save us some
reallocations. */
if (order_only || add_dir || had_stem)
{
unsigned long l = lastslash - filename + 1;
for (d = *id_ptr; d != 0; d = d->next)
{
if (order_only)
d->ignore_mtime = 1;
if (add_dir)
{
char *p = d->name;
d->name = xmalloc (strlen (p) + l + 1);
bcopy (filename, d->name, l);
bcopy (p, d->name + l, strlen (p) + 1);
free (p);
}
if (had_stem)
d->had_stem = 1;
}
}
if (!order_only && *p2)
{
++p2;
order_only = 1;
continue;
}
break;
}
p += len;
p = get_next_word (p, &len);
}
}
/* Reset the stem in FILE. */
file->stem = 0;
/* @@ This loop can be combined with the previous one. I do
it separately for now for transparency.*/
for (d = deps; d != 0; d = d->next)
{
char *name = d->name;
if (file_impossible_p (name))
{
/* If this dependency has already been ruled "impossible",
then the rule fails and don't bother trying it on the
second pass either since we know that will fail too. */
DBS (DB_IMPLICIT,
(d->had_stem
? _("Rejecting impossible implicit prerequisite `%s'.\n") ? _("Rejecting impossible implicit prerequisite `%s'.\n")
: _("Rejecting impossible rule prerequisite `%s'.\n"), : _("Rejecting impossible rule prerequisite `%s'.\n"),
p)); name));
tryrules[i] = 0; tryrules[i] = 0;
break;
}
intermediate_files[deps_found] = 0; failed = 1;
break;
}
DBS (DB_IMPLICIT, DBS (DB_IMPLICIT,
(p == depname (d->had_stem
? _("Trying implicit prerequisite `%s'.\n") ? _("Trying implicit prerequisite `%s'.\n")
: _("Trying rule prerequisite `%s'.\n"), p)); : _("Trying rule prerequisite `%s'.\n"), name));
/* The DEP->changed flag says that this dependency resides in a /* If this prerequisite also happened to be explicitly mentioned
nonexistent directory. So we normally can skip looking for for FILE skip all the test below since it it has to be built
the file. However, if CHECK_LASTSLASH is set, then the anyway, no matter which implicit rule we choose. */
dependency file we are actually looking for is in a different
directory (the one gotten by prepending FILENAME's directory),
so it might actually exist. */
if (lookup_file (p) != 0 for (expl_d = file->deps; expl_d != 0; expl_d = expl_d->next)
|| ((!dep->changed || check_lastslash) && file_exists_p (p))) if (streq (dep_name (expl_d), name))
{ break;
found_files[deps_found++] = xstrdup (p); if (expl_d != 0)
continue; continue;
}
/* This code, given FILENAME = "lib/foo.o", dependency name
"lib/foo.c", and VPATH=src, searches for "src/lib/foo.c". */
vp = p;
if (vpath_search (&vp, (FILE_TIMESTAMP *) 0))
{
DBS (DB_IMPLICIT,
(_("Found prerequisite `%s' as VPATH `%s'\n"), p, vp));
strcpy (vp, p);
found_files[deps_found++] = vp;
continue;
}
/* We could not find the file in any place we should look. /* The DEP->changed flag says that this dependency resides in a
Try to make this dependency as an intermediate file, nonexistent directory. So we normally can skip looking for
but only on the second pass. */ the file. However, if CHECK_LASTSLASH is set, then the
dependency file we are actually looking for is in a different
directory (the one gotten by prepending FILENAME's directory),
so it might actually exist. */
if (intermed_ok) /* @@ dep->changed check is disabled. */
{ if (((f = lookup_file (name)) != 0 && f->is_target)
if (intermediate_file == 0) /*|| ((!dep->changed || check_lastslash) && */
intermediate_file || file_exists_p (name))
= (struct file *) alloca (sizeof (struct file)); continue;
DBS (DB_IMPLICIT, /* This code, given FILENAME = "lib/foo.o", dependency name
"lib/foo.c", and VPATH=src, searches for "src/lib/foo.c". */
vname = name;
if (vpath_search (&vname, (FILE_TIMESTAMP *) 0))
{
DBS (DB_IMPLICIT,
(_("Found prerequisite `%s' as VPATH `%s'\n"),
name,
vname));
free (vname);
continue;
}
/* We could not find the file in any place we should look. Try
to make this dependency as an intermediate file, but only on
the second pass. */
if (intermed_ok)
{
if (intermediate_file == 0)
intermediate_file
= (struct file *) alloca (sizeof (struct file));
DBS (DB_IMPLICIT,
(_("Looking for a rule with intermediate file `%s'.\n"), (_("Looking for a rule with intermediate file `%s'.\n"),
p)); name));
bzero ((char *) intermediate_file, sizeof (struct file)); bzero ((char *) intermediate_file, sizeof (struct file));
intermediate_file->name = p; intermediate_file->name = name;
if (pattern_search (intermediate_file, 0, depth + 1, if (pattern_search (intermediate_file,
recursions + 1)) 0,
{ depth + 1,
p = xstrdup (p); recursions + 1))
intermediate_patterns[deps_found] {
= intermediate_file->name; d->intermediate_file = intermediate_file;
intermediate_file->name = p; d->intermediate_pattern = intermediate_file->name;
intermediate_files[deps_found] = intermediate_file;
intermediate_file = 0;
/* Allocate an extra copy to go in FOUND_FILES,
because every elt of FOUND_FILES is consumed
or freed later. */
found_files[deps_found] = xstrdup (p);
++deps_found;
continue;
}
/* If we have tried to find P as an intermediate intermediate_file->name = xstrdup (name);
file and failed, mark that name as impossible intermediate_file = 0;
so we won't go through the search again later. */
file_impossible (p);
}
/* A dependency of this rule does not exist. continue;
Therefore, this rule fails. */ }
break;
}
/* This rule is no longer `in use' for recursive searches. */ /* If we have tried to find P as an intermediate
file and failed, mark that name as impossible
so we won't go through the search again later. */
if (intermediate_file->variables)
free_variable_set (intermediate_file->variables);
file_impossible (name);
}
/* A dependency of this rule does not exist. Therefore,
this rule fails. */
failed = 1;
break;
}
/* This rule is no longer `in use' for recursive searches. */
rule->in_use = 0; rule->in_use = 0;
if (dep != 0) if (failed)
{ {
/* This pattern rule does not apply. /* This pattern rule does not apply. If some of its
If some of its dependencies succeeded, dependencies succeeded, free the data structure
free the data structure describing them. */ describing them. */
while (deps_found-- > 0) free_idep_chain (deps);
{ deps = 0;
register struct file *f = intermediate_files[deps_found]; }
free (found_files[deps_found]);
if (f != 0
&& (f->stem < f->name
|| f->stem > f->name + strlen (f->name)))
free (f->stem);
}
}
else else
/* This pattern rule does apply. Stop looking for one. */ /* This pattern rule does apply. Stop looking for one. */
break; break;
@@ -510,11 +802,29 @@ pattern_search (file, archive, depth, recursions)
This includes the intermediate files, if any. This includes the intermediate files, if any.
Convert them into entries on the deps-chain of FILE. */ Convert them into entries on the deps-chain of FILE. */
while (deps_found-- > 0) if (remove_explicit_deps)
{
/* Remove all the dependencies that didn't come from
this implicit rule. */
dep = file->deps;
while (dep != 0)
{
struct dep *next = dep->next;
free_dep (dep);
dep = next;
}
file->deps = 0;
}
expl_d = file->deps; /* We will add them at the end. */
d_ptr = &file->deps;
for (d = deps; d != 0; d = d->next)
{ {
register char *s; register char *s;
if (intermediate_files[deps_found] != 0) if (d->intermediate_file != 0)
{ {
/* If we need to use an intermediate file, /* If we need to use an intermediate file,
make sure it is entered as a target, with the info that was make sure it is entered as a target, with the info that was
@@ -523,15 +833,30 @@ pattern_search (file, archive, depth, recursions)
a target; therefore we can assume that the deps and cmds a target; therefore we can assume that the deps and cmds
of F below are null before we change them. */ of F below are null before we change them. */
struct file *imf = intermediate_files[deps_found]; struct file *imf = d->intermediate_file;
register struct file *f = enter_file (imf->name); register struct file *f = lookup_file (imf->name);
/* We don't want to delete an intermediate file that happened
to be a prerequisite of some (other) target. Mark it as
precious. */
if (f != 0)
f->precious = 1;
else
f = enter_file (imf->name);
f->deps = imf->deps; f->deps = imf->deps;
f->cmds = imf->cmds; f->cmds = imf->cmds;
f->stem = imf->stem; f->stem = imf->stem;
f->also_make = imf->also_make; f->also_make = imf->also_make;
imf = lookup_file (intermediate_patterns[deps_found]); f->is_target = 1;
if (imf != 0 && imf->precious)
f->precious = 1; if (!f->precious)
{
imf = lookup_file (d->intermediate_pattern);
if (imf != 0 && imf->precious)
f->precious = 1;
}
f->intermediate = 1; f->intermediate = 1;
f->tried_implicit = 1; f->tried_implicit = 1;
for (dep = f->deps; dep != 0; dep = dep->next) for (dep = f->deps; dep != 0; dep = dep->next)
@@ -545,12 +870,12 @@ pattern_search (file, archive, depth, recursions)
} }
} }
dep = (struct dep *) xmalloc (sizeof (struct dep)); dep = alloc_dep ();
dep->ignore_mtime = 0; dep->ignore_mtime = d->ignore_mtime;
s = found_files[deps_found]; s = d->name; /* Hijacking the name. */
d->name = 0;
if (recursions == 0) if (recursions == 0)
{ {
dep->name = 0;
dep->file = lookup_file (s); dep->file = lookup_file (s);
if (dep->file == 0) if (dep->file == 0)
/* enter_file consumes S's storage. */ /* enter_file consumes S's storage. */
@@ -563,10 +888,9 @@ pattern_search (file, archive, depth, recursions)
else else
{ {
dep->name = s; dep->name = s;
dep->file = 0;
dep->changed = 0;
} }
if (intermediate_files[deps_found] == 0 && tryrules[foundrule]->terminal)
if (d->intermediate_file == 0 && tryrules[foundrule]->terminal)
{ {
/* If the file actually existed (was not an intermediate file), /* If the file actually existed (was not an intermediate file),
and the rule that found it was a terminal one, then we want and the rule that found it was a terminal one, then we want
@@ -578,10 +902,13 @@ pattern_search (file, archive, depth, recursions)
else else
dep->file->tried_implicit = 1; dep->file->tried_implicit = 1;
} }
dep->next = file->deps;
file->deps = dep; *d_ptr = dep;
d_ptr = &dep->next;
} }
*d_ptr = expl_d;
if (!checked_lastslash[foundrule]) if (!checked_lastslash[foundrule])
{ {
/* Always allocate new storage, since STEM might be /* Always allocate new storage, since STEM might be
@@ -603,6 +930,14 @@ pattern_search (file, archive, depth, recursions)
} }
file->cmds = rule->cmds; file->cmds = rule->cmds;
file->is_target = 1;
/* Set precious flag. */
{
struct file *f = lookup_file (rule->targets[matches[foundrule]]);
if (f && f->precious)
file->precious = 1;
}
/* If this rule builds other targets, too, put the others into FILE's /* If this rule builds other targets, too, put the others into FILE's
`also_make' member. */ `also_make' member. */
@@ -611,9 +946,10 @@ pattern_search (file, archive, depth, recursions)
for (i = 0; rule->targets[i] != 0; ++i) for (i = 0; rule->targets[i] != 0; ++i)
if (i != matches[foundrule]) if (i != matches[foundrule])
{ {
struct dep *new = (struct dep *) xmalloc (sizeof (struct dep)); struct file *f;
struct dep *new = alloc_dep ();
/* GKM FIMXE: handle '|' here too */ /* GKM FIMXE: handle '|' here too */
new->ignore_mtime = 0;
new->name = p = (char *) xmalloc (rule->lens[i] + fullstemlen + 1); new->name = p = (char *) xmalloc (rule->lens[i] + fullstemlen + 1);
bcopy (rule->targets[i], p, bcopy (rule->targets[i], p,
rule->suffixes[i] - rule->targets[i] - 1); rule->suffixes[i] - rule->targets[i] - 1);
@@ -624,11 +960,22 @@ pattern_search (file, archive, depth, recursions)
rule->lens[i] - (rule->suffixes[i] - rule->targets[i]) + 1); rule->lens[i] - (rule->suffixes[i] - rule->targets[i]) + 1);
new->file = enter_file (new->name); new->file = enter_file (new->name);
new->next = file->also_make; new->next = file->also_make;
/* Set precious flag. */
f = lookup_file (rule->targets[i]);
if (f && f->precious)
new->file->precious = 1;
/* Set the is_target flag so that this file is not treated
as intermediate by the pattern rule search algorithm and
file_exists_p cannot pick it up yet. */
new->file->is_target = 1;
file->also_make = new; file->also_make = new;
} }
done: done:
free (intermediate_files); free_idep_chain (deps);
free (tryrules); free (tryrules);
return rule != 0; return rule != 0;

1780
job.c

File diff suppressed because it is too large Load Diff

48
job.h
View File

@@ -1,25 +1,40 @@
/* Definitions for managing subprocesses in GNU Make. /* Definitions for managing subprocesses in GNU Make.
Copyright (C) 1992, 1993, 1996, 1999 Free Software Foundation, Inc. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Make. This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify GNU Make is free software; you can redistribute it and/or modify it under the
it under the terms of the GNU General Public License as published by terms of the GNU General Public License as published by the Free Software
the Free Software Foundation; either version 2, or (at your option) Foundation; either version 2, or (at your option) any later version.
any later version.
GNU Make is distributed in the hope that it will be useful, GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
but WITHOUT ANY WARRANTY; without even the implied warranty of WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the A PARTICULAR PURPOSE. See the GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License along with
along with GNU Make; see the file COPYING. If not, write to GNU Make; see the file COPYING. If not, write to the Free Software
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
Boston, MA 02111-1307, USA. */
#ifndef SEEN_JOB_H #ifndef SEEN_JOB_H
#define SEEN_JOB_H #define SEEN_JOB_H
#ifdef HAVE_FCNTL_H
# include <fcntl.h>
#else
# include <sys/file.h>
#endif
/* How to set close-on-exec for a file descriptor. */
#if !defined F_SETFD
# define CLOSE_ON_EXEC(_d)
#else
# ifndef FD_CLOEXEC
# define FD_CLOEXEC 1
# endif
# define CLOSE_ON_EXEC(_d) (void) fcntl ((_d), F_SETFD, FD_CLOEXEC)
#endif
/* Structure describing a running or dead child process. */ /* Structure describing a running or dead child process. */
struct child struct child
@@ -46,6 +61,7 @@ struct child
unsigned int good_stdin:1; /* Nonzero if this child has a good stdin. */ unsigned int good_stdin:1; /* Nonzero if this child has a good stdin. */
unsigned int deleted:1; /* Nonzero if targets have been deleted. */ unsigned int deleted:1; /* Nonzero if targets have been deleted. */
unsigned int dontcare:1; /* Saved dontcare flag. */
}; };
extern struct child *children; extern struct child *children;
@@ -57,11 +73,15 @@ extern void start_waiting_jobs PARAMS ((void));
extern char **construct_command_argv PARAMS ((char *line, char **restp, struct file *file, char** batch_file)); extern char **construct_command_argv PARAMS ((char *line, char **restp, struct file *file, char** batch_file));
#ifdef VMS #ifdef VMS
extern int child_execute_job PARAMS ((char *argv, struct child *child)); extern int child_execute_job PARAMS ((char *argv, struct child *child));
#elif defined(__EMX__)
extern int child_execute_job PARAMS ((int stdin_fd, int stdout_fd, char **argv, char **envp));
#else #else
extern void child_execute_job PARAMS ((int stdin_fd, int stdout_fd, char **argv, char **envp)); extern void child_execute_job PARAMS ((int stdin_fd, int stdout_fd, char **argv, char **envp));
#endif #endif
#ifdef _AMIGA #ifdef _AMIGA
extern void exec_command PARAMS ((char **argv)); extern void exec_command PARAMS ((char **argv));
#elif defined(__EMX__)
extern int exec_command PARAMS ((char **argv, char **envp));
#else #else
extern void exec_command PARAMS ((char **argv, char **envp)); extern void exec_command PARAMS ((char **argv, char **envp));
#endif #endif
@@ -80,4 +100,6 @@ extern int fatal_signal_mask;
#endif #endif
#endif #endif
extern unsigned int jobserver_tokens;
#endif /* SEEN_JOB_H */ #endif /* SEEN_JOB_H */

View File

@@ -1,31 +0,0 @@
extern volatile void exit (int);
extern double load_average (void);
double max_load_average = -1;
unsigned int job_slots_used = 0;
int
main ()
{
printf ("load_average () = %.2f\n", load_average ());
exit (0);
}
void
error (char *fmt, ...)
{
exit (1);
}
void
perror_with_name (char *a, char *b)
{
exit (1);
}
void
wait_for_children (int i)
{
return;
}

782
main.c

File diff suppressed because it is too large Load Diff

View File

@@ -1,23 +1,20 @@
# Maintainer-only makefile segment. This contains things that are relevant # Maintainer-only makefile segment. This contains things that are relevant
# only if you have the full copy of the GNU make sources from the CVS # only if you have the full copy of the GNU make sources from the CVS
# tree, not a dist copy. # tree, not a dist copy.
#
# We like mondo-warnings!
AM_CFLAGS += -Wall -W
# Find the glob source files... this might be dangerous, but we're maintainers! # Find the glob source files... this might be dangerous, but we're maintainers!
#
globsrc := $(wildcard glob/*.c) globsrc := $(wildcard glob/*.c)
globhdr := $(wildcard glob/*.h) globhdr := $(wildcard glob/*.h)
TEMPLATES = README README.DOS README.W32 \ TEMPLATES = README README.DOS README.W32 README.OS2 \
config.ami configh.dos config.h.W32 config.h-vms config.ami configh.dos config.h.W32 config.h-vms
MTEMPLATES = Makefile.DOS SMakefile MTEMPLATES = Makefile.DOS SMakefile
all-am: $(TEMPLATES) $(MTEMPLATES) build.sh.in # These are built as a side-effect of the dist rule
#all-am: $(TEMPLATES) $(MTEMPLATES) build.sh.in
# We need this to ensure that README and build.sh.in are created on time to
# avoid errors by automake.
#
#Makefile.in: README build.sh.in
# General rule for turning a .template into a regular file. # General rule for turning a .template into a regular file.
# #
@@ -54,8 +51,8 @@ NMakefile: NMakefile.template .dep_segment Makefile
# #
build.sh.in: build.template Makefile build.sh.in: build.template Makefile
rm -f $@ rm -f $@
sed -e 's@%objs%@$(filter-out remote-%,$(make_OBJECTS)@g' \ sed -e 's@%objs%@$(patsubst %.o,%.$${OBJEXT},$(filter-out remote-%,$(make_OBJECTS)))@g' \
-e 's@%globobjs%@$(patsubst %.c,%.o,$(globsrc)))@g' \ -e 's@%globobjs%@$(patsubst %.c,%.$${OBJEXT},$(globsrc))@g' \
$< > $@ $< > $@
chmod a-w+x $@ chmod a-w+x $@
@@ -66,33 +63,44 @@ build.sh.in: build.template Makefile
# Automake used to have a --generate-deps flag, but it's gone now, so we have # Automake used to have a --generate-deps flag, but it's gone now, so we have
# to do it ourselves. # to do it ourselves.
# #
DEP_FILES := $(wildcard $(DEPDIR)/*.Po)
.dep_segment: Makefile.am maintMakefile $(DEP_FILES) .dep_segment: Makefile.am maintMakefile $(DEP_FILES)
cat $(DEP_FILES) \ rm -f $@
| sed -e '/^[^:]*\.[ch] *:/d' \ (for f in $(DEPDIR)/*.Po; do \
echo ""; \
echo "# $$f"; \
sed -e '/^[^:]*\.[ch] *:/d' \
-e 's, /usr/[^ ]*,,g' \ -e 's, /usr/[^ ]*,,g' \
-e 's, $(srcdir)/, ,g' \ -e 's, $(srcdir)/, ,g' \
-e '/^ \\$$/d' \ -e '/^ *\\$$/d' \
> $@ -e '/^ *$$/d' \
< $$f; \
done) > $@
# Get rid of everything "else". # Get rid of everything "else".
# #
maintFILES = configure aclocal.m4 config.h.in Makefile.in stamp-h.in maintFILES = configure aclocal.m4 config.h.in Makefile.in stamp-h.in
CVS-CLEAN-FILES += $(maintFILES) $(TEMPLATES) $(MTEMPLATES) NMakefile \ CVS-CLEAN-FILES += $(maintFILES) $(TEMPLATES) $(MTEMPLATES) NMakefile \
missing build.sh.in .dep_segment build.sh.in .deps .dep_segment ABOUT-NLS \
ansi2knr.*
# This rule tries to clean the tree right down to how it looks when you do a # This rule tries to clean the tree right down to how it looks when you do a
# virgin CVS checkout. # virgin CVS checkout.
# This is potentially dangerous since it removes _ANY FILE_ that is not in
# CVS. Including files you might mean to add to CVS but haven't yet...
# I only use this in subdirectories where it's unlikely we have any new
# files. Stil...
cvsclean = perl -e '$$k{CVS} = 1; open(E,"< CVS/Entries") || die "CVS/Entries: $$!\n"; while (defined ($$_ = <E>)) { m%^/([^/]*)% or next; $$k{$$1} = 1; } close(E) || die "CVS/Entries: $$!\n"; opendir(D, ".") || die ".: $$!\n"; while (defined ($$_ = readdir(D))) { -f $$_ && ! exists $$k{$$_} && unlink($$_); } closedir(D) || die ".: $$!\n";'
.PHONY: cvs-clean .PHONY: cvs-clean
cvs-clean: maintainer-clean cvs-clean: maintainer-clean
-rm -f *~ -rm -rf *~ $(CVS-CLEAN-FILES)
-rm -f config/*~ config/Makefile.in config/[a-z]* -cd config && $(cvsclean)
-rm -f po/*~ po/Makefile.in.in po/Rules-quot po/[a-z]* -cd po && $(cvsclean)
-rm -f doc/*~ doc/Makefile.in doc/fdl.texi doc/make-stds.texi \ -cd doc && $(cvsclean)
doc/texinfo.tex -cd glob && $(cvsclean)
-rm -f glob/*~ glob/Makefile.in
-rm -f ABOUT-NLS $(CVS-CLEAN-FILES)
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
@@ -105,7 +113,7 @@ cvs-clean: maintainer-clean
## Updating files. ## ## Updating files. ##
## ---------------- ## ## ---------------- ##
WGET = wget --passive-ftp --non-verbose WGET = wget --passive-ftp -nv
ftp-gnu = ftp://ftp.gnu.org/gnu ftp-gnu = ftp://ftp.gnu.org/gnu
move_if_change = if test -r $(target) && cmp -s $(target).t $(target); then \ move_if_change = if test -r $(target) && cmp -s $(target).t $(target); then \
@@ -118,14 +126,20 @@ move_if_change = if test -r $(target) && cmp -s $(target).t $(target); then \
# Updating PO files. # # Updating PO files. #
# ------------------- # # ------------------- #
po_repo = http://www.iro.umontreal.ca/contrib/po/maint/$(PACKAGE) # PO archive mirrors --- Be careful; some might not be fully populated!
# ftp://ftp.unex.es/pub/gnu-i18n/po/maint/
# http://translation.sf.net/maint/
# ftp://tiger.informatik.hu-berlin.de/pub/po/maint/
po_repo = http://www.iro.umontreal.ca/translation/maint/$(PACKAGE)
.PHONY: do-po-update po-update .PHONY: do-po-update po-update
do-po-update: do-po-update:
tmppo=/tmp/$(PACKAGE)-$(VERSION)-po &&\ tmppo="/tmp/po-$(PACKAGE)-$(VERSION).$$$$" \
rm -rf $$tmppo && \ && rm -rf "$$tmppo" \
mkdir $$tmppo && \ && mkdir "$$tmppo" \
(cd $$tmppo && $(WGET) -r -l1 -nd --no-parent -A '*.po' $(po_repo)) &&\ && (cd "$$tmppo" \
cp $$tmppo/*.po po && $(WGET) -r -l1 -nd --no-parent -A '*.po' $(po_repo)) \
&& cp "$$tmppo"/*.po po && rm -rf "$$tmppo"
cd po && $(MAKE) update-po cd po && $(MAKE) update-po
$(MAKE) po-check $(MAKE) po-check
@@ -135,58 +149,36 @@ po-update:
fi fi
# -------------------------- # # -------------------------- #
# Updating GNU build tools. # # Updating GNU build files. #
# -------------------------- # # -------------------------- #
# The following pseudo table associates a local directory and a URL # The following pseudo table associates a local directory and a URL
# with each of the files that belongs to some other package and is # with each of the files that belongs to some other package and is
# regularly updated from the specified URL. # regularly updated from the specified URL.
# $(srcdir)/src/ansi2knr.c
wget_files ?= $(srcdir)/config/config.guess $(srcdir)/config/config.sub \
$(srcdir)/doc/texinfo.tex $(srcdir)/doc/make-stds.texi \
$(srcdir)/doc/fdl.texi
wget-targets = $(patsubst %, get-%, $(wget_files))
config.guess-url_prefix = $(ftp-gnu)/config/
config.sub-url_prefix = $(ftp-gnu)/config/
ansi2knr.c-url_prefix = ftp://ftp.cs.wisc.edu/ghost/
texinfo.tex-url_prefix = $(ftp-gnu)/texinfo/
standards.texi-url_prefix = $(ftp-gnu)/GNUinfo/
make-stds.texi-url_prefix = $(ftp-gnu)/GNUinfo/
fdl.texi-url_prefix = $(ftp-gnu)/GNUinfo/
savannah-url = http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~
target = $(patsubst get-%,%,$@) target = $(patsubst get-%,%,$@)
url = $($(notdir $(target))-url_prefix)$(notdir $(target))
.PHONY: $(wget-targets) config-url = $(savannah-url)/config/config/$(patsubst get-config/%,%,$@)
$(wget-targets): get-config/config.guess get-config/config.sub:
@echo $(WGET) $(url) -O $(target) \ @echo $(WGET) $(config-url) -O $(target) \
&& $(WGET) $(url) -O $(target).t \ && $(WGET) $(config-url) -O $(target).t \
&& $(move_if_change) && $(move_if_change)
.PHONY: wget-update gnulib-url = $(savannah-url)/gnulib/gnulib/build-aux/$(patsubst get-config/%,%,$@)
wget-update: $(wget-targets) get-config/texinfo.tex:
@echo $(WGET) $(gnulib-url) -O $(target) \
&& $(WGET) $(gnulib-url) -O $(target).t \
&& $(move_if_change)
gnustandards-url = $(savannah-url)/gnustandards/gnustandards/$(patsubst get-doc/%,%,$@)
# Updating tools via CVS. get-doc/make-stds.texi get-doc/fdl.texi:
cvs_files ?= depcomp missing @echo $(WGET) $(gnustandards-url) -O $(target) \
cvs-targets = $(patsubst %, get-%, $(cvs_files)) && $(WGET) $(gnustandards-url) -O $(target).t \
&& $(move_if_change)
automake_repo = :pserver:anoncvs@anoncvs.cygnus.com:/cvs/automake
.PHONY: $(cvs-targets)
$(cvs-targets):
$(CVS) -d $(automake_repo) co -p automake/lib/$(notdir $(target)) \
>$(target).t \
&& $(move_if_change)
.PHONY: cvs-update .PHONY: cvs-update
cvs-update: $(cvs-targets) cvs-update: get-config/texinfo.tex get-config/config.guess get-config/config.sub get-doc/make-stds.texi get-doc/fdl.texi
# --------------------- # # --------------------- #
@@ -194,9 +186,7 @@ cvs-update: $(cvs-targets)
# --------------------- # # --------------------- #
.PHONY: update .PHONY: update
update: wget-update po-update update: po-update cvs-update
# cvs-update
## --------------- ## ## --------------- ##
@@ -218,10 +208,67 @@ changelog-check:
fi fi
# Verify that all source files using _() are listed in po/POTFILES.in. # Verify that all source files using _() are listed in po/POTFILES.in.
# Ignore make.h; it defines _().
po-check: po-check:
if test -f po/POTFILES.in; then \ if test -f po/POTFILES.in; then \
grep -E -v '^(#|$$)' po/POTFILES.in | sort > $@-1; \ grep -E -v '^(#|$$)' po/POTFILES.in | sort > $@-1; \
grep -E -l '\b_\(' *.c | sort > $@-2; \ grep -E -l '\b_\(' *.c *.h | grep -v make.h | sort > $@-2; \
diff -u $@-1 $@-2 || exit 1; \ diff -u $@-1 $@-2 || exit 1; \
rm -f $@-1 $@-2; \ rm -f $@-1 $@-2; \
fi fi
## ------------------------- ##
## GNU FTP upload artifacts. ##
## ------------------------- ##
# This target creates the upload artifacts.
# Sign it with my key.
GPG = gpg
GPGFLAGS = -u 6338B6D4
DIST_ARCHIVES_SIG = $(addsuffix .sig,$(DIST_ARCHIVES))
DIST_ARCHIVES_DIRECTIVE = $(addsuffix .directive.asc,$(DIST_ARCHIVES))
.PHONY: distsign
distsign: $(DIST_ARCHIVES_SIG) $(DIST_ARCHIVES_DIRECTIVE)
$(DIST_ARCHIVES_DIRECTIVE): .directive.asc
cp $< $@
%.sig : %
@echo "Signing file '$<':"
$(GPG) $(GPGFLAGS) -o $@ -b $<
.directive.asc:
@echo "Creating directive file '$@':"
@echo 'directory: make' > .directive
$(GPG) $(GPGFLAGS) -o $@ --clearsign .directive
@rm -f .directive
# Upload the artifacts
FTPPUT = ncftpput
gnu-url = ftp-upload.gnu.org /incoming
UPLOADS = upload-alpha upload-ftp
.PHONY: $(UPLOADS)
$(UPLOADS): $(DIST_ARCHIVES) $(DIST_ARCHIVES_SIG) $(DIST_ARCHIVES_DIRECTIVE)
$(FTPPUT) $(gnu-url)/$(@:upload-%=%) $^
# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
# Free Software Foundation, Inc.
# This file is part of GNU Make.
#
# GNU Make is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2, or (at your option) any later version.
#
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# GNU Make; see the file COPYING. If not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

144
make.1
View File

@@ -1,4 +1,4 @@
.TH MAKE 1L "22 August 1989" "GNU" "LOCAL USER COMMANDS" .TH MAKE 1 "22 August 1989" "GNU" "LOCAL USER COMMANDS"
.SH NAME .SH NAME
make \- GNU make utility to maintain groups of programs make \- GNU make utility to maintain groups of programs
.SH SYNOPSIS .SH SYNOPSIS
@@ -6,16 +6,15 @@ make \- GNU make utility to maintain groups of programs
[ [
.B \-f .B \-f
.I makefile .I makefile
] [ option ] ... ] [ options ] ... [ targets ] ...
target ...
.SH WARNING .SH WARNING
This man page is an extract of the documentation of This man page is an extract of the documentation of GNU
.I GNU make . .IR make .
It is updated only occasionally, because the GNU project does not use nroff. It is updated only occasionally, because the GNU project does not use nroff.
For complete, current documentation, refer to the Info file For complete, current documentation, refer to the Info file
.B make.info .B make.info
which is made from the Texinfo source file which is made from the Texinfo source file
.BR make.texinfo . .BR make.texi .
.SH DESCRIPTION .SH DESCRIPTION
.LP .LP
The purpose of the The purpose of the
@@ -25,7 +24,8 @@ pieces of a large program need to be recompiled, and issue the commands to
recompile them. recompile them.
The manual describes the GNU implementation of The manual describes the GNU implementation of
.IR make , .IR make ,
which was written by Richard Stallman and Roland McGrath. which was written by Richard Stallman and Roland McGrath, and is
currently maintained by Paul Smith.
Our examples show C programs, since they are most common, but you can use Our examples show C programs, since they are most common, but you can use
.I make .I make
with any programming language whose compiler can be run with a with any programming language whose compiler can be run with a
@@ -106,13 +106,14 @@ or if the target does not exist.
.SH OPTIONS .SH OPTIONS
.sp 1 .sp 1
.TP 0.5i .TP 0.5i
.B \-b .BR \-b , " \-m"
.TP 0.5i
.B \-m
These options are ignored for compatibility with other versions of These options are ignored for compatibility with other versions of
.IR make . .IR make .
.TP 0.5i .TP 0.5i
.BI "\-C " dir .BR \-B , " \-\-always\-make"
Unconditionally make all targets.
.TP 0.5i
\fB\-C\fR \fIdir\fR, \fB\-\-directory\fR=\fIdir\fR
Change to directory Change to directory
.I dir .I dir
before reading the makefiles or doing anything else. before reading the makefiles or doing anything else.
@@ -136,19 +137,42 @@ considered and which are applied---everything interesting about how
.I make .I make
decides what to do. decides what to do.
.TP 0.5i .TP 0.5i
.B \-e .BI \-\-debug "[=FLAGS]"
Print debugging information in addition to normal processing.
If the
.I FLAGS
are omitted, then the behavior is the same as if
.B \-d
was specified.
.I FLAGS
may be
.I a
for all debugging output (same as using
.BR \-d ),
.I b
for basic debugging,
.I v
for more verbose basic debugging,
.I i
for showing implicit rules,
.I j
for details on invocation of commands, and
.I m
for debugging while remaking makefiles.
.TP 0.5i
.BR \-e , " \-\-environment\-overrides"
Give variables taken from the environment precedence Give variables taken from the environment precedence
over variables from makefiles. over variables from makefiles.
.TP 0.5i .TP 0.5i
.BI "\-f " file +\fB\-f\fR \fIfile\fR, \fB\-\-file\fR=\fIfile\fR, \fB\-\-makefile\fR=\fIFILE\fR
Use Use
.I file .I file
as a makefile. as a makefile.
.TP 0.5i .TP 0.5i
.B \-i .BR \-i , " \-\-ignore\-errors"
Ignore all errors in commands executed to remake files. Ignore all errors in commands executed to remake files.
.TP 0.5i .TP 0.5i
.BI "\-I " dir \fB\-I\fR \fIdir\fR, \fB\-\-include\-dir\fR=\fIdir\fR
Specifies a directory Specifies a directory
.I dir .I dir
to search for included makefiles. to search for included makefiles.
@@ -169,8 +193,10 @@ preprocessor's
.B \-I .B \-I
flag. flag.
.TP 0.5i .TP 0.5i
.BI "\-j " jobs \fB\-j\fR [\fIjobs\fR], \fB\-\-jobs\fR[=\fIjobs\fR]
Specifies the number of jobs (commands) to run simultaneously. Specifies the number of
.I jobs
(commands) to run simultaneously.
If there is more than one If there is more than one
.B \-j .B \-j
option, the last one is effective. option, the last one is effective.
@@ -180,25 +206,26 @@ option is given without an argument,
.IR make .IR make
will not limit the number of jobs that can run simultaneously. will not limit the number of jobs that can run simultaneously.
.TP 0.5i .TP 0.5i
.B \-k .BR \-k , " \-\-keep\-going"
Continue as much as possible after an error. Continue as much as possible after an error.
While the target that failed, and those that depend on it, cannot While the target that failed, and those that depend on it, cannot
be remade, the other dependencies of these targets can be processed be remade, the other dependencies of these targets can be processed
all the same. all the same.
.TP 0.5i .TP 0.5i
.B \-l \fB\-l\fR [\fIload\fR], \fB\-\-load\-average\fR[=\fIload\fR]
.TP 0.5i
.BI "\-l " load
Specifies that no new jobs (commands) should be started if there are Specifies that no new jobs (commands) should be started if there are
others jobs running and the load average is at least others jobs running and the load average is at least
.I load .I load
(a floating-point number). (a floating-point number).
With no argument, removes a previous load limit. With no argument, removes a previous load limit.
.TP 0.5i .TP 0.5i
.B \-n .BR \-L , " \-\-check\-symlink\-times"
Use the latest mtime between symlinks and target.
.TP 0.5i
.BR \-n , " \-\-just\-print" , " \-\-dry\-run" , " \-\-recon"
Print the commands that would be executed, but do not execute them. Print the commands that would be executed, but do not execute them.
.TP 0.5i .TP 0.5i
.BI "\-o " file \fB\-o\fR \fIfile\fR, \fB\-\-old\-file\fR=\fIfile\fR, \fB\-\-assume\-old\fR=\fIfile\fR
Do not remake the file Do not remake the file
.I file .I file
even if it is older than its dependencies, and do not remake anything even if it is older than its dependencies, and do not remake anything
@@ -206,7 +233,7 @@ on account of changes in
.IR file . .IR file .
Essentially the file is treated as very old and its rules are ignored. Essentially the file is treated as very old and its rules are ignored.
.TP 0.5i .TP 0.5i
.B \-p .BR \-p , " \-\-print\-data\-base"
Print the data base (rules and variable values) that results from Print the data base (rules and variable values) that results from
reading the makefiles; then execute as usual or as otherwise reading the makefiles; then execute as usual or as otherwise
specified. specified.
@@ -218,20 +245,23 @@ To print the data base without trying to remake any files, use
.B \-p .B \-p
.BI \-f /dev/null. .BI \-f /dev/null.
.TP 0.5i .TP 0.5i
.B \-q .BR \-q , " \-\-question"
``Question mode''. ``Question mode''.
Do not run any commands, or print anything; just return an exit status Do not run any commands, or print anything; just return an exit status
that is zero if the specified targets are already up to date, nonzero that is zero if the specified targets are already up to date, nonzero
otherwise. otherwise.
.TP 0.5i .TP 0.5i
.B \-r .BR \-r , " \-\-no\-builtin\-rules"
Eliminate use of the built-in implicit rules. Eliminate use of the built\-in implicit rules.
Also clear out the default list of suffixes for suffix rules. Also clear out the default list of suffixes for suffix rules.
.TP 0.5i .TP 0.5i
.B \-s .BR \-R , " \-\-no\-builtin\-variables"
Don't define any built\-in variables.
.TP 0.5i
.BR \-s , " \-\-silent" , " \-\-quiet"
Silent operation; do not print the commands as they are executed. Silent operation; do not print the commands as they are executed.
.TP 0.5i .TP 0.5i
.B \-S .BR \-S , " \-\-no\-keep\-going" , " \-\-stop"
Cancel the effect of the Cancel the effect of the
.B \-k .B \-k
option. option.
@@ -245,20 +275,20 @@ via MAKEFLAGS or if you set
.B \-k .B \-k
in MAKEFLAGS in your environment. in MAKEFLAGS in your environment.
.TP 0.5i .TP 0.5i
.B \-t .BR \-t , " \-\-touch"
Touch files (mark them up to date without really changing them) Touch files (mark them up to date without really changing them)
instead of running their commands. instead of running their commands.
This is used to pretend that the commands were done, in order to fool This is used to pretend that the commands were done, in order to fool
future invocations of future invocations of
.IR make . .IR make .
.TP 0.5i .TP 0.5i
.B \-v .BR \-v , " \-\-version"
Print the version of the Print the version of the
.I make .I make
program plus a copyright, a list of authors and a notice that there program plus a copyright, a list of authors and a notice that there
is no warranty. is no warranty.
.TP 0.5i .TP 0.5i
.B \-w .BR \-w , " \-\-print\-directory"
Print a message containing the working directory Print a message containing the working directory
before and after other processing. before and after other processing.
This may be useful for tracking down errors from complicated nests of This may be useful for tracking down errors from complicated nests of
@@ -266,7 +296,12 @@ recursive
.I make .I make
commands. commands.
.TP 0.5i .TP 0.5i
.BI "\-W " file .B \-\-no\-print\-directory
Turn off
.BR \-w ,
even if it was turned on implicitly.
.TP 0.5i
\fB\-W\fR \fIfile\fR, \fB\-\-what\-if\fR=\fIfile\fR, \fB\-\-new\-file\fR=\fIfile\fR, \fB\-\-assume\-new\fR=\fIfile\fR
Pretend that the target Pretend that the target
.I file .I file
has just been modified. has just been modified.
@@ -281,11 +316,50 @@ command on the given file before running
.IR make , .IR make ,
except that the modification time is changed only in the imagination of except that the modification time is changed only in the imagination of
.IR make . .IR make .
.TP 0.5i
.B \-\-warn\-undefined\-variables
Warn when an undefined variable is referenced.
.SH "EXIT STATUS"
GNU
.I make
exits with a status of zero if all makefiles were successfully parsed
and no targets that were built failed. A status of one will be returned
if the
.B \-q
flag was used and
.I make
determines that a target needs to be rebuilt. A status of two will be
returned if any errors were encountered.
.SH "SEE ALSO" .SH "SEE ALSO"
.I "The GNU Make Manual" .I "The GNU Make Manual"
.SH BUGS .SH BUGS
See the chapter `Problems and Bugs' in See the chapter `Problems and Bugs' in
.I "The GNU Make Manual" . .IR "The GNU Make Manual" .
.SH AUTHOR .SH AUTHOR
This manual page contributed by Dennis Morse of Stanford University. This manual page contributed by Dennis Morse of Stanford University.
It has been reworked by Roland McGrath. It has been reworked by Roland McGrath. Further updates contributed by
Mike Frysinger.
.SH "COPYRIGHT"
Copyright (C) 1992, 1993, 1996, 1999 Free Software Foundation, Inc.
This file is part of GNU
.IR make .
.LP
GNU
.I make
is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
.LP
GNU
.I make
is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
.LP
You should have received a copy of the GNU General Public License
along with GNU
.IR make ;
see the file COPYING. If not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.

175
make.h
View File

@@ -1,22 +1,20 @@
/* Miscellaneous global declarations and portability cruft for GNU Make. /* Miscellaneous global declarations and portability cruft for GNU Make.
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999, Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
2002 Free Software Foundation, Inc. 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
This file is part of GNU Make. This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify GNU Make is free software; you can redistribute it and/or modify it under the
it under the terms of the GNU General Public License as published by terms of the GNU General Public License as published by the Free Software
the Free Software Foundation; either version 2, or (at your option) Foundation; either version 2, or (at your option) any later version.
any later version.
GNU Make is distributed in the hope that it will be useful, GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
but WITHOUT ANY WARRANTY; without even the implied warranty of WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the A PARTICULAR PURPOSE. See the GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License along with
along with GNU Make; see the file COPYING. If not, write to GNU Make; see the file COPYING. If not, write to the Free Software
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
Boston, MA 02111-1307, USA. */
/* We use <config.h> instead of "config.h" so that a compilation /* We use <config.h> instead of "config.h" so that a compilation
using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h using -I. -I$srcdir will use ./config.h rather than $srcdir/config.h
@@ -42,7 +40,7 @@ char *alloca ();
/* Use prototypes if available. */ /* Use prototypes if available. */
#if defined (__cplusplus) || (defined (__STDC__) && __STDC__) #if defined (__cplusplus) || defined (__STDC__)
# undef PARAMS # undef PARAMS
# define PARAMS(protos) protos # define PARAMS(protos) protos
#else /* Not C++ or ANSI C. */ #else /* Not C++ or ANSI C. */
@@ -210,6 +208,7 @@ extern unsigned int get_path_max PARAMS ((void));
# define __printf__ printf # define __printf__ printf
# endif # endif
#endif #endif
#define UNUSED __attribute__ ((unused))
#if defined (STDC_HEADERS) || defined (__GNU_LIBRARY__) #if defined (STDC_HEADERS) || defined (__GNU_LIBRARY__)
# include <stdlib.h> # include <stdlib.h>
@@ -275,16 +274,15 @@ extern void bzero PARAMS ((char *, int));
extern void bcopy PARAMS ((const char *b1, char *b2, int)); extern void bcopy PARAMS ((const char *b1, char *b2, int));
# endif # endif
#endif /* ANSI_STRING. */
#undef ANSI_STRING
/* SCO Xenix has a buggy macro definition in <string.h>. */ /* SCO Xenix has a buggy macro definition in <string.h>. */
#undef strerror #undef strerror
#if !defined(__DECC)
#if !defined(ANSI_STRING) && !defined(__DECC)
extern char *strerror PARAMS ((int errnum)); extern char *strerror PARAMS ((int errnum));
#endif #endif
#endif /* !ANSI_STRING. */
#undef ANSI_STRING
#if HAVE_INTTYPES_H #if HAVE_INTTYPES_H
# include <inttypes.h> # include <inttypes.h>
#endif #endif
@@ -349,15 +347,17 @@ extern int strcmpi (const char *,const char *);
#define S_(msg1,msg2,num) ngettext (msg1,msg2,num) #define S_(msg1,msg2,num) ngettext (msg1,msg2,num)
/* Handle other OSs. */ /* Handle other OSs. */
#if defined(HAVE_DOS_PATHS)
#if defined(__MSDOS__) || defined(WINDOWS32)
# define PATH_SEPARATOR_CHAR ';' # define PATH_SEPARATOR_CHAR ';'
#elif defined(VMS)
# define PATH_SEPARATOR_CHAR ','
#else #else
# if defined(VMS) # define PATH_SEPARATOR_CHAR ':'
# define PATH_SEPARATOR_CHAR ',' #endif
# else
# define PATH_SEPARATOR_CHAR ':' /* This is needed for getcwd() and chdir(). */
# endif #if defined(_MSC_VER) || defined(__BORLANDC__)
# include <direct.h>
#endif #endif
#ifdef WINDOWS32 #ifdef WINDOWS32
@@ -368,7 +368,6 @@ extern int strcmpi (const char *,const char *);
extern void sync_Path_environment(void); extern void sync_Path_environment(void);
extern int kill(int pid, int sig); extern int kill(int pid, int sig);
extern int safe_stat(char *file, struct stat *sb);
extern char *end_of_token_w32(char *s, char stopchar); extern char *end_of_token_w32(char *s, char stopchar);
extern int find_and_set_default_shell(char *token); extern int find_and_set_default_shell(char *token);
@@ -381,7 +380,7 @@ extern int unixy_shell;
struct floc struct floc
{ {
char *filenm; const char *filenm;
unsigned long lineno; unsigned long lineno;
}; };
#define NILF ((struct floc *)0) #define NILF ((struct floc *)0)
@@ -389,9 +388,16 @@ struct floc
#define STRING_SIZE_TUPLE(_s) (_s), (sizeof (_s)-1) #define STRING_SIZE_TUPLE(_s) (_s), (sizeof (_s)-1)
/* Fancy processing for variadic functions in both ANSI and pre-ANSI /* We have to have stdarg.h or varargs.h AND v*printf or doprnt to use
compilers. */ variadic versions of these functions. */
#if defined __STDC__ && __STDC__
#if HAVE_STDARG_H || HAVE_VARARGS_H
# if HAVE_VPRINTF || HAVE_DOPRNT
# define USE_VARIADIC 1
# endif
#endif
#if HAVE_ANSI_COMPILER && USE_VARIADIC && HAVE_STDARG_H
extern void message (int prefix, const char *fmt, ...) extern void message (int prefix, const char *fmt, ...)
__attribute__ ((__format__ (__printf__, 2, 3))); __attribute__ ((__format__ (__printf__, 2, 3)));
extern void error (const struct floc *flocp, const char *fmt, ...) extern void error (const struct floc *flocp, const char *fmt, ...)
@@ -415,15 +421,11 @@ extern char *xrealloc PARAMS ((char *, unsigned int));
extern char *xstrdup PARAMS ((const char *)); extern char *xstrdup PARAMS ((const char *));
extern char *find_next_token PARAMS ((char **, unsigned int *)); extern char *find_next_token PARAMS ((char **, unsigned int *));
extern char *next_token PARAMS ((const char *)); extern char *next_token PARAMS ((const char *));
extern char *end_of_token PARAMS ((char *)); extern char *end_of_token PARAMS ((const char *));
extern void collapse_continuations PARAMS ((char *)); extern void collapse_continuations PARAMS ((char *));
extern void remove_comments PARAMS((char *));
extern char *sindex PARAMS ((const char *, unsigned int, \
const char *, unsigned int));
extern char *lindex PARAMS ((const char *, const char *, int)); extern char *lindex PARAMS ((const char *, const char *, int));
extern int alpha_compare PARAMS ((const void *, const void *)); extern int alpha_compare PARAMS ((const void *, const void *));
extern void print_spaces PARAMS ((unsigned int)); extern void print_spaces PARAMS ((unsigned int));
extern char *find_char_unquote PARAMS ((char *, int, int, int));
extern char *find_percent PARAMS ((char *)); extern char *find_percent PARAMS ((char *));
extern FILE *open_tmpfile PARAMS ((char **, const char *)); extern FILE *open_tmpfile PARAMS ((char **, const char *));
@@ -449,7 +451,7 @@ extern void install_default_implicit_rules PARAMS ((void));
extern void build_vpath_lists PARAMS ((void)); extern void build_vpath_lists PARAMS ((void));
extern void construct_vpath_list PARAMS ((char *pattern, char *dirpath)); extern void construct_vpath_list PARAMS ((char *pattern, char *dirpath));
extern int vpath_search PARAMS ((char **file, FILE_TIMESTAMP *mtime_ptr)); extern int vpath_search PARAMS ((char **file, FILE_TIMESTAMP *mtime_ptr));
extern int gpath_search PARAMS ((char *file, int len)); extern int gpath_search PARAMS ((char *file, unsigned int len));
extern void construct_include_path PARAMS ((char **arg_dirs)); extern void construct_include_path PARAMS ((char **arg_dirs));
@@ -457,6 +459,18 @@ extern void user_access PARAMS ((void));
extern void make_access PARAMS ((void)); extern void make_access PARAMS ((void));
extern void child_access PARAMS ((void)); extern void child_access PARAMS ((void));
extern void close_stdout PARAMS ((void));
extern char *strip_whitespace PARAMS ((const char **begpp, const char **endpp));
/* String caching */
extern void strcache_init PARAMS ((void));
extern void strcache_print_stats PARAMS ((const char *prefix));
extern int strcache_iscached PARAMS ((const char *str));
extern const char *strcache_add PARAMS ((const char *str));
extern const char *strcache_add_len PARAMS ((const char *str, int len));
extern int strcache_setbufsize PARAMS ((int size));
#ifdef HAVE_VFORK_H #ifdef HAVE_VFORK_H
# include <vfork.h> # include <vfork.h>
#endif #endif
@@ -476,22 +490,23 @@ extern long int lseek ();
#ifdef HAVE_GETCWD #ifdef HAVE_GETCWD
# if !defined(VMS) && !defined(__DECC) # if !defined(VMS) && !defined(__DECC)
extern char *getcwd (); extern char *getcwd ();
#endif # endif
#else #else
extern char *getwd (); extern char *getwd ();
# define getcwd(buf, len) getwd (buf) # define getcwd(buf, len) getwd (buf)
#endif #endif
extern const struct floc *reading_file; extern const struct floc *reading_file;
extern const struct floc **expanding_var;
extern char **environ; extern char **environ;
extern int just_print_flag, silent_flag, ignore_errors_flag, keep_going_flag; extern int just_print_flag, silent_flag, ignore_errors_flag, keep_going_flag;
extern int print_data_base_flag, question_flag, touch_flag, always_make_flag; extern int print_data_base_flag, question_flag, touch_flag, always_make_flag;
extern int env_overrides, no_builtin_rules_flag, no_builtin_variables_flag; extern int env_overrides, no_builtin_rules_flag, no_builtin_variables_flag;
extern int print_version_flag, print_directory_flag; extern int print_version_flag, print_directory_flag, check_symlink_flag;
extern int warn_undefined_variables_flag, posix_pedantic, not_parallel; extern int warn_undefined_variables_flag, posix_pedantic, not_parallel;
extern int clock_skew_detected; extern int second_expansion, clock_skew_detected, rebuilding_makefiles;
/* can we run commands via 'sh -c xxx' or must we use batch files? */ /* can we run commands via 'sh -c xxx' or must we use batch files? */
extern int batch_mode_shell; extern int batch_mode_shell;
@@ -508,7 +523,7 @@ extern int max_load_average;
extern char *program; extern char *program;
extern char *starting_directory; extern char *starting_directory;
extern unsigned int makelevel; extern unsigned int makelevel;
extern char *version_string, *remote_description; extern char *version_string, *remote_description, *make_host;
extern unsigned int commands_started; extern unsigned int commands_started;
@@ -538,25 +553,59 @@ extern int handling_fatal_signal;
#include <dmalloc.h> #include <dmalloc.h>
#endif #endif
#ifndef initialize_main
/* If we have broken SA_RESTART support, then wrap stat() and readdir() with # ifdef __EMX__
versions that handle EINTR. Note that there are still plenty of system # define initialize_main(pargc, pargv) \
calls that can fail with EINTR but this, reportedly, gets the vast { _wildcard(pargc, pargv); _response(pargc, pargv); }
majority of failure cases. If you still experience failures you'll need # else
to either get a system where SA_RESTART works, or you need to avoid -j. */ # define initialize_main(pargc, pargv)
# endif
#ifdef HAVE_BROKEN_RESTART
/* Here we make an assumption that a system with a broken SA_RESTART has
dirent.h. Right now the only system I know of in this category is PTX, and
it does have dirent.h.
*/
#include <dirent.h>
#define stat(_f,_b) atomic_stat ((_f), (_b))
#define readdir(_d) atomic_readdir (_d)
extern int atomic_stat PARAMS ((const char *file, struct stat *buf));
extern struct dirent *atomic_readdir PARAMS ((DIR *dir));
#endif #endif
#ifdef __EMX__
# if !HAVE_STRCASECMP
# define strcasecmp stricmp
# endif
# if !defined chdir
# define chdir _chdir2
# endif
# if !defined getcwd
# define getcwd _getcwd2
# endif
/* NO_CHDIR2 causes make not to use _chdir2() and _getcwd2() instead of
chdir() and getcwd(). This avoids some error messages for the
make testsuite but restricts the drive letter support. */
# ifdef NO_CHDIR2
# warning NO_CHDIR2: usage of drive letters restricted
# undef chdir
# undef getcwd
# endif
#endif
#ifndef initialize_main
# define initialize_main(pargc, pargv)
#endif
/* Some systems (like Solaris, PTX, etc.) do not support the SA_RESTART flag
properly according to POSIX. So, we try to wrap common system calls with
checks for EINTR. Note that there are still plenty of system calls that
can fail with EINTR but this, reportedly, gets the vast majority of
failure cases. If you still experience failures you'll need to either get
a system where SA_RESTART works, or you need to avoid -j. */
#define EINTRLOOP(_v,_c) while (((_v)=_c)==-1 && errno==EINTR)
/* While system calls that return integers are pretty consistent about
returning -1 on failure and setting errno in that case, functions that
return pointers are not always so well behaved. Sometimes they return
NULL for expected behavior: one good example is readdir() which returns
NULL at the end of the directory--and _doesn't_ reset errno. So, we have
to do it ourselves here. */
#define ENULLLOOP(_v,_c) do{ errno = 0; \
while (((_v)=_c)==0 && errno==EINTR); }while(0)

View File

@@ -1,4 +1,4 @@
FROM LIB:cres.o "commands.o"+"job.o"+"dir.o"+"file.o"+"misc.o"+"main.o"+"read.o"+"remake.o"+"rule.o"+"implicit.o"+"default.o"+"variable.o"+"expand.o"+"function.o"+"vpath.o"+"version.o"+"ar.o"+"arscan.o"+"signame.o"+"remote-stub.o"+"getopt.o"+"getopt1.o"+"alloca.o"+"amiga.o" FROM LIB:cres.o "commands.o"+"job.o"+"dir.o"+"file.o"+"misc.o"+"main.o"+"read.o"+"remake.o"+"rule.o"+"implicit.o"+"default.o"+"variable.o"+"expand.o"+"function.o"+"vpath.o"+"version.o"+"ar.o"+"arscan.o"+"signame.o"+"remote-stub.o"+"getopt.o"+"getopt1.o"+"alloca.o"+"amiga.o"+"hash.o"+"strcache.o"
TO "make.new" TO "make.new"
LIB glob/glob.lib LIB:sc.lib LIB:amiga.lib LIB glob/glob.lib LIB:sc.lib LIB:amiga.lib
QUIET QUIET

21
make_msvc_net2003.sln Normal file
View File

@@ -0,0 +1,21 @@
Microsoft Visual Studio Solution File, Format Version 8.00
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "make_msvc.net2003", "make_msvc_net2003.vcproj", "{E96B5060-3240-4723-91C9-E64F1C877A04}"
ProjectSection(ProjectDependencies) = postProject
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
Debug = Debug
Release = Release
EndGlobalSection
GlobalSection(ProjectConfiguration) = postSolution
{E96B5060-3240-4723-91C9-E64F1C877A04}.Debug.ActiveCfg = Debug|Win32
{E96B5060-3240-4723-91C9-E64F1C877A04}.Debug.Build.0 = Debug|Win32
{E96B5060-3240-4723-91C9-E64F1C877A04}.Release.ActiveCfg = Release|Win32
{E96B5060-3240-4723-91C9-E64F1C877A04}.Release.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
EndGlobalSection
GlobalSection(ExtensibilityAddIns) = postSolution
EndGlobalSection
EndGlobal

317
make_msvc_net2003.vcproj Normal file
View File

@@ -0,0 +1,317 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="make_msvc.net2003"
ProjectGUID="{E96B5060-3240-4723-91C9-E64F1C877A04}"
Keyword="Win32Proj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=".;w32/include;glob"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;HAVE_CONFIG_H=1;WINDOWS32=1"
MinimalRebuild="TRUE"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
ForceConformanceInForLoopScope="TRUE"
UsePrecompiledHeader="0"
WarningLevel="4"
SuppressStartupBanner="TRUE"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="4"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/make_msvc.net2003.exe"
LinkIncremental="2"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="$(OutDir)/make_msvc.net2003.pdb"
SubSystem="1"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"
Description="Copying config.h.W32 to config.h"
CommandLine="if not exist config.h copy config.h.W32 config.h"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="1"
CharacterSet="2">
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories=".;w32/include;glob"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;HAVE_CONFIG_H=1;WINDOWS32=1"
RuntimeLibrary="0"
ForceConformanceInForLoopScope="TRUE"
UsePrecompiledHeader="0"
WarningLevel="4"
Detect64BitPortabilityProblems="FALSE"
DebugInformationFormat="3"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/make_msvc.net2003.exe"
LinkIncremental="1"
GenerateDebugInformation="TRUE"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"
Description="Copying config.h.W32 to config.h"
CommandLine="if not exist config.h copy config.h.W32 config.h"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="src"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
<File
RelativePath=".\ar.c">
</File>
<File
RelativePath=".\arscan.c">
</File>
<File
RelativePath=".\commands.c">
</File>
<File
RelativePath=".\default.c">
</File>
<File
RelativePath=".\dir.c">
</File>
<File
RelativePath=".\expand.c">
</File>
<File
RelativePath=".\file.c">
</File>
<File
RelativePath=".\function.c">
</File>
<File
RelativePath=".\getloadavg.c">
</File>
<File
RelativePath=".\getopt.c">
</File>
<File
RelativePath=".\getopt1.c">
</File>
<File
RelativePath=".\hash.c">
</File>
<File
RelativePath=".\strcache.c">
</File>
<File
RelativePath=".\implicit.c">
</File>
<File
RelativePath=".\job.c">
</File>
<File
RelativePath=".\main.c">
</File>
<File
RelativePath=".\misc.c">
</File>
<File
RelativePath=".\read.c">
</File>
<File
RelativePath=".\remake.c">
</File>
<File
RelativePath=".\remote-stub.c">
</File>
<File
RelativePath=".\rule.c">
</File>
<File
RelativePath=".\signame.c">
</File>
<File
RelativePath=".\variable.c">
</File>
<File
RelativePath=".\version.c">
</File>
<File
RelativePath=".\vpath.c">
</File>
<Filter
Name="w32"
Filter="">
<File
RelativePath=".\w32\compat\dirent.c">
</File>
<File
RelativePath=".\w32\subproc\misc.c">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)/$(InputName)1.obj"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
ObjectFile="$(IntDir)/$(InputName)1.obj"/>
</FileConfiguration>
</File>
<File
RelativePath=".\w32\pathstuff.c">
</File>
<File
RelativePath=".\w32\subproc\sub_proc.c">
</File>
<File
RelativePath=".\w32\subproc\w32err.c">
</File>
</Filter>
<Filter
Name="glob"
Filter="">
<File
RelativePath=".\glob\fnmatch.c">
</File>
<File
RelativePath=".\glob\glob.c">
</File>
</Filter>
</Filter>
<Filter
Name="include"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
<File
RelativePath=".\commands.h">
</File>
<File
RelativePath=".\config.h">
</File>
<File
RelativePath=".\debug.h">
</File>
<File
RelativePath=".\dep.h">
</File>
<File
RelativePath=".\filedef.h">
</File>
<File
RelativePath=".\getopt.h">
</File>
<File
RelativePath=".\gettext.h">
</File>
<File
RelativePath=".\hash.h">
</File>
<File
RelativePath=".\job.h">
</File>
<File
RelativePath=".\make.h">
</File>
<File
RelativePath=".\rule.h">
</File>
<File
RelativePath=".\variable.h">
</File>
<File
RelativePath=".\vmsdir.h">
</File>
<Filter
Name="w32"
Filter="">
<File
RelativePath=".\w32\include\dirent.h">
</File>
<File
RelativePath=".\w32\include\pathstuff.h">
</File>
<File
RelativePath=".\w32\subproc\proc.h">
</File>
<File
RelativePath=".\w32\include\sub_proc.h">
</File>
<File
RelativePath=".\w32\include\w32err.h">
</File>
</Filter>
<Filter
Name="glob"
Filter="">
<File
RelativePath=".\glob\fnmatch.h">
</File>
<File
RelativePath=".\glob\glob.h">
</File>
</Filter>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -12,7 +12,7 @@ $! zinser@decus.de (preferred) or zinser@sysdev.deutsche-boerse.com
$ $
$! hb $! hb
$! But don't ask Martin Zinser about the lines, I added/changed. $! But don't ask Martin Zinser about the lines, I added/changed.
$! In case of an error do some cleanup $! In case of an error do some cleanup
$ on error then $ goto cleanup $ on error then $ goto cleanup
$! in case somebody set up her/his own symbol for cc $! in case somebody set up her/his own symbol for cc
$ set symbol/scope=(nolocal,noglobal) $ set symbol/scope=(nolocal,noglobal)
@@ -33,7 +33,7 @@ $ then
$ if f$trnlnm("SYS").eqs."" then def/nolog sys sys$library: $ if f$trnlnm("SYS").eqs."" then def/nolog sys sys$library:
$ ccopt = "" $ ccopt = ""
$ else $ else
$ ccopt = "/decc/prefix=all" $ ccopt = "/decc/prefix=(all,except=(globfree,glob))"
$ if f$trnlnm("SYS").eqs."" $ if f$trnlnm("SYS").eqs.""
$ then $ then
$ if f$trnlnm("DECC$LIBRARY_INCLUDE").nes."" $ if f$trnlnm("DECC$LIBRARY_INCLUDE").nes.""
@@ -68,8 +68,8 @@ $ gosub check_cc_qual
$ endif $ endif
$ filelist = "alloca ar arscan commands default dir expand file function " + - $ filelist = "alloca ar arscan commands default dir expand file function " + -
"hash implicit job main misc read remake remote-stub rule " + - "hash implicit job main misc read remake remote-stub rule " + -
"signame variable version vmsfunctions vmsify vpath " + - "signame variable version vmsfunctions vmsify vpath " + -
"[.glob]glob [.glob]fnmatch getopt1 getopt" "[.glob]glob [.glob]fnmatch getopt1 getopt strcache"
$ copy config.h-vms config.h $ copy config.h-vms config.h
$ n=0 $ n=0
$ open/write optf make.opt $ open/write optf make.opt
@@ -95,23 +95,23 @@ $ if f$trnlnm("OPTF").nes."" then $ close optf
$ if f$search("make.opt").nes."" then $ del make.opt;* $ if f$search("make.opt").nes."" then $ del make.opt;*
$ exit $ exit
$! $!
$!------------------------------------------------------------------------------ $!-----------------------------------------------------------------------------
$! $!
$! Check if this is a define relating to the properties of the C/C++ $! Check if this is a define relating to the properties of the C/C++
$! compiler $! compiler
$! $!
$CHECK_CC_QUAL: $CHECK_CC_QUAL:
$ open/write tmpc 'tc $ open/write tmpc 'tc
$ ccqual = "/warn=(disable=questcompare)" $ ccqual = "/warn=(disable=questcompare)"
$ write tmpc "#include <stdio.h>" $ write tmpc "#include <stdio.h>"
$ write tmpc "unsigned int i = 1;" $ write tmpc "unsigned int i = 1;"
$ write tmpc "int main(){" $ write tmpc "int main(){"
$ write tmpc "if (i < 0){printf(""Mission impossible\n"");}}" $ write tmpc "if (i < 0){printf(""Mission impossible\n"");}}"
$ close tmpc $ close tmpc
$ gosub cc_qual_check $ gosub cc_qual_check
$ return $ return
$! $!
$!------------------------------------------------------------------------------ $!-----------------------------------------------------------------------------
$! $!
$! Check for properties of C/C++ compiler $! Check for properties of C/C++ compiler
$! $!
@@ -122,17 +122,34 @@ $ cc 'ccqual' 'tmpnam'
$ if $status then cc_qual = true $ if $status then cc_qual = true
$ set message/fac/ident/sever/text $ set message/fac/ident/sever/text
$ delete/nolog 'tmpnam'.*;* $ delete/nolog 'tmpnam'.*;*
$ if cc_qual then ccopt = ccopt + ccqual $ if cc_qual then ccopt = ccopt + ccqual
$ return $ return
$!------------------------------------------------------------------------------ $!-----------------------------------------------------------------------------
$! $!
$ compileit : subroutine $ compileit : subroutine
$ ploc = f$locate("]",p1) $ ploc = f$locate("]",p1)
$ filnam = p1 $ filnam = p1
$ if ploc .lt. f$length(p1) then filnam=f$extract(ploc+1,100,p1) $ if ploc .lt. f$length(p1) then filnam=f$extract(ploc+1,100,p1)
$ write optf "''filnam'" $ write optf "''filnam'"
$ cc'ccopt'/include=([],[.glob]) - $ cc'ccopt'/include=([],[.glob]) -
/define=("allocated_variable_expand_for_file=alloc_var_expand_for_file","unlink=remove","HAVE_CONFIG_H","VMS") - /define=("allocated_variable_expand_for_file=alloc_var_expand_for_file","unlink=remove","HAVE_CONFIG_H","VMS") -
'p1' 'p1'
$ exit $ exit
$ endsubroutine : compileit $ endsubroutine : compileit
$!
$!-----------------------------------------------------------------------------
$!Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
$!2006 Free Software Foundation, Inc.
$!This file is part of GNU Make.
$!
$!GNU Make is free software; you can redistribute it and/or modify it under the
$!terms of the GNU General Public License as published by the Free Software
$!Foundation; either version 2, or (at your option) any later version.
$!
$!GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
$!WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
$!A PARTICULAR PURPOSE. See the GNU General Public License for more details.
$!
$!You should have received a copy of the GNU General Public License along with
$!GNU Make; see the file COPYING. If not, write to the Free Software
$!Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

View File

@@ -1,25 +1,26 @@
# Copyright (C) 1988, 1989, 1996, 1997 Free Software Foundation, Inc. # -*-Makefile-*- to build GNU make on VMS
#
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
# 2006 Free Software Foundation, Inc.
# This file is part of GNU Make. # This file is part of GNU Make.
# #
# GNU Make is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2, or (at your option) any later version.
#
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# GNU Make; see the file COPYING. If not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
# VMS extensions from GNU Make 3.60 imported by # VMS extensions from GNU Make 3.60 imported by
# Klaus Kämpf (kkaempf@rmi.de) # Klaus Kämpf (kkaempf@rmi.de)
# Modified for version 3.78.1 by Hartmut.Becker@compaq.com. # Modified for version 3.78.1 by Hartmut.Becker@compaq.com.
# Modified for version 3.80 by zinser@decus.de # Modified for version 3.80 by zinser@decus.de
# # Modified for version 3.81 by Hartmut Becker
# GNU Make is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# GNU Make is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with GNU Make; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
CC = cc CC = cc
CP = copy CP = copy
@@ -31,7 +32,7 @@ CP = copy
# #
ifeq ($(CC),cc) ifeq ($(CC),cc)
CFLAGS = $(defines) /include=([],[.glob])/prefix=all/standard=relaxed CFLAGS = $(defines) /include=([],[.glob])/prefix=(all,except=(glob,globfree))/standard=relaxed/warn=(disable=questcompare)
else else
CFLAGS = $(defines) /include=([],[.glob]) CFLAGS = $(defines) /include=([],[.glob])
endif endif
@@ -89,11 +90,11 @@ manext = 1
objs = commands.obj,job.obj,dir.obj,file.obj,misc.obj,hash.obj,\ objs = commands.obj,job.obj,dir.obj,file.obj,misc.obj,hash.obj,\
main.obj,read.obj,remake.obj,rule.obj,implicit.obj,\ main.obj,read.obj,remake.obj,rule.obj,implicit.obj,\
default.obj,variable.obj,expand.obj,function.obj,\ default.obj,variable.obj,expand.obj,function.obj,strcache.obj,\
vpath.obj,version.obj$(ARCHIVES)$(ALLOCA)$(extras)$(getopt)$(glob) vpath.obj,version.obj$(ARCHIVES)$(ALLOCA)$(extras)$(getopt)$(glob)
srcs = commands.c job.c dir.c file.c misc.c hash.c\ srcs = commands.c job.c dir.c file.c misc.c hash.c \
main.c read.c remake.c rule.c implicit.c \ main.c read.c remake.c rule.c implicit.c \
default.c variable.c expand.c function.c \ default.c variable.c expand.c function.c strcache.c \
vpath.c version.c vmsfunctions.c vmsify.c $(ARCHIVES_SRC) $(ALLOCASRC) \ vpath.c version.c vmsfunctions.c vmsify.c $(ARCHIVES_SRC) $(ALLOCASRC) \
commands.h dep.h filedef.h job.h make.h rule.h variable.h commands.h dep.h filedef.h job.h make.h rule.h variable.h
@@ -111,16 +112,16 @@ make.exe: $(objs)
clean: clean:
$$ purge [...] $$ purge [...]
-$(RM) make.exe;,*.obj; -$(RM) make.exe;,*.obj;
-$(RM) *.opt;
-$(RM) [.glob]*.obj; -$(RM) [.glob]*.obj;
# Automatically generated dependencies. # Automatically generated dependencies.
commands.obj: commands.c make.h dep.h commands.h filedef.h variable.h job.h commands.obj: commands.c make.h dep.h commands.h filedef.h variable.h job.h
job.obj: job.c make.h commands.h job.h filedef.h variable.h job.obj: job.c vmsjobs.c make.h commands.h job.h filedef.h variable.h
dir.obj: dir.c make.h dir.obj: dir.c make.h
file.obj: file.c make.h commands.h dep.h filedef.h variable.h file.obj: file.c make.h commands.h dep.h filedef.h variable.h
misc.obj: misc.c make.h dep.h misc.obj: misc.c make.h dep.h
hash.obj: hash.c make.h hash.h hash.obj: hash.c make.h hash.h
strcache.obj: strcache.c make.h hash.h
main.obj: main.c make.h commands.h dep.h filedef.h variable.h job.h main.obj: main.c make.h commands.h dep.h filedef.h variable.h job.h
read.obj: read.c make.h commands.h dep.h filedef.h variable.h read.obj: read.c make.h commands.h dep.h filedef.h variable.h
remake.obj: remake.c make.h commands.h job.h dep.h filedef.h remake.obj: remake.c make.h commands.h job.h dep.h filedef.h

304
misc.c
View File

@@ -1,22 +1,20 @@
/* Miscellaneous generic support functions for GNU Make. /* Miscellaneous generic support functions for GNU Make.
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1997, Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
2002 Free Software Foundation, Inc. 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
This file is part of GNU Make. This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify GNU Make is free software; you can redistribute it and/or modify it under the
it under the terms of the GNU General Public License as published by terms of the GNU General Public License as published by the Free Software
the Free Software Foundation; either version 2, or (at your option) Foundation; either version 2, or (at your option) any later version.
any later version.
GNU Make is distributed in the hope that it will be useful, GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
but WITHOUT ANY WARRANTY; without even the implied warranty of WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the A PARTICULAR PURPOSE. See the GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License along with
along with GNU Make; see the file COPYING. If not, write to GNU Make; see the file COPYING. If not, write to the Free Software
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
Boston, MA 02111-1307, USA. */
#include "make.h" #include "make.h"
#include "dep.h" #include "dep.h"
@@ -30,9 +28,8 @@ Boston, MA 02111-1307, USA. */
This fancy stuff all came from GNU fileutils, except for the VA_PRINTF and This fancy stuff all came from GNU fileutils, except for the VA_PRINTF and
VA_END macros used here since we have multiple print functions. */ VA_END macros used here since we have multiple print functions. */
#if HAVE_VPRINTF || HAVE_DOPRNT #if USE_VARIADIC
# define HAVE_STDVARARGS 1 # if HAVE_STDARG_H
# if __STDC__
# include <stdarg.h> # include <stdarg.h>
# define VA_START(args, lastarg) va_start(args, lastarg) # define VA_START(args, lastarg) va_start(args, lastarg)
# else # else
@@ -46,7 +43,7 @@ Boston, MA 02111-1307, USA. */
# endif # endif
# define VA_END(args) va_end(args) # define VA_END(args) va_end(args)
#else #else
/* # undef HAVE_STDVARARGS */ /* We can't use any variadic interface! */
# define va_alist a1, a2, a3, a4, a5, a6, a7, a8 # define va_alist a1, a2, a3, a4, a5, a6, a7, a8
# define va_dcl char *a1, *a2, *a3, *a4, *a5, *a6, *a7, *a8; # define va_dcl char *a1, *a2, *a3, *a4, *a5, *a6, *a7, *a8;
# define VA_START(args, lastarg) # define VA_START(args, lastarg)
@@ -60,8 +57,7 @@ Boston, MA 02111-1307, USA. */
zero if they are equal. */ zero if they are equal. */
int int
alpha_compare (v1, v2) alpha_compare (const void *v1, const void *v2)
const void *v1, *v2;
{ {
const char *s1 = *((char **)v1); const char *s1 = *((char **)v1);
const char *s2 = *((char **)v2); const char *s2 = *((char **)v2);
@@ -76,8 +72,7 @@ alpha_compare (v1, v2)
This is done by copying the text at LINE into itself. */ This is done by copying the text at LINE into itself. */
void void
collapse_continuations (line) collapse_continuations (char *line)
char *line;
{ {
register char *in, *out, *p; register char *in, *out, *p;
register int backslash; register int backslash;
@@ -152,29 +147,11 @@ collapse_continuations (line)
*out = '\0'; *out = '\0';
} }
/* Remove comments from LINE.
This is done by copying the text at LINE onto itself. */
void
remove_comments (line)
char *line;
{
char *comment;
comment = find_char_unquote (line, '#', 0, 0);
if (comment != 0)
/* Cut off the line at the #. */
*comment = '\0';
}
/* Print N spaces (used in debug for target-depth). */ /* Print N spaces (used in debug for target-depth). */
void void
print_spaces (n) print_spaces (unsigned int n)
unsigned int n;
{ {
while (n-- > 0) while (n-- > 0)
putchar (' '); putchar (' ');
@@ -185,8 +162,7 @@ print_spaces (n)
concatenate those of s1, s2, s3. */ concatenate those of s1, s2, s3. */
char * char *
concat (s1, s2, s3) concat (const char *s1, const char *s2, const char *s3)
const char *s1, *s2, *s3;
{ {
unsigned int len1, len2, len3; unsigned int len1, len2, len3;
char *result; char *result;
@@ -211,7 +187,7 @@ concat (s1, s2, s3)
/* Print a message on stdout. */ /* Print a message on stdout. */
void void
#if __STDC__ && HAVE_STDVARARGS #if HAVE_ANSI_COMPILER && USE_VARIADIC && HAVE_STDARG_H
message (int prefix, const char *fmt, ...) message (int prefix, const char *fmt, ...)
#else #else
message (prefix, fmt, va_alist) message (prefix, fmt, va_alist)
@@ -220,7 +196,7 @@ message (prefix, fmt, va_alist)
va_dcl va_dcl
#endif #endif
{ {
#if HAVE_STDVARARGS #if USE_VARIADIC
va_list args; va_list args;
#endif #endif
@@ -247,7 +223,7 @@ message (prefix, fmt, va_alist)
/* Print an error message. */ /* Print an error message. */
void void
#if __STDC__ && HAVE_STDVARARGS #if HAVE_ANSI_COMPILER && USE_VARIADIC && HAVE_STDARG_H
error (const struct floc *flocp, const char *fmt, ...) error (const struct floc *flocp, const char *fmt, ...)
#else #else
error (flocp, fmt, va_alist) error (flocp, fmt, va_alist)
@@ -256,7 +232,7 @@ error (flocp, fmt, va_alist)
va_dcl va_dcl
#endif #endif
{ {
#if HAVE_STDVARARGS #if USE_VARIADIC
va_list args; va_list args;
#endif #endif
@@ -280,7 +256,7 @@ error (flocp, fmt, va_alist)
/* Print an error message and exit. */ /* Print an error message and exit. */
void void
#if __STDC__ && HAVE_STDVARARGS #if HAVE_ANSI_COMPILER && USE_VARIADIC && HAVE_STDARG_H
fatal (const struct floc *flocp, const char *fmt, ...) fatal (const struct floc *flocp, const char *fmt, ...)
#else #else
fatal (flocp, fmt, va_alist) fatal (flocp, fmt, va_alist)
@@ -289,7 +265,7 @@ fatal (flocp, fmt, va_alist)
va_dcl va_dcl
#endif #endif
{ {
#if HAVE_STDVARARGS #if USE_VARIADIC
va_list args; va_list args;
#endif #endif
@@ -316,8 +292,7 @@ fatal (flocp, fmt, va_alist)
#undef strerror #undef strerror
char * char *
strerror (errnum) strerror (int errnum)
int errnum;
{ {
extern int errno, sys_nerr; extern int errno, sys_nerr;
#ifndef __DECC #ifndef __DECC
@@ -336,8 +311,7 @@ strerror (errnum)
/* Print an error message from errno. */ /* Print an error message from errno. */
void void
perror_with_name (str, name) perror_with_name (const char *str, const char *name)
const char *str, *name;
{ {
error (NILF, _("%s%s: %s"), str, name, strerror (errno)); error (NILF, _("%s%s: %s"), str, name, strerror (errno));
} }
@@ -345,8 +319,7 @@ perror_with_name (str, name)
/* Print an error message from errno and exit. */ /* Print an error message from errno and exit. */
void void
pfatal_with_name (name) pfatal_with_name (const char *name)
const char *name;
{ {
fatal (NILF, _("%s: %s"), name, strerror (errno)); fatal (NILF, _("%s: %s"), name, strerror (errno));
@@ -363,10 +336,10 @@ pfatal_with_name (name)
#undef xstrdup #undef xstrdup
char * char *
xmalloc (size) xmalloc (unsigned int size)
unsigned int size;
{ {
char *result = (char *) malloc (size); /* Make sure we don't allocate 0, for pre-ANSI libraries. */
char *result = (char *) malloc (size ? size : 1);
if (result == 0) if (result == 0)
fatal (NILF, _("virtual memory exhausted")); fatal (NILF, _("virtual memory exhausted"));
return result; return result;
@@ -374,13 +347,13 @@ xmalloc (size)
char * char *
xrealloc (ptr, size) xrealloc (char *ptr, unsigned int size)
char *ptr;
unsigned int size;
{ {
char *result; char *result;
/* Some older implementations of realloc() don't conform to ANSI. */ /* Some older implementations of realloc() don't conform to ANSI. */
if (! size)
size = 1;
result = ptr ? realloc (ptr, size) : malloc (size); result = ptr ? realloc (ptr, size) : malloc (size);
if (result == 0) if (result == 0)
fatal (NILF, _("virtual memory exhausted")); fatal (NILF, _("virtual memory exhausted"));
@@ -389,8 +362,7 @@ xrealloc (ptr, size)
char * char *
xstrdup (ptr) xstrdup (const char *ptr)
const char *ptr;
{ {
char *result; char *result;
@@ -413,9 +385,7 @@ xstrdup (ptr)
#endif /* HAVE_DMALLOC_H */ #endif /* HAVE_DMALLOC_H */
char * char *
savestring (str, length) savestring (const char *str, unsigned int length)
const char *str;
unsigned int length;
{ {
register char *out = (char *) xmalloc (length + 1); register char *out = (char *) xmalloc (length + 1);
if (length > 0) if (length > 0)
@@ -424,37 +394,6 @@ savestring (str, length)
return out; return out;
} }
/* Search string BIG (length BLEN) for an occurrence of
string SMALL (length SLEN). Return a pointer to the
beginning of the first occurrence, or return nil if none found. */
char *
sindex (big, blen, small, slen)
const char *big;
unsigned int blen;
const char *small;
unsigned int slen;
{
if (!blen)
blen = strlen (big);
if (!slen)
slen = strlen (small);
if (slen && blen >= slen)
{
register unsigned int b;
/* Quit when there's not enough room left for the small string. */
--slen;
blen -= slen;
for (b = 0; b < blen; ++b, ++big)
if (*big == *small && strneq (big + 1, small + 1, slen))
return (char *)big;
}
return 0;
}
/* Limited INDEX: /* Limited INDEX:
Search through the string STRING, which ends at LIMIT, for the character C. Search through the string STRING, which ends at LIMIT, for the character C.
@@ -463,9 +402,7 @@ sindex (big, blen, small, slen)
instead of at the first null. */ instead of at the first null. */
char * char *
lindex (s, limit, c) lindex (const char *s, const char *limit, int c)
register const char *s, *limit;
int c;
{ {
while (s < limit) while (s < limit)
if (*s++ == c) if (*s++ == c)
@@ -477,12 +414,11 @@ lindex (s, limit, c)
/* Return the address of the first whitespace or null in the string S. */ /* Return the address of the first whitespace or null in the string S. */
char * char *
end_of_token (s) end_of_token (const char *s)
char *s;
{ {
while (*s != '\0' && !isblank ((unsigned char)*s)) while (*s != '\0' && !isblank ((unsigned char)*s))
++s; ++s;
return s; return (char *)s;
} }
#ifdef WINDOWS32 #ifdef WINDOWS32
@@ -490,9 +426,7 @@ end_of_token (s)
* Same as end_of_token, but take into account a stop character * Same as end_of_token, but take into account a stop character
*/ */
char * char *
end_of_token_w32 (s, stopchar) end_of_token_w32 (char *s, char stopchar)
char *s;
char stopchar;
{ {
register char *p = s; register char *p = s;
register int backslash = 0; register int backslash = 0;
@@ -520,8 +454,7 @@ end_of_token_w32 (s, stopchar)
/* Return the address of the first nonwhitespace or null in the string S. */ /* Return the address of the first nonwhitespace or null in the string S. */
char * char *
next_token (s) next_token (const char *s)
const char *s;
{ {
while (isblank ((unsigned char)*s)) while (isblank ((unsigned char)*s))
++s; ++s;
@@ -532,9 +465,7 @@ next_token (s)
length of the token into *LENGTHPTR if LENGTHPTR is not nil. */ length of the token into *LENGTHPTR if LENGTHPTR is not nil. */
char * char *
find_next_token (ptr, lengthptr) find_next_token (char **ptr, unsigned int *lengthptr)
char **ptr;
unsigned int *lengthptr;
{ {
char *p = next_token (*ptr); char *p = next_token (*ptr);
char *end; char *end;
@@ -548,12 +479,37 @@ find_next_token (ptr, lengthptr)
return p; return p;
} }
/* Allocate a new `struct dep' with all fields initialized to 0. */
struct dep *
alloc_dep ()
{
struct dep *d = (struct dep *) xmalloc (sizeof (struct dep));
bzero ((char *) d, sizeof (struct dep));
return d;
}
/* Free `struct dep' along with `name' and `stem'. */
void
free_dep (struct dep *d)
{
if (d->name != 0)
free (d->name);
if (d->stem != 0)
free (d->stem);
free ((char *)d);
}
/* Copy a chain of `struct dep', making a new chain /* Copy a chain of `struct dep', making a new chain
with the same contents as the old one. */ with the same contents as the old one. */
struct dep * struct dep *
copy_dep_chain (d) copy_dep_chain (const struct dep *d)
register struct dep *d;
{ {
register struct dep *c; register struct dep *c;
struct dep *firstnew = 0; struct dep *firstnew = 0;
@@ -563,8 +519,12 @@ copy_dep_chain (d)
{ {
c = (struct dep *) xmalloc (sizeof (struct dep)); c = (struct dep *) xmalloc (sizeof (struct dep));
bcopy ((char *) d, (char *) c, sizeof (struct dep)); bcopy ((char *) d, (char *) c, sizeof (struct dep));
if (c->name != 0) if (c->name != 0)
c->name = xstrdup (c->name); c->name = xstrdup (c->name);
if (c->stem != 0)
c->stem = xstrdup (c->stem);
c->next = 0; c->next = 0;
if (firstnew == 0) if (firstnew == 0)
firstnew = lastnew = c; firstnew = lastnew = c;
@@ -576,13 +536,46 @@ copy_dep_chain (d)
return firstnew; return firstnew;
} }
/* Free a chain of 'struct dep'. */
void
free_dep_chain (struct dep *d)
{
while (d != 0)
{
struct dep *df = d;
d = d->next;
free_dep (df);
}
}
/* Free a chain of `struct nameseq'. Each nameseq->name is freed
as well. For `struct dep' chains use free_dep_chain. */
void
free_ns_chain (struct nameseq *n)
{
register struct nameseq *tmp;
while (n != 0)
{
if (n->name != 0)
free (n->name);
tmp = n;
n = n->next;
free (tmp);
}
}
#ifdef iAPX286 #ifdef iAPX286
/* The losing compiler on this machine can't handle this macro. */ /* The losing compiler on this machine can't handle this macro. */
char * char *
dep_name (dep) dep_name (struct dep *dep)
struct dep *dep;
{ {
return dep->name == 0 ? dep->file->name : dep->name; return dep->name == 0 ? dep->file->name : dep->name;
} }
@@ -641,8 +634,7 @@ static enum { make, user } current_access;
/* Under -d, write a message describing the current IDs. */ /* Under -d, write a message describing the current IDs. */
static void static void
log_access (flavor) log_access (const char *flavor)
char *flavor;
{ {
if (! ISDB (DB_JOBS)) if (! ISDB (DB_JOBS))
return; return;
@@ -659,7 +651,7 @@ log_access (flavor)
static void static void
init_access () init_access (void)
{ {
#ifndef VMS #ifndef VMS
user_uid = getuid (); user_uid = getuid ();
@@ -683,7 +675,7 @@ init_access ()
/* Give the process appropriate permissions for access to /* Give the process appropriate permissions for access to
user data (i.e., to stat files, or to spawn a child process). */ user data (i.e., to stat files, or to spawn a child process). */
void void
user_access () user_access (void)
{ {
#ifdef GETLOADAVG_PRIVILEGED #ifdef GETLOADAVG_PRIVILEGED
@@ -759,7 +751,7 @@ user_access ()
/* Give the process appropriate permissions for access to /* Give the process appropriate permissions for access to
make data (i.e., the load average). */ make data (i.e., the load average). */
void void
make_access () make_access (void)
{ {
#ifdef GETLOADAVG_PRIVILEGED #ifdef GETLOADAVG_PRIVILEGED
@@ -807,7 +799,7 @@ make_access ()
/* Give the process appropriate permissions for a child process. /* Give the process appropriate permissions for a child process.
This is like user_access, but you can't get back to make_access. */ This is like user_access, but you can't get back to make_access. */
void void
child_access () child_access (void)
{ {
#ifdef GETLOADAVG_PRIVILEGED #ifdef GETLOADAVG_PRIVILEGED
@@ -840,7 +832,7 @@ child_access ()
#ifdef NEED_GET_PATH_MAX #ifdef NEED_GET_PATH_MAX
unsigned int unsigned int
get_path_max () get_path_max (void)
{ {
static unsigned int value; static unsigned int value;
@@ -858,36 +850,48 @@ get_path_max ()
#endif #endif
#ifdef HAVE_BROKEN_RESTART /* This code is stolen from gnulib.
If/when we abandon the requirement to work with K&R compilers, we can
remove this (and perhaps other parts of GNU make!) and migrate to using
gnulib directly.
#undef stat This is called only through atexit(), which means die() has already been
#undef readdir invoked. So, call exit() here directly. Apparently that works...?
*/
int /* Close standard output, exiting with status 'exit_failure' on failure.
atomic_stat(file, buf) If a program writes *anything* to stdout, that program should close
const char *file; stdout and make sure that it succeeds before exiting. Otherwise,
struct stat *buf; suppose that you go to the extreme of checking the return status
of every function that does an explicit write to stdout. The last
printf can succeed in writing to the internal stream buffer, and yet
the fclose(stdout) could still fail (due e.g., to a disk full error)
when it tries to write out that buffered data. Thus, you would be
left with an incomplete output file and the offending program would
exit successfully. Even calling fflush is not always sufficient,
since some file systems (NFS and CODA) buffer written/flushed data
until an actual close call.
Besides, it's wasteful to check the return value from every call
that writes to stdout -- just let the internal stream state record
the failure. That's what the ferror test is checking below.
It's important to detect such failures and exit nonzero because many
tools (most notably `make' and other build-management systems) depend
on being able to detect failure in other tools via their exit status. */
void
close_stdout (void)
{ {
int r; int prev_fail = ferror (stdout);
int fclose_fail = fclose (stdout);
while ((r = stat (file, buf)) < 0) if (prev_fail || fclose_fail)
if (errno != EINTR) {
break; if (fclose_fail)
error (NILF, _("write error: %s"), strerror (errno));
return r; else
error (NILF, _("write error"));
exit (EXIT_FAILURE);
}
} }
struct dirent *
atomic_readdir(dir)
DIR *dir;
{
struct dirent *r;
while ((r = readdir (dir)) == NULL)
if (errno != EINTR)
break;
return r;
}
#endif /* HAVE_BROKEN_RESTART */

View File

@@ -1,6 +1,6 @@
*.gmo *.mo *.pot *.po *.gmo *.mo *.pot *.po
Makefile Makefile.in Makefile.in.in Makefile Makefile.in Makefile.in.in Makevars.template
Rules-quot Rules-quot stamp-po
*.sed *.sin *.header *.sed *.sin *.header
POTFILES POTFILES

View File

@@ -1,3 +1,39 @@
2006-01-28 Paul D. Smith <psmith@gnu.org>
* LINGUAS: Added new translation for Vietnamese (vi).
2005-07-14 Paul D. Smith <psmith@gnu.org>
* LINGUAS: Added new translation for Indonesian (id).
2005-05-09 Paul D. Smith <psmith@gnu.org>
* POTFILES.in: Add new file vmsjobs.c.
2005-04-06 Paul D. Smith <psmith@gnu.org>
* LINGUAS: Added a new translation for Kinywarwanda (rw).
2005-02-09 Paul D. Smith <psmith@gnu.org>
* LINGUAS: Added a new translation for Irish (ga).
2005-02-01 Paul D. Smith <psmith@gnu.org>
* LINGUAS: Added a new translation for Finnish (fi).
2003-10-18 Paul D. Smith <psmith@gnu.org>
* LINGUAS: Added a new translation for Belarusian (be).
2002-12-19 Paul D. Smith <psmith@gnu.org>
* LINGUAS: Added a new translation for Ukrainian (uk).
2002-10-05 Paul D. Smith <psmith@gnu.org>
* POTFILES.in: Add variable.h as it has a translatable string.
2002-08-08 Paul D. Smith <psmith@gnu.org> 2002-08-08 Paul D. Smith <psmith@gnu.org>
* LINGUAS: Add a new translation for Chinese (simplified) (zh_CN). * LINGUAS: Add a new translation for Chinese (simplified) (zh_CN).
@@ -15,3 +51,18 @@
* .cvsignore: Moved from i18n to here. * .cvsignore: Moved from i18n to here.
* POTFILES.in, LINGUAS, Makevars: Created. * POTFILES.in, LINGUAS, Makevars: Created.
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
GNU Make; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

View File

@@ -1,5 +1,5 @@
# Set of available languages: 16 languages # Set of available languages: 23 languages
da de es fr gl he hr ja ko nl pl pt_BR sv ru tr zh_CN be da de es fi fr ga gl he hr id ja ko nl pl pt_BR ru rw sv tr uk vi zh_CN
# Can't seem to get en@quot and en@boldquot to build properly? # Can't seem to get en@quot and en@boldquot to build properly?

View File

@@ -1,3 +1,20 @@
# This is a -*-Makefile-*-
# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This file is part of GNU Make.
#
# GNU Make is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2, or (at your option) any later version.
#
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# GNU Make; see the file COPYING. If not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
# Makefile variables for PO directory in any package using GNU gettext. # Makefile variables for PO directory in any package using GNU gettext.
# Usually the message domain is the same as the package name. # Usually the message domain is the same as the package name.
@@ -20,6 +37,22 @@ XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
# their copyright. # their copyright.
COPYRIGHT_HOLDER = Free Software Foundation, Inc. COPYRIGHT_HOLDER = Free Software Foundation, Inc.
# This is the email address or URL to which the translators shall report
# bugs in the untranslated strings:
# - Strings which are not entire sentences, see the maintainer guidelines
# in the GNU gettext documentation, section 'Preparing Strings'.
# - Strings which use unclear terms or require additional context to be
# understood.
# - Strings which make invalid assumptions about notation of date, time or
# money.
# - Pluralisation problems.
# - Incorrect English spelling.
# - Incorrect formatting.
# It can be your email address, or a mailing list address where translators
# can write to without being subscribed, or the URL of a web page through
# which the translators can contact you.
MSGID_BUGS_ADDRESS = bug-make@gnu.org
# This is the list of locale categories, beyond LC_MESSAGES, for which the # This is the list of locale categories, beyond LC_MESSAGES, for which the
# message catalogs shall be used. It is usually empty. # message catalogs shall be used. It is usually empty.
EXTRA_LOCALE_CATEGORIES = EXTRA_LOCALE_CATEGORIES =

View File

@@ -1,5 +1,19 @@
# List of source files containing translatable strings. # List of source files containing translatable strings.
# Copyright (C) 2002 Free Software Foundation, Inc. # Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
# Foundation, Inc.
# This file is part of GNU Make.
#
# GNU Make is free software; you can redistribute it and/or modify it under the
# terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2, or (at your option) any later version.
#
# GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# GNU Make; see the file COPYING. If not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
ar.c ar.c
arscan.c arscan.c
@@ -19,6 +33,9 @@ remake.c
remote-cstms.c remote-cstms.c
rule.c rule.c
signame.c signame.c
strcache.c
variable.c variable.c
variable.h
vmsfunctions.c vmsfunctions.c
vmsjobs.c
vpath.c vpath.c

6
prepare_w32.bat Normal file
View File

@@ -0,0 +1,6 @@
@echo off
@echo Windows32 CVS build preparation of config.h.W32 and NMakefile.
if not exist config.h.W32 copy config.h.W32.template config.h.W32
if not exist config.h copy config.h.W32 config.h
if not exist NMakefile copy NMakefile.template NMakefile
@echo Preparation complete. Run build_w32.bat to compile and link.

1183
read.c

File diff suppressed because it is too large Load Diff

View File

@@ -1,3 +1,116 @@
This is the VMS version of GNU Make, updated by Hartmut Becker
Changes are based on GNU make 3.80. Latest changes are for OpenVMS/I64
and new VMS CRTLs.
This version was tested on OpenVMS/I64 V8.2 (field test) with hp C
X7.1-024 OpenVMS/Alpha V7.3-2 with Compaq C V6.5-001 and OpenVMS/VAX 7.1
with Compaq C V6.2-003 There are still some warning and informational
message issued by the compilers.
Build instructions
Make a 1st version
$ @makefile.com
$ rena make.exe 1st-make.exe
Use the 1st version to generate a 2nd version
$ mc sys$disk:[]1st-make clean
$ mc sys$disk:[]1st-make
Verify your 2nd version
$ rena make.exe 2nd-make.exe
$ mc sys$disk:[]2nd-make clean
$ mc sys$disk:[]2nd-make
Changes:
. In default.c define variable ARCH as IA64 for VMS on Itanium systems.
. In makefile.vms avoid name collision for glob and globfree.
In newer version of the VMS CRTL there are glob and globfree implemented.
Compiling and linking may result in
%ILINK-W-MULDEFLNKG, symbol DECC$GLOBFREE has subsequent linkage definition
in module DECC$SHR file SYS$COMMON:[SYSLIB]DECC$SHR.EXE;1
%ILINK-W-MULDEF, symbol DECC$GLOBFREE multiply defined
in module DECC$SHR file SYS$COMMON:[SYSLIB]DECC$SHR.EXE;1
linker messages (and similar for DECC$GLOB). The messages just say, that
globfree is a known CRTL whose name was mapped by the compiler to
DECC$GLOBFREE. This is done in glob.c as well, so this name is defined
twice. One possible solution is to use the VMS versions of glob and
globfree. However, then the build environment needs to figure out if
there is a new CRTL supporting these or not. This adds complexity. Even
more, these functions return VMS file specifications, which is not
expected by the other make sources. There is a switch at run time (a VMS
logical DECC$GLOB_UNIX_STYLE), which can be set to get Unix style
names. This may conflict with other software. The recommended solution
for this is to set this switch just prior to calling main: in an
initialization routine. This adds more complexity and more VMS specific
code. It is easier to tell the compiler NOT to map the routine names
with a simple change in makefile.vms.
Some notes on case sensitive names in rules and on the disk. In the VMS
template for CONFIG.H case sensitive rules can be enabled with defining
WANT_CASE_SENSITIVE_TARGETS. For recent version of VMS there is a case
sensitive file system: ODS5. To make use of that, additionally un-defining
the HAVE_CASE_INSENSITIVE_FS is required. As these are C macros, different
versions of make need to be built to have any case sensitivity for VMS
working. Unfortunately, for ODS5 disks that's not all.
- Usually DCL upcases command line tokens (except strings) and usually the
file system is case blind (similar to how Windows systems work)
$ set proc/parse=extended/case=sensitive
preserves lower and UPPER on the command line and (for this process and all
sub-processes) enables case sensitivity in the file system
- Usually the CRTL tries to reverse what DCL did with command line tokens, it
lowercases all tokens (except strings)
$ define DECC$ARGV_PARSE_STYLE enable
passes (the now preserved) lower and UPPER from the command line to main()
- Usually the CRTL upcases the arguments to open() and friends
$ define DECC$EFS_CASE_PRESERVE enable
preserves the names as is.
It is important to know that not all VMS tools are ready for case sensitivity.
With this setup some tools may not work as expected. The setup should not
blindly be applied for all users in default login procedures.
Example? The poor coding gives a compiler message, showing that there are
different files:
$ dir
Directory ODS5DISK[HB]
A.c;1 B.c;1 c.c;1 X.c;1
x.c;1
Total of 5 files.
$ ods5make x.obj
cc /obj=x.obj x.c
foo(){lowercase_x();}
......^
%CC-I-IMPLICITFUNC, In this statement, the identifier "lowercase_x" is implicitly declared as a function.
at line number 1 in file ODS5DISK[HB]x.c;1
$ mc SYS$SYSDEVICE:[HARTMUT.MAKE_3_80P]ods5make X.obj
cc /obj=X.obj X.c
foo() {UPPERCASE_X();}
.......^
%CC-I-IMPLICITFUNC, In this statement, the identifier "UPPERCASE_X" is implicitly declared as a function.
at line number 1 in file ODS5DISK[HB]X.c;1
$ dir
Directory ODS5DISK[HB]
A.c;1 B.c;1 c.c;1 X.c;1
x.c;1 X.obj;1 x.obj;1
Total of 7 files.
$
This is the VMS port of GNU Make done by Hartmut.Becker@compaq.com. This is the VMS port of GNU Make done by Hartmut.Becker@compaq.com.
It is based on the specific version 3.77k and on 3.78.1. 3.77k was done It is based on the specific version 3.77k and on 3.78.1. 3.77k was done
@@ -181,3 +294,20 @@ Lots of default settings are adapted for VMS. See default.c.
Long command lines are now converted to command files. Long command lines are now converted to command files.
Comma (',') as a separator is now allowed. See makefile.vms for an example. Comma (',') as a separator is now allowed. See makefile.vms for an example.
-------------------------------------------------------------------------------
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
2006 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
GNU Make; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

446
remake.c
View File

@@ -1,22 +1,20 @@
/* Basic dependency engine for GNU Make. /* Basic dependency engine for GNU Make.
Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1999, Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
2002 Free Software Foundation, Inc. 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
This file is part of GNU Make. This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify GNU Make is free software; you can redistribute it and/or modify it under the
it under the terms of the GNU General Public License as published by terms of the GNU General Public License as published by the Free Software
the Free Software Foundation; either version 2, or (at your option) Foundation; either version 2, or (at your option) any later version.
any later version.
GNU Make is distributed in the hope that it will be useful, GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
but WITHOUT ANY WARRANTY; without even the implied warranty of WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the A PARTICULAR PURPOSE. See the GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License along with
along with GNU Make; see the file COPYING. If not, write to GNU Make; see the file COPYING. If not, write to the Free Software
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
Boston, MA 02111-1307, USA. */
#include "make.h" #include "make.h"
#include "filedef.h" #include "filedef.h"
@@ -73,21 +71,20 @@ static int library_search PARAMS ((char **lib, FILE_TIMESTAMP *mtime_ptr));
/* Remake all the goals in the `struct dep' chain GOALS. Return -1 if nothing /* Remake all the goals in the `struct dep' chain GOALS. Return -1 if nothing
was done, 0 if all goals were updated successfully, or 1 if a goal failed. was done, 0 if all goals were updated successfully, or 1 if a goal failed.
If MAKEFILES is nonzero, these goals are makefiles, so -t, -q, and -n should
be disabled for them unless they were also command-line targets, and we If rebuilding_makefiles is nonzero, these goals are makefiles, so -t, -q,
should only make one goal at a time and return as soon as one goal whose and -n should be disabled for them unless they were also command-line
`changed' member is nonzero is successfully made. */ targets, and we should only make one goal at a time and return as soon as
one goal whose `changed' member is nonzero is successfully made. */
int int
update_goal_chain (goals, makefiles) update_goal_chain (struct dep *goals)
register struct dep *goals;
int makefiles;
{ {
int t = touch_flag, q = question_flag, n = just_print_flag; int t = touch_flag, q = question_flag, n = just_print_flag;
unsigned int j = job_slots; unsigned int j = job_slots;
int status = -1; int status = -1;
#define MTIME(file) (makefiles ? file_mtime_no_search (file) \ #define MTIME(file) (rebuilding_makefiles ? file_mtime_no_search (file) \
: file_mtime (file)) : file_mtime (file))
/* Duplicate the chain so we can remove things from it. */ /* Duplicate the chain so we can remove things from it. */
@@ -137,7 +134,7 @@ update_goal_chain (goals, makefiles)
unsigned int ocommands_started; unsigned int ocommands_started;
int x; int x;
check_renamed (file); check_renamed (file);
if (makefiles) if (rebuilding_makefiles)
{ {
if (file->cmd_target) if (file->cmd_target)
{ {
@@ -154,13 +151,14 @@ update_goal_chain (goals, makefiles)
actually run. */ actually run. */
ocommands_started = commands_started; ocommands_started = commands_started;
x = update_file (file, makefiles ? 1 : 0); x = update_file (file, rebuilding_makefiles ? 1 : 0);
check_renamed (file); check_renamed (file);
/* Set the goal's `changed' flag if any commands were started /* Set the goal's `changed' flag if any commands were started
by calling update_file above. We check this flag below to by calling update_file above. We check this flag below to
decide when to give an "up to date" diagnostic. */ decide when to give an "up to date" diagnostic. */
g->changed += commands_started - ocommands_started; if (commands_started > ocommands_started)
g->changed = 1;
/* If we updated a file and STATUS was not already 1, set it to /* If we updated a file and STATUS was not already 1, set it to
1 if updating failed, or to 0 if updating succeeded. Leave 1 if updating failed, or to 0 if updating succeeded. Leave
@@ -177,8 +175,8 @@ update_goal_chain (goals, makefiles)
/* If -q just triggered, stop immediately. It doesn't /* If -q just triggered, stop immediately. It doesn't
matter how much more we run, since we already know matter how much more we run, since we already know
the answer to return. */ the answer to return. */
stop = (!keep_going_flag && !question_flag stop = (question_flag && !keep_going_flag
&& !makefiles); && !rebuilding_makefiles);
} }
else else
{ {
@@ -194,10 +192,10 @@ update_goal_chain (goals, makefiles)
as a command-line target), don't change STATUS. as a command-line target), don't change STATUS.
If STATUS is changed, we will get re-exec'd, and If STATUS is changed, we will get re-exec'd, and
enter an infinite loop. */ enter an infinite loop. */
if (!makefiles if (!rebuilding_makefiles
|| (!just_print_flag && !question_flag)) || (!just_print_flag && !question_flag))
status = 0; status = 0;
if (makefiles && file->dontcare) if (rebuilding_makefiles && file->dontcare)
/* This is a default makefile; stop remaking. */ /* This is a default makefile; stop remaking. */
stop = 1; stop = 1;
} }
@@ -220,7 +218,7 @@ update_goal_chain (goals, makefiles)
/* If we have found nothing whatever to do for the goal, /* If we have found nothing whatever to do for the goal,
print a message saying nothing needs doing. */ print a message saying nothing needs doing. */
if (!makefiles if (!rebuilding_makefiles
/* If the update_status is zero, we updated successfully /* If the update_status is zero, we updated successfully
or not at all. G->changed will have been set above if or not at all. G->changed will have been set above if
any commands were actually started for this goal. */ any commands were actually started for this goal. */
@@ -259,13 +257,14 @@ update_goal_chain (goals, makefiles)
considered = !considered; considered = !considered;
} }
if (makefiles) if (rebuilding_makefiles)
{ {
touch_flag = t; touch_flag = t;
question_flag = q; question_flag = q;
just_print_flag = n; just_print_flag = n;
job_slots = j; job_slots = j;
} }
return status; return status;
} }
@@ -282,9 +281,7 @@ update_goal_chain (goals, makefiles)
each is considered in turn. */ each is considered in turn. */
static int static int
update_file (file, depth) update_file (struct file *file, unsigned int depth)
struct file *file;
unsigned int depth;
{ {
register int status = 0; register int status = 0;
register struct file *f; register struct file *f;
@@ -310,8 +307,12 @@ update_file (file, depth)
status |= update_file_1 (f, depth); status |= update_file_1 (f, depth);
check_renamed (f); check_renamed (f);
/* Clean up any alloca() used during the update. */
alloca (0);
/* If we got an error, don't bother with double_colon etc. */
if (status != 0 && !keep_going_flag) if (status != 0 && !keep_going_flag)
break; return status;
if (f->command_state == cs_running if (f->command_state == cs_running
|| f->command_state == cs_deps_running) || f->command_state == cs_deps_running)
@@ -325,25 +326,48 @@ update_file (file, depth)
/* Process the remaining rules in the double colon chain so they're marked /* Process the remaining rules in the double colon chain so they're marked
considered. Start their prerequisites, too. */ considered. Start their prerequisites, too. */
for (; f != 0 ; f = f->prev) if (file->double_colon)
{ for (; f != 0 ; f = f->prev)
struct dep *d; {
struct dep *d;
f->considered = considered; f->considered = considered;
for (d = f->deps; d != 0; d = d->next) for (d = f->deps; d != 0; d = d->next)
status |= update_file (d->file, depth + 1); status |= update_file (d->file, depth + 1);
} }
return status; return status;
} }
/* Show a message stating the target failed to build. */
static void
complain (const struct file *file)
{
const char *msg_noparent
= _("%sNo rule to make target `%s'%s");
const char *msg_parent
= _("%sNo rule to make target `%s', needed by `%s'%s");
if (!keep_going_flag)
{
if (file->parent == 0)
fatal (NILF, msg_noparent, "", file->name, "");
fatal (NILF, msg_parent, "", file->name, file->parent->name, "");
}
if (file->parent == 0)
error (NILF, msg_noparent, "*** ", file->name, ".");
else
error (NILF, msg_parent, "*** ", file->name, file->parent->name, ".");
}
/* Consider a single `struct file' and update it as appropriate. */ /* Consider a single `struct file' and update it as appropriate. */
static int static int
update_file_1 (file, depth) update_file_1 (struct file *file, unsigned int depth)
struct file *file;
unsigned int depth;
{ {
register FILE_TIMESTAMP this_mtime; register FILE_TIMESTAMP this_mtime;
int noexist, must_make, deps_changed; int noexist, must_make, deps_changed;
@@ -359,6 +383,17 @@ update_file_1 (file, depth)
{ {
DBF (DB_VERBOSE, DBF (DB_VERBOSE,
_("Recently tried and failed to update file `%s'.\n")); _("Recently tried and failed to update file `%s'.\n"));
/* If the file we tried to make is marked dontcare then no message
was printed about it when it failed during the makefile rebuild.
If we're trying to build it again in the normal rebuild, print a
message now. */
if (file->dontcare && !rebuilding_makefiles)
{
file->dontcare = 0;
complain (file);
}
return file->update_status; return file->update_status;
} }
@@ -437,6 +472,7 @@ update_file_1 (file, depth)
{ {
FILE_TIMESTAMP mtime; FILE_TIMESTAMP mtime;
int maybe_make; int maybe_make;
int dontcare = 0;
check_renamed (d->file); check_renamed (d->file);
@@ -460,7 +496,21 @@ update_file_1 (file, depth)
d->file->parent = file; d->file->parent = file;
maybe_make = must_make; maybe_make = must_make;
/* Inherit dontcare flag from our parent. */
if (rebuilding_makefiles)
{
dontcare = d->file->dontcare;
d->file->dontcare = file->dontcare;
}
dep_status |= check_dep (d->file, depth, this_mtime, &maybe_make); dep_status |= check_dep (d->file, depth, this_mtime, &maybe_make);
/* Restore original dontcare flag. */
if (rebuilding_makefiles)
d->file->dontcare = dontcare;
if (! d->ignore_mtime) if (! d->ignore_mtime)
must_make = maybe_make; must_make = maybe_make;
@@ -483,7 +533,12 @@ update_file_1 (file, depth)
break; break;
if (!running) if (!running)
d->changed = file_mtime (d->file) != mtime; /* The prereq is considered changed if the timestamp has changed while
it was built, OR it doesn't exist.
This causes the Linux kernel build to break. We'll defer this
fix until GNU make 3.82 to give them time to update. */
d->changed = ((file_mtime (d->file) != mtime)
/* || (mtime == NONEXISTENT_MTIME) */);
lastd = d; lastd = d;
d = d->next; d = d->next;
@@ -497,10 +552,26 @@ update_file_1 (file, depth)
for (d = file->deps; d != 0; d = d->next) for (d = file->deps; d != 0; d = d->next)
if (d->file->intermediate) if (d->file->intermediate)
{ {
int dontcare = 0;
FILE_TIMESTAMP mtime = file_mtime (d->file); FILE_TIMESTAMP mtime = file_mtime (d->file);
check_renamed (d->file); check_renamed (d->file);
d->file->parent = file; d->file->parent = file;
/* Inherit dontcare flag from our parent. */
if (rebuilding_makefiles)
{
dontcare = d->file->dontcare;
d->file->dontcare = file->dontcare;
}
dep_status |= update_file (d->file, depth); dep_status |= update_file (d->file, depth);
/* Restore original dontcare flag. */
if (rebuilding_makefiles)
d->file->dontcare = dontcare;
check_renamed (d->file); check_renamed (d->file);
{ {
@@ -722,8 +793,7 @@ update_file_1 (file, depth)
On return, FILE->update_status will no longer be -1 if it was. */ On return, FILE->update_status will no longer be -1 if it was. */
void void
notice_finished_file (file) notice_finished_file (struct file *file)
register struct file *file;
{ {
struct dep *d; struct dep *d;
int ran = file->command_state == cs_running; int ran = file->command_state == cs_running;
@@ -755,7 +825,8 @@ notice_finished_file (file)
have_nonrecursing: have_nonrecursing:
if (file->phony) if (file->phony)
file->update_status = 0; file->update_status = 0;
else /* According to POSIX, -t doesn't affect targets with no cmds. */
else if (file->cmds != 0)
{ {
/* Should set file's modification date and do nothing else. */ /* Should set file's modification date and do nothing else. */
file->update_status = touch_file (file); file->update_status = touch_file (file);
@@ -778,7 +849,6 @@ notice_finished_file (file)
if ((ran && !file->phony) || touched) if ((ran && !file->phony) || touched)
{ {
struct file *f;
int i = 0; int i = 0;
/* If -n, -t, or -q and all the commands are recursive, we ran them so /* If -n, -t, or -q and all the commands are recursive, we ran them so
@@ -798,11 +868,34 @@ notice_finished_file (file)
i = 1; i = 1;
file->last_mtime = i == 0 ? UNKNOWN_MTIME : NEW_MTIME; file->last_mtime = i == 0 ? UNKNOWN_MTIME : NEW_MTIME;
}
/* Propagate the change of modification time to all the double-colon if (file->double_colon)
entries for this file. */ {
for (f = file->double_colon; f != 0; f = f->prev) /* If this is a double colon rule and it is the last one to be
f->last_mtime = file->last_mtime; updated, propagate the change of modification time to all the
double-colon entries for this file.
We do it on the last update because it is important to handle
individual entries as separate rules with separate timestamps
while they are treated as targets and then as one rule with the
unified timestamp when they are considered as a prerequisite
of some target. */
struct file *f;
FILE_TIMESTAMP max_mtime = file->last_mtime;
/* Check that all rules were updated and at the same time find
the max timestamp. We assume UNKNOWN_MTIME is newer then
any other value. */
for (f = file->double_colon; f != 0 && f->updated; f = f->prev)
if (max_mtime != UNKNOWN_MTIME
&& (f->last_mtime == UNKNOWN_MTIME || f->last_mtime > max_mtime))
max_mtime = f->last_mtime;
if (f == 0)
for (f = file->double_colon; f != 0; f = f->prev)
f->last_mtime = max_mtime;
} }
if (ran && file->update_status != -1) if (ran && file->update_status != -1)
@@ -837,11 +930,8 @@ notice_finished_file (file)
Return nonzero if any updating failed. */ Return nonzero if any updating failed. */
static int static int
check_dep (file, depth, this_mtime, must_make_ptr) check_dep (struct file *file, unsigned int depth,
struct file *file; FILE_TIMESTAMP this_mtime, int *must_make_ptr)
unsigned int depth;
FILE_TIMESTAMP this_mtime;
int *must_make_ptr;
{ {
struct dep *d; struct dep *d;
int dep_status = 0; int dep_status = 0;
@@ -849,10 +939,10 @@ check_dep (file, depth, this_mtime, must_make_ptr)
++depth; ++depth;
start_updating (file); start_updating (file);
if (!file->intermediate) if (file->phony || !file->intermediate)
/* If this is a non-intermediate file, update it and record
whether it is newer than THIS_MTIME. */
{ {
/* If this is a non-intermediate file, update it and record
whether it is newer than THIS_MTIME. */
FILE_TIMESTAMP mtime; FILE_TIMESTAMP mtime;
dep_status = update_file (file, depth); dep_status = update_file (file, depth);
check_renamed (file); check_renamed (file);
@@ -908,13 +998,13 @@ check_dep (file, depth, this_mtime, must_make_ptr)
if (lastd == 0) if (lastd == 0)
{ {
file->deps = d->next; file->deps = d->next;
free ((char *) d); free_dep (d);
d = file->deps; d = file->deps;
} }
else else
{ {
lastd->next = d->next; lastd->next = d->next;
free ((char *) d); free_dep (d);
d = lastd->next; d = lastd->next;
} }
continue; continue;
@@ -952,8 +1042,7 @@ check_dep (file, depth, this_mtime, must_make_ptr)
#define TOUCH_ERROR(call) return (perror_with_name (call, file->name), 1) #define TOUCH_ERROR(call) return (perror_with_name (call, file->name), 1)
static int static int
touch_file (file) touch_file (struct file *file)
register struct file *file;
{ {
if (!silent_flag) if (!silent_flag)
message (0, "touch %s", file->name); message (0, "touch %s", file->name);
@@ -972,8 +1061,10 @@ touch_file (file)
{ {
struct stat statbuf; struct stat statbuf;
char buf; char buf;
int e;
if (fstat (fd, &statbuf) < 0) EINTRLOOP (e, fstat (fd, &statbuf));
if (e < 0)
TOUCH_ERROR ("touch: fstat: "); TOUCH_ERROR ("touch: fstat: ");
/* Rewrite character 0 same as it already is. */ /* Rewrite character 0 same as it already is. */
if (read (fd, &buf, 1) < 0) if (read (fd, &buf, 1) < 0)
@@ -1003,8 +1094,7 @@ touch_file (file)
Return the status from executing FILE's commands. */ Return the status from executing FILE's commands. */
static void static void
remake_file (file) remake_file (struct file *file)
struct file *file;
{ {
if (file->cmds == 0) if (file->cmds == 0)
{ {
@@ -1017,28 +1107,9 @@ remake_file (file)
file->update_status = 0; file->update_status = 0;
else else
{ {
const char *msg_noparent
= _("%sNo rule to make target `%s'%s");
const char *msg_parent
= _("%sNo rule to make target `%s', needed by `%s'%s");
/* This is a dependency file we cannot remake. Fail. */ /* This is a dependency file we cannot remake. Fail. */
if (!keep_going_flag && !file->dontcare) if (!rebuilding_makefiles || !file->dontcare)
{ complain (file);
if (file->parent == 0)
fatal (NILF, msg_noparent, "", file->name, "");
fatal (NILF, msg_parent, "", file->name, file->parent->name, "");
}
if (!file->dontcare)
{
if (file->parent == 0)
error (NILF, msg_noparent, "*** ", file->name, ".");
else
error (NILF, msg_parent, "*** ",
file->name, file->parent->name, ".");
}
file->update_status = 2; file->update_status = 2;
} }
} }
@@ -1070,9 +1141,7 @@ remake_file (file)
FILE. */ FILE. */
FILE_TIMESTAMP FILE_TIMESTAMP
f_mtime (file, search) f_mtime (struct file *file, int search)
register struct file *file;
int search;
{ {
FILE_TIMESTAMP mtime; FILE_TIMESTAMP mtime;
@@ -1183,62 +1252,71 @@ f_mtime (file, search)
rehash_file (file, name); rehash_file (file, name);
check_renamed (file); check_renamed (file);
mtime = name_mtime (name); /* If the result of a vpath search is -o or -W, preserve it.
Otherwise, find the mtime of the resulting file. */
if (mtime != OLD_MTIME && mtime != NEW_MTIME)
mtime = name_mtime (name);
} }
} }
} }
{ /* Files can have bogus timestamps that nothing newly made will be
/* Files can have bogus timestamps that nothing newly made will be "newer" than. Updating their dependents could just result in loops.
"newer" than. Updating their dependents could just result in loops. So notify the user of the anomaly with a warning.
So notify the user of the anomaly with a warning.
We only need to do this once, for now. */ We only need to do this once, for now. */
if (!clock_skew_detected if (!clock_skew_detected
&& mtime != NONEXISTENT_MTIME && mtime != NONEXISTENT_MTIME && mtime != NEW_MTIME
&& !file->updated) && !file->updated)
{ {
static FILE_TIMESTAMP adjusted_now; static FILE_TIMESTAMP adjusted_now;
FILE_TIMESTAMP adjusted_mtime = mtime; FILE_TIMESTAMP adjusted_mtime = mtime;
#if defined(WINDOWS32) || defined(__MSDOS__) #if defined(WINDOWS32) || defined(__MSDOS__)
/* Experimentation has shown that FAT filesystems can set file times /* Experimentation has shown that FAT filesystems can set file times
up to 3 seconds into the future! Play it safe. */ up to 3 seconds into the future! Play it safe. */
#define FAT_ADJ_OFFSET (FILE_TIMESTAMP) 3 #define FAT_ADJ_OFFSET (FILE_TIMESTAMP) 3
FILE_TIMESTAMP adjustment = FAT_ADJ_OFFSET << FILE_TIMESTAMP_LO_BITS; FILE_TIMESTAMP adjustment = FAT_ADJ_OFFSET << FILE_TIMESTAMP_LO_BITS;
if (ORDINARY_MTIME_MIN + adjustment <= adjusted_mtime) if (ORDINARY_MTIME_MIN + adjustment <= adjusted_mtime)
adjusted_mtime -= adjustment; adjusted_mtime -= adjustment;
#elif defined(__EMX__)
/* FAT filesystems round time to the nearest even second!
Allow for any file (NTFS or FAT) to perhaps suffer from this
brain damage. */
FILE_TIMESTAMP adjustment = (((FILE_TIMESTAMP_S (adjusted_mtime) & 1) == 0
&& FILE_TIMESTAMP_NS (adjusted_mtime) == 0)
? (FILE_TIMESTAMP) 1 << FILE_TIMESTAMP_LO_BITS
: 0);
#endif #endif
/* If the file's time appears to be in the future, update our /* If the file's time appears to be in the future, update our
concept of the present and try once more. */ concept of the present and try once more. */
if (adjusted_now < adjusted_mtime) if (adjusted_now < adjusted_mtime)
{ {
int resolution; int resolution;
FILE_TIMESTAMP now = file_timestamp_now (&resolution); FILE_TIMESTAMP now = file_timestamp_now (&resolution);
adjusted_now = now + (resolution - 1); adjusted_now = now + (resolution - 1);
if (adjusted_now < adjusted_mtime) if (adjusted_now < adjusted_mtime)
{ {
#ifdef NO_FLOAT #ifdef NO_FLOAT
error (NILF, _("Warning: File `%s' has modification time in the future"), error (NILF, _("Warning: File `%s' has modification time in the future"),
file->name); file->name);
#else #else
double from_now = double from_now =
(FILE_TIMESTAMP_S (mtime) - FILE_TIMESTAMP_S (now) (FILE_TIMESTAMP_S (mtime) - FILE_TIMESTAMP_S (now)
+ ((FILE_TIMESTAMP_NS (mtime) - FILE_TIMESTAMP_NS (now)) + ((FILE_TIMESTAMP_NS (mtime) - FILE_TIMESTAMP_NS (now))
/ 1e9)); / 1e9));
error (NILF, _("Warning: File `%s' has modification time %.2g s in the future"), error (NILF, _("Warning: File `%s' has modification time %.2g s in the future"),
file->name, from_now); file->name, from_now);
#endif #endif
clock_skew_detected = 1; clock_skew_detected = 1;
} }
} }
} }
}
/* Store the mtime into all the entries for this file. */ /* Store the mtime into all the entries for this file. */
if (file->double_colon) if (file->double_colon)
@@ -1267,20 +1345,100 @@ f_mtime (file, search)
/* Return the mtime of the file or archive-member reference NAME. */ /* Return the mtime of the file or archive-member reference NAME. */
static FILE_TIMESTAMP /* First, we check with stat(). If the file does not exist, then we return
name_mtime (name) NONEXISTENT_MTIME. If it does, and the symlink check flag is set, then
register char *name; examine each indirection of the symlink and find the newest mtime.
{ This causes one duplicate stat() when -L is being used, but the code is
struct stat st; much cleaner. */
if (stat (name, &st) != 0) static FILE_TIMESTAMP
name_mtime (char *name)
{
FILE_TIMESTAMP mtime;
struct stat st;
int e;
EINTRLOOP (e, stat (name, &st));
if (e == 0)
mtime = FILE_TIMESTAMP_STAT_MODTIME (name, st);
else if (errno == ENOENT || errno == ENOTDIR)
mtime = NONEXISTENT_MTIME;
else
{ {
if (errno != ENOENT && errno != ENOTDIR) perror_with_name ("stat: ", name);
perror_with_name ("stat:", name);
return NONEXISTENT_MTIME; return NONEXISTENT_MTIME;
} }
return FILE_TIMESTAMP_STAT_MODTIME (name, st); /* If we get here we either found it, or it doesn't exist.
If it doesn't exist see if we can use a symlink mtime instead. */
#ifdef MAKE_SYMLINKS
#ifndef S_ISLNK
# define S_ISLNK(_m) (((_m)&S_IFMT)==S_IFLNK)
#endif
if (check_symlink_flag)
{
PATH_VAR (lpath);
/* Check each symbolic link segment (if any). Find the latest mtime
amongst all of them (and the target file of course).
Note that we have already successfully dereferenced all the links
above. So, if we run into any error trying to lstat(), or
readlink(), or whatever, something bizarre-o happened. Just give up
and use whatever mtime we've already computed at that point. */
strcpy (lpath, name);
while (1)
{
FILE_TIMESTAMP ltime;
PATH_VAR (lbuf);
long llen;
char *p;
EINTRLOOP (e, lstat (lpath, &st));
if (e)
{
/* Just take what we have so far. */
if (errno != ENOENT && errno != ENOTDIR)
perror_with_name ("lstat: ", lpath);
break;
}
/* If this is not a symlink, we're done (we started with the real
file's mtime so we don't need to test it again). */
if (!S_ISLNK (st.st_mode))
break;
/* If this mtime is newer than what we had, keep the new one. */
ltime = FILE_TIMESTAMP_STAT_MODTIME (lpath, st);
if (ltime > mtime)
mtime = ltime;
/* Set up to check the file pointed to by this link. */
EINTRLOOP (llen, readlink (lpath, lbuf, GET_PATH_MAX));
if (llen < 0)
{
/* Eh? Just take what we have. */
perror_with_name ("readlink: ", lpath);
break;
}
lbuf[llen] = '\0';
/* If the target is fully-qualified or the source is just a
filename, then the new path is the target. Otherwise it's the
source directory plus the target. */
if (lbuf[0] == '/' || (p = strrchr (lpath, '/')) == NULL)
strcpy (lpath, lbuf);
else if ((p - lpath) + llen + 2 > GET_PATH_MAX)
/* Eh? Path too long! Again, just go with what we have. */
break;
else
/* Create the next step in the symlink chain. */
strcpy (p+1, lbuf);
}
}
#endif
return mtime;
} }
@@ -1289,9 +1447,7 @@ name_mtime (name)
directories. */ directories. */
static int static int
library_search (lib, mtime_ptr) library_search (char **lib, FILE_TIMESTAMP *mtime_ptr)
char **lib;
FILE_TIMESTAMP *mtime_ptr;
{ {
static char *dirs[] = static char *dirs[] =
{ {
@@ -1337,7 +1493,7 @@ library_search (lib, mtime_ptr)
while ((p = find_next_token (&p2, &len)) != 0) while ((p = find_next_token (&p2, &len)) != 0)
{ {
static char *buf = NULL; static char *buf = NULL;
static int buflen = 0; static unsigned int buflen = 0;
static int libdir_maxlen = -1; static int libdir_maxlen = -1;
char *libbuf = variable_expand (""); char *libbuf = variable_expand ("");

View File

@@ -3,23 +3,22 @@
Please do not send bug reports or questions about it to Please do not send bug reports or questions about it to
the Make maintainers. the Make maintainers.
Copyright (C) 1988, 1989, 1992, 1993 Free Software Foundation, Inc. Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
This file is part of GNU Make. This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify GNU Make is free software; you can redistribute it and/or modify it under the
it under the terms of the GNU General Public License as published by terms of the GNU General Public License as published by the Free Software
the Free Software Foundation; either version 2, or (at your option) Foundation; either version 2, or (at your option) any later version.
any later version.
GNU Make is distributed in the hope that it will be useful, GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
but WITHOUT ANY WARRANTY; without even the implied warranty of WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the A PARTICULAR PURPOSE. See the GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License along with
along with GNU Make; see the file COPYING. If not, write to GNU Make; see the file COPYING. If not, write to the Free Software
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
Boston, MA 02111-1307, USA. */
#include "make.h" #include "make.h"
#include "job.h" #include "job.h"
@@ -48,22 +47,21 @@ static char *normalized_cwd;
/* Call once at startup even if no commands are run. */ /* Call once at startup even if no commands are run. */
void void
remote_setup () remote_setup (void)
{ {
} }
/* Called before exit. */ /* Called before exit. */
void void
remote_cleanup () remote_cleanup (void)
{ {
} }
/* Return nonzero if the next job should be done remotely. */ /* Return nonzero if the next job should be done remotely. */
int int
start_remote_job_p (first_p) start_remote_job_p (int first_p)
int first_p;
{ {
static int inited = 0; static int inited = 0;
int status; int status;
@@ -140,12 +138,8 @@ start_remote_job_p (first_p)
if it is local (meaning *ID_PTR is a process ID). */ if it is local (meaning *ID_PTR is a process ID). */
int int
start_remote_job (argv, envp, stdin_fd, is_remote, id_ptr, used_stdin) start_remote_job (char **argv, char **envp, int stdin_fd,
char **argv, **envp; int *is_remote, int *id_ptr, int *used_stdin)
int stdin_fd;
int *is_remote;
int *id_ptr;
int *used_stdin;
{ {
char waybill[MAX_DATA_SIZE], msg[128]; char waybill[MAX_DATA_SIZE], msg[128];
struct hostent *host; struct hostent *host;
@@ -275,9 +269,8 @@ start_remote_job (argv, envp, stdin_fd, is_remote, id_ptr, used_stdin)
0 if we would have to block and !BLOCK, or < 0 if there were none. */ 0 if we would have to block and !BLOCK, or < 0 if there were none. */
int int
remote_status (exit_code_ptr, signal_ptr, coredump_ptr, block) remote_status (int *exit_code_ptr, int *signal_ptr, int *coredump_ptr,
int *exit_code_ptr, *signal_ptr, *coredump_ptr; int block)
int block;
{ {
return -1; return -1;
} }
@@ -286,7 +279,7 @@ remote_status (exit_code_ptr, signal_ptr, coredump_ptr, block)
If this notification is done by raising the child termination If this notification is done by raising the child termination
signal, do not block that signal. */ signal, do not block that signal. */
void void
block_remote_children () block_remote_children (void)
{ {
return; return;
} }
@@ -295,16 +288,14 @@ block_remote_children ()
If this is done by raising the child termination signal, If this is done by raising the child termination signal,
do not unblock that signal. */ do not unblock that signal. */
void void
unblock_remote_children () unblock_remote_children (void)
{ {
return; return;
} }
/* Send signal SIG to child ID. Return 0 if successful, -1 if not. */ /* Send signal SIG to child ID. Return 0 if successful, -1 if not. */
int int
remote_kill (id, sig) remote_kill (int id, int sig)
int id;
int sig;
{ {
return -1; return -1;
} }

View File

@@ -1,21 +1,20 @@
/* Template for the remote job exportation interface to GNU Make. /* Template for the remote job exportation interface to GNU Make.
Copyright (C) 1988, 1989, 1992, 1993, 1996 Free Software Foundation, Inc. Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
This file is part of GNU Make. This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify GNU Make is free software; you can redistribute it and/or modify it under the
it under the terms of the GNU General Public License as published by terms of the GNU General Public License as published by the Free Software
the Free Software Foundation; either version 2, or (at your option) Foundation; either version 2, or (at your option) any later version.
any later version.
GNU Make is distributed in the hope that it will be useful, GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
but WITHOUT ANY WARRANTY; without even the implied warranty of WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the A PARTICULAR PURPOSE. See the GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License along with
along with GNU Make; see the file COPYING. If not, write to GNU Make; see the file COPYING. If not, write to the Free Software
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
Boston, MA 02111-1307, USA. */
#include "make.h" #include "make.h"
#include "filedef.h" #include "filedef.h"
@@ -28,22 +27,21 @@ char *remote_description = 0;
/* Call once at startup even if no commands are run. */ /* Call once at startup even if no commands are run. */
void void
remote_setup () remote_setup (void)
{ {
} }
/* Called before exit. */ /* Called before exit. */
void void
remote_cleanup () remote_cleanup (void)
{ {
} }
/* Return nonzero if the next job should be done remotely. */ /* Return nonzero if the next job should be done remotely. */
int int
start_remote_job_p (first_p) start_remote_job_p (int first_p UNUSED)
int first_p;
{ {
return 0; return 0;
} }
@@ -56,12 +54,9 @@ start_remote_job_p (first_p)
nonzero if it is remote (meaning *ID_PTR is a process ID). */ nonzero if it is remote (meaning *ID_PTR is a process ID). */
int int
start_remote_job (argv, envp, stdin_fd, is_remote, id_ptr, used_stdin) start_remote_job (char **argv UNUSED, char **envp UNUSED, int stdin_fd UNUSED,
char **argv, **envp; int *is_remote UNUSED, int *id_ptr UNUSED,
int stdin_fd; int *used_stdin UNUSED)
int *is_remote;
int *id_ptr;
int *used_stdin;
{ {
return -1; return -1;
} }
@@ -73,9 +68,8 @@ start_remote_job (argv, envp, stdin_fd, is_remote, id_ptr, used_stdin)
0 if we would have to block and !BLOCK, or < 0 if there were none. */ 0 if we would have to block and !BLOCK, or < 0 if there were none. */
int int
remote_status (exit_code_ptr, signal_ptr, coredump_ptr, block) remote_status (int *exit_code_ptr UNUSED, int *signal_ptr UNUSED,
int *exit_code_ptr, *signal_ptr, *coredump_ptr; int *coredump_ptr UNUSED, int block UNUSED)
int block;
{ {
errno = ECHILD; errno = ECHILD;
return -1; return -1;
@@ -85,7 +79,7 @@ remote_status (exit_code_ptr, signal_ptr, coredump_ptr, block)
If this notification is done by raising the child termination If this notification is done by raising the child termination
signal, do not block that signal. */ signal, do not block that signal. */
void void
block_remote_children () block_remote_children (void)
{ {
return; return;
} }
@@ -94,16 +88,14 @@ block_remote_children ()
If this is done by raising the child termination signal, If this is done by raising the child termination signal,
do not unblock that signal. */ do not unblock that signal. */
void void
unblock_remote_children () unblock_remote_children (void)
{ {
return; return;
} }
/* Send signal SIG to child ID. Return 0 if successful, -1 if not. */ /* Send signal SIG to child ID. Return 0 if successful, -1 if not. */
int int
remote_kill (id, sig) remote_kill (int id UNUSED, int sig UNUSED)
int id;
int sig;
{ {
return -1; return -1;
} }

189
rule.c
View File

@@ -1,21 +1,20 @@
/* Pattern and suffix rule internals for GNU Make. /* Pattern and suffix rule internals for GNU Make.
Copyright (C) 1988,89,90,91,92,93, 1998 Free Software Foundation, Inc. Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
This file is part of GNU Make. This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify GNU Make is free software; you can redistribute it and/or modify it under the
it under the terms of the GNU General Public License as published by terms of the GNU General Public License as published by the Free Software
the Free Software Foundation; either version 2, or (at your option) Foundation; either version 2, or (at your option) any later version.
any later version.
GNU Make is distributed in the hope that it will be useful, GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
but WITHOUT ANY WARRANTY; without even the implied warranty of WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the A PARTICULAR PURPOSE. See the GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License along with
along with GNU Make; see the file COPYING. If not, write to GNU Make; see the file COPYING. If not, write to the Free Software
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
Boston, MA 02111-1307, USA. */
#include "make.h" #include "make.h"
#include "dep.h" #include "dep.h"
@@ -51,14 +50,6 @@ unsigned int max_pattern_deps;
unsigned int max_pattern_dep_length; unsigned int max_pattern_dep_length;
/* Chain of all pattern-specific variables. */
static struct pattern_var *pattern_vars;
/* Pointer to last struct in the chain, so we can add onto the end. */
static struct pattern_var *last_pattern_var;
/* Pointer to structure for the file .SUFFIXES /* Pointer to structure for the file .SUFFIXES
whose dependencies are the suffixes to be searched. */ whose dependencies are the suffixes to be searched. */
@@ -74,10 +65,10 @@ unsigned int maxsuffix;
completely when appropriate. */ completely when appropriate. */
void void
count_implicit_rule_limits () count_implicit_rule_limits (void)
{ {
char *name; char *name;
unsigned int namelen; int namelen;
register struct rule *rule, *lastrule; register struct rule *rule, *lastrule;
num_pattern_rules = max_pattern_targets = max_pattern_deps = 0; num_pattern_rules = max_pattern_targets = max_pattern_deps = 0;
@@ -143,20 +134,6 @@ count_implicit_rule_limits ()
nonexistent subdirectory. */ nonexistent subdirectory. */
dep->changed = !dir_file_exists_p (name, ""); dep->changed = !dir_file_exists_p (name, "");
#ifdef VMS
if (dep->changed && strchr (name, ':') != 0)
#else
if (dep->changed && *name == '/')
#endif
{
/* The name is absolute and the directory does not exist.
This rule can never possibly match, since this dependency
can never possibly exist. So just remove the rule from
the list. */
freerule (rule, lastrule);
--num_pattern_rules;
goto end_main_loop;
}
} }
else else
/* This dependency does not reside in a subdirectory. */ /* This dependency does not reside in a subdirectory. */
@@ -167,7 +144,6 @@ count_implicit_rule_limits ()
max_pattern_deps = ndeps; max_pattern_deps = ndeps;
lastrule = rule; lastrule = rule;
end_main_loop:
rule = next; rule = next;
} }
@@ -182,9 +158,7 @@ count_implicit_rule_limits ()
If SOURCE is nil, it means there should be no deps. */ If SOURCE is nil, it means there should be no deps. */
static void static void
convert_suffix_rule (target, source, cmds) convert_suffix_rule (char *target, char *source, struct commands *cmds)
char *target, *source;
struct commands *cmds;
{ {
char *targname, *targpercent, *depname; char *targname, *targpercent, *depname;
char **names, **percents; char **names, **percents;
@@ -227,10 +201,8 @@ convert_suffix_rule (target, source, cmds)
depname = xmalloc (1 + len + 1); depname = xmalloc (1 + len + 1);
depname[0] = '%'; depname[0] = '%';
bcopy (source, depname + 1, len + 1); bcopy (source, depname + 1, len + 1);
deps = (struct dep *) xmalloc (sizeof (struct dep)); deps = alloc_dep ();
deps->next = 0;
deps->name = depname; deps->name = depname;
deps->ignore_mtime = 0;
} }
create_pattern_rule (names, percents, 0, deps, cmds, 0); create_pattern_rule (names, percents, 0, deps, cmds, 0);
@@ -241,7 +213,7 @@ convert_suffix_rule (target, source, cmds)
are converted and added to the chain of pattern rules. */ are converted and added to the chain of pattern rules. */
void void
convert_to_pattern () convert_to_pattern (void)
{ {
register struct dep *d, *d2; register struct dep *d, *d2;
register struct file *f; register struct file *f;
@@ -310,9 +282,7 @@ convert_to_pattern ()
list. Return nonzero if RULE is used; zero if not. */ list. Return nonzero if RULE is used; zero if not. */
int int
new_pattern_rule (rule, override) new_pattern_rule (struct rule *rule, int override)
register struct rule *rule;
int override;
{ {
register struct rule *r, *lastrule; register struct rule *r, *lastrule;
register unsigned int i, j; register unsigned int i, j;
@@ -387,9 +357,7 @@ new_pattern_rule (rule, override)
TERMINAL specifies what the `terminal' field of the rule should be. */ TERMINAL specifies what the `terminal' field of the rule should be. */
void void
install_pattern_rule (p, terminal) install_pattern_rule (struct pspec *p, int terminal)
struct pspec *p;
int terminal;
{ {
register struct rule *r; register struct rule *r;
char *ptr; char *ptr;
@@ -439,8 +407,7 @@ install_pattern_rule (p, terminal)
points to RULE. */ points to RULE. */
static void static void
freerule (rule, lastrule) freerule (struct rule *rule, struct rule *lastrule)
register struct rule *rule, *lastrule;
{ {
struct rule *next = rule->next; struct rule *next = rule->next;
register unsigned int i; register unsigned int i;
@@ -457,7 +424,8 @@ freerule (rule, lastrule)
t = dep->next; t = dep->next;
/* We might leak dep->name here, but I'm not sure how to fix this: I /* We might leak dep->name here, but I'm not sure how to fix this: I
think that pointer might be shared (e.g., in the file hash?) */ think that pointer might be shared (e.g., in the file hash?) */
free ((char *) dep); dep->name = 0; /* Make sure free_dep does not free name. */
free_dep (dep);
dep = t; dep = t;
} }
@@ -501,16 +469,12 @@ freerule (rule, lastrule)
it may be freed. */ it may be freed. */
void void
create_pattern_rule (targets, target_percents, create_pattern_rule (char **targets, char **target_percents,
terminal, deps, commands, override) int terminal, struct dep *deps,
char **targets, **target_percents; struct commands *commands, int override)
int terminal;
struct dep *deps;
struct commands *commands;
int override;
{ {
register struct rule *r = (struct rule *) xmalloc (sizeof (struct rule)); unsigned int max_targets, i;
register unsigned int max_targets, i; struct rule *r = (struct rule *) xmalloc (sizeof (struct rule));
r->cmds = commands; r->cmds = commands;
r->deps = deps; r->deps = deps;
@@ -548,83 +512,10 @@ create_pattern_rule (targets, target_percents,
r->terminal = terminal; r->terminal = terminal;
} }
/* Create a new pattern-specific variable struct. */
struct pattern_var *
create_pattern_var (target, suffix)
char *target, *suffix;
{
register struct pattern_var *p = 0;
unsigned int len = strlen(target);
/* Look to see if this pattern already exists in the list. */
for (p = pattern_vars; p != NULL; p = p->next)
if (p->len == len && !strcmp(p->target, target))
break;
if (p == 0)
{
p = (struct pattern_var *) xmalloc (sizeof (struct pattern_var));
if (last_pattern_var != 0)
last_pattern_var->next = p;
else
pattern_vars = p;
last_pattern_var = p;
p->next = 0;
p->target = target;
p->len = len;
p->suffix = suffix + 1;
p->vars = create_new_variable_set();
}
return p;
}
/* Look up a target in the pattern-specific variable list. */
struct pattern_var *
lookup_pattern_var (target)
char *target;
{
struct pattern_var *p;
unsigned int targlen = strlen(target);
for (p = pattern_vars; p != 0; p = p->next)
{
char *stem;
unsigned int stemlen;
if (p->len > targlen)
/* It can't possibly match. */
continue;
/* From the lengths of the filename and the pattern parts,
find the stem: the part of the filename that matches the %. */
stem = target + (p->suffix - p->target - 1);
stemlen = targlen - p->len + 1;
/* Compare the text in the pattern before the stem, if any. */
if (stem > target && !strneq (p->target, target, stem - target))
continue;
/* Compare the text in the pattern after the stem, if any.
We could test simply using streq, but this way we compare the
first two characters immediately. This saves time in the very
common case where the first character matches because it is a
period. */
if (*p->suffix == stem[stemlen]
&& (*p->suffix == '\0' || streq (&p->suffix[1], &stem[stemlen+1])))
break;
}
return p;
}
/* Print the data base of rules. */ /* Print the data base of rules. */
static void /* Useful to call from gdb. */ static void /* Useful to call from gdb. */
print_rule (r) print_rule (struct rule *r)
struct rule *r;
{ {
register unsigned int i; register unsigned int i;
register struct dep *d; register struct dep *d;
@@ -649,7 +540,7 @@ print_rule (r)
} }
void void
print_rule_data_base () print_rule_data_base (void)
{ {
register unsigned int rules, terminal; register unsigned int rules, terminal;
register struct rule *r; register struct rule *r;
@@ -692,26 +583,4 @@ print_rule_data_base ()
fatal (NILF, _("BUG: num_pattern_rules wrong! %u != %u"), fatal (NILF, _("BUG: num_pattern_rules wrong! %u != %u"),
num_pattern_rules, rules); num_pattern_rules, rules);
} }
puts (_("\n# Pattern-specific variable values"));
{
struct pattern_var *p;
rules = 0;
for (p = pattern_vars; p != 0; p = p->next)
{
++rules;
printf ("\n%s :\n", p->target);
print_variable_set (p->vars->set, "# ");
}
if (rules == 0)
puts (_("\n# No pattern-specific variable values."));
else
{
printf (_("\n# %u pattern-specific variable values"), rules);
}
}
} }

36
rule.h
View File

@@ -1,21 +1,20 @@
/* Definitions for using pattern rules in GNU Make. /* Definitions for using pattern rules in GNU Make.
Copyright (C) 1988, 1989, 1991, 1992, 1993 Free Software Foundation, Inc. Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
Foundation, Inc.
This file is part of GNU Make. This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify GNU Make is free software; you can redistribute it and/or modify it under the
it under the terms of the GNU General Public License as published by terms of the GNU General Public License as published by the Free Software
the Free Software Foundation; either version 2, or (at your option) Foundation; either version 2, or (at your option) any later version.
any later version.
GNU Make is distributed in the hope that it will be useful, GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
but WITHOUT ANY WARRANTY; without even the implied warranty of WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the A PARTICULAR PURPOSE. See the GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License along with
along with GNU Make; see the file COPYING. If not, write to GNU Make; see the file COPYING. If not, write to the Free Software
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
Boston, MA 02111-1307, USA. */
/* Structure used for pattern rules. */ /* Structure used for pattern rules. */
@@ -31,15 +30,6 @@ struct rule
char in_use; /* If in use by a parent pattern_search. */ char in_use; /* If in use by a parent pattern_search. */
}; };
struct pattern_var
{
struct pattern_var *next;
char *target;
unsigned int len;
char *suffix;
struct variable_set_list *vars;
};
/* For calling install_pattern_rule. */ /* For calling install_pattern_rule. */
struct pspec struct pspec
{ {
@@ -61,8 +51,6 @@ extern unsigned int maxsuffix;
extern void install_pattern_rule PARAMS ((struct pspec *p, int terminal)); extern void install_pattern_rule PARAMS ((struct pspec *p, int terminal));
extern int new_pattern_rule PARAMS ((struct rule *rule, int override)); extern int new_pattern_rule PARAMS ((struct rule *rule, int override));
extern struct pattern_var *create_pattern_var PARAMS ((char *target, char *suffix));
extern struct pattern_var *lookup_pattern_var PARAMS ((char *target));
extern void count_implicit_rule_limits PARAMS ((void)); extern void count_implicit_rule_limits PARAMS ((void));
extern void convert_to_pattern PARAMS ((void)); extern void convert_to_pattern PARAMS ((void));
extern void create_pattern_rule PARAMS ((char **targets, extern void create_pattern_rule PARAMS ((char **targets,

View File

@@ -1,33 +1,31 @@
/* Convert between signal names and numbers. /* Convert between signal names and numbers.
Copyright (C) 1990,92,93,95,96,99, 2002 Free Software Foundation, Inc. Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
This file was part of the GNU C Library, but is now part of GNU make. 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify GNU Make is free software; you can redistribute it and/or modify it under the
it under the terms of the GNU General Public License as published by terms of the GNU General Public License as published by the Free Software
the Free Software Foundation; either version 2, or (at your option) Foundation; either version 2, or (at your option) any later version.
any later version.
GNU Make is distributed in the hope that it will be useful, GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
but WITHOUT ANY WARRANTY; without even the implied warranty of WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the A PARTICULAR PURPOSE. See the GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License along with
along with GNU Make; see the file COPYING. If not, write to GNU Make; see the file COPYING. If not, write to the Free Software
the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
Boston, MA 02111-1307, USA. */
#include "make.h" #include "make.h"
/* If the system provides strsignal, we don't need it. */ /* If the system provides strsignal, we don't need it. */
#if !defined(HAVE_STRSIGNAL) #if !HAVE_STRSIGNAL
/* If the system provides sys_siglist, we'll use that. /* If the system provides sys_siglist, we'll use that.
Otherwise create our own. Otherwise create our own.
*/ */
#if !defined(SYS_SIGLIST_DECLARED) #if !HAVE_DECL_SYS_SIGLIST
/* Some systems do not define NSIG in <signal.h>. */ /* Some systems do not define NSIG in <signal.h>. */
#ifndef NSIG #ifndef NSIG
@@ -63,10 +61,7 @@ static int sig_table_nelts = 0;
/* Enter signal number NUMBER into the tables with ABBREV and NAME. */ /* Enter signal number NUMBER into the tables with ABBREV and NAME. */
static void static void
init_sig (number, abbrev, name) init_sig (int number, const char *abbrev, const char *name)
int number;
const char *abbrev;
const char *name;
{ {
/* If this value is ever greater than NSIG it seems like it'd be a bug in /* If this value is ever greater than NSIG it seems like it'd be a bug in
the system headers, but... better safe than sorry. We know, for the system headers, but... better safe than sorry. We know, for
@@ -83,7 +78,7 @@ init_sig (number, abbrev, name)
} }
static int static int
signame_init () signame_init (void)
{ {
int i; int i;
@@ -229,20 +224,25 @@ signame_init ()
return 1; return 1;
} }
#endif /* SYS_SIGLIST_DECLARED */ #endif /* HAVE_DECL_SYS_SIGLIST */
char * char *
strsignal (signal) strsignal (int signal)
int signal;
{ {
static char buf[] = "Signal 12345678901234567890"; static char buf[] = "Signal 12345678901234567890";
#if !defined(SYS_SIGLIST_DECLARED) #if ! HAVE_DECL_SYS_SIGLIST
# if HAVE_DECL__SYS_SIGLIST
# define sys_siglist _sys_siglist
# elif HAVE_DECL___SYS_SIGLIST
# define sys_siglist __sys_siglist
# else
static char sig_initted = 0; static char sig_initted = 0;
if (!sig_initted) if (!sig_initted)
sig_initted = signame_init (); sig_initted = signame_init ();
# endif
#endif #endif
if (signal > 0 || signal < NSIG) if (signal > 0 || signal < NSIG)

216
strcache.c Normal file
View File

@@ -0,0 +1,216 @@
/* Constant string caching for GNU Make.
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
GNU Make; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */
#include "make.h"
#include <assert.h>
#include "hash.h"
/* The size (in bytes) of each cache buffer. */
#define CACHE_BUFFER_SIZE (4096)
/* A string cached here will never be freed, so we don't need to worry about
reference counting. We just store the string, and then remember it in a
hash so it can be looked up again. */
struct strcache {
struct strcache *next; /* The next block of strings. */
char *end; /* Pointer to the beginning of the free space. */
int count; /* # of strings in this buffer (for stats). */
int bytesfree; /* The amount of the buffer that is free. */
char buffer[1]; /* The buffer comes after this. */
};
static int bufsize = CACHE_BUFFER_SIZE;
static struct strcache *strcache = NULL;
static struct strcache *
new_cache()
{
struct strcache *new;
new = (struct strcache *) xmalloc (sizeof (*new) + bufsize);
new->end = new->buffer;
new->count = 0;
new->bytesfree = bufsize;
new->next = strcache;
strcache = new;
return new;
}
static const char *
add_string(const char *str, int len)
{
struct strcache *best = NULL;
struct strcache *sp;
const char *res;
/* If the string we want is too large to fit into a single buffer, then we're
screwed; nothing will ever fit! Change the maximum size of the cache to
be big enough. */
if (len > bufsize)
bufsize = len * 2;
/* First, find a cache with enough free space. We always look through all
the blocks and choose the one with the best fit (the one that leaves the
least amount of space free). */
for (sp = strcache; sp != NULL; sp = sp->next)
if (sp->bytesfree > len && (!best || best->bytesfree > sp->bytesfree))
best = sp;
/* If nothing is big enough, make a new cache. */
if (!best)
best = new_cache();
assert (best->bytesfree > len);
/* Add the string to the best cache. */
res = best->end;
memcpy (best->end, str, len);
best->end += len;
*(best->end++) = '\0';
best->bytesfree -= len + 1;
++best->count;
return res;
}
/* Hash table of strings in the cache. */
static unsigned long
str_hash_1 (const void *key)
{
return_ISTRING_HASH_1 ((const char *) key);
}
static unsigned long
str_hash_2 (const void *key)
{
return_ISTRING_HASH_2 ((const char *) key);
}
static int
str_hash_cmp (const void *x, const void *y)
{
return_ISTRING_COMPARE ((const char *) x, (const char *) y);
}
static struct hash_table strings;
static const char *
add_hash (const char *str, int len)
{
/* Look up the string in the hash. If it's there, return it. */
char **slot = (char **) hash_find_slot (&strings, str);
const char *key = *slot;
if (!HASH_VACANT (key))
return key;
/* Not there yet so add it to a buffer, then into the hash table. */
key = add_string (str, len);
hash_insert_at (&strings, key, slot);
return key;
}
/* Returns true if the string is in the cache; false if not. */
int
strcache_iscached (const char *str)
{
struct strcache *sp;
for (sp = strcache; sp != 0; sp = sp->next)
if (str >= sp->buffer && str < sp->end)
return 1;
return 0;
}
/* If the string is already in the cache, return a pointer to the cached
version. If not, add it then return a pointer to the cached version.
Note we do NOT take control of the string passed in. */
const char *
strcache_add (const char *str)
{
return add_hash (str, strlen (str));
}
const char *
strcache_add_len (const char *str, int len)
{
char *key = alloca (len + 1);
memcpy (key, str, len);
key[len] = '\0';
return add_hash (key, len);
}
int
strcache_setbufsize(int size)
{
if (size > bufsize)
bufsize = size;
return bufsize;
}
void
strcache_init (void)
{
hash_init (&strings, 1000, str_hash_1, str_hash_2, str_hash_cmp);
}
/* Generate some stats output. */
void
strcache_print_stats (const char *prefix)
{
int numbuffs = 0, numstrs = 0;
int totsize = 0, avgsize, maxsize = 0, minsize = bufsize;
int totfree = 0, avgfree, maxfree = 0, minfree = bufsize;
const struct strcache *sp;
for (sp = strcache; sp != NULL; sp = sp->next)
{
int bf = sp->bytesfree;
int sz = (sp->end - sp->buffer) + bf;
++numbuffs;
numstrs += sp->count;
totsize += sz;
maxsize = (sz > maxsize ? sz : maxsize);
minsize = (sz < minsize ? sz : minsize);
totfree += bf;
maxfree = (bf > maxfree ? bf : maxfree);
minfree = (bf < minfree ? bf : minfree);
}
avgsize = numbuffs ? (int)(totsize / numbuffs) : 0;
avgfree = numbuffs ? (int)(totfree / numbuffs) : 0;
printf (_("\n%s # of strings in strcache: %d\n"), prefix, numstrs);
printf (_("%s # of strcache buffers: %d\n"), prefix, numbuffs);
printf (_("%s strcache size: total = %d / max = %d / min = %d / avg = %d\n"),
prefix, totsize, maxsize, minsize, avgsize);
printf (_("%s strcache free: total = %d / max = %d / min = %d / avg = %d\n"),
prefix, totfree, maxfree, minfree, avgfree);
}

View File

@@ -1,3 +1,22 @@
@echo off
rem Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
rem 2005, 2006 Free Software Foundation, Inc.
rem This file is part of GNU Make.
rem GNU Make is free software; you can redistribute it and/or modify it under
rem the terms of the GNU General Public License as published by the Free
rem Software Foundation; either version 2, or (at your option) any later
rem version.
rem GNU Make is distributed in the hope that it will be useful, but WITHOUT
rem ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
rem FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
rem more details.
rem You should have received a copy of the GNU General Public License along
rem with GNU Make; see the file COPYING. If not, write to the Free Software
rem Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
cd w32\subproc cd w32\subproc
set MAKE=%2 set MAKE=%2
set MAKEFILE=%1 set MAKEFILE=%1

View File

@@ -1,3 +1,478 @@
2006-04-01 Paul D. Smith <psmith@gnu.org>
* scripts/functions/realpath: Don't run tests with multiple
initial slashes on Windows: those paths mean something different.
2006-03-19 Paul D. Smith <psmith@gnu.org>
* scripts/features/parallelism: Test that the jobserver is
properly managed when we have to re-exec the master instance of
make.
2006-03-17 Boris Kolpackov <boris@kolpackov.net>
* scripts/features/statipattrules: Add tests for bug #16053.
2006-03-09 Paul Smith <psmith@gnu.org>
* scripts/features/escape: Use "pre:" not "p:" to avoid conflicts
with DOS drive letters. Fixes Savannah bug #15947.
* test_driver.pl (run_each_test): Set the status properly even
when a test fails to execute. Fixes Savannah bug #15942.
* scripts/functions/foreach: Use a different environment variable
other than PATH to avoid differences with Windows platforms.
Fixes Savannah bug #15938.
2006-03-05 Paul D. Smith <psmith@gnu.org>
* run_make_tests.pl (set_more_defaults): Add CYGWIN_NT as a port
type W32. Fixed Savannah bug #15937.
* scripts/features/default_names: Don't call error() when the test
fails. Fixes Savannah bug #15941.
2006-02-17 Paul D. Smith <psmith@gnu.org>
* scripts/features/targetvars: Test a complex construction which
guarantees that we have to merge variable lists of different
sizes. Tests for Savannah bug #15757.
2006-02-15 Paul D. Smith <psmith@gnu.org>
* scripts/functions/error: Make sure filename/lineno information
is related to where the error is expanded, not where it's set.
* scripts/functions/warning: Ditto.
* scripts/functions/foreach: Check for different error conditions.
* scripts/functions/word: Ditto.
* scripts/variables/negative: Test some variable reference failure
conditions.
* scripts/options/warn-undefined-variables: Test the
--warn-undefined-variables flag.
2006-02-09 Paul D. Smith <psmith@gnu.org>
* run_make_tests.pl (set_more_defaults): Update valgrind support
for newer versions.
* test_driver.pl (toplevel): Skip all hidden files/directories (ones
beginning with ".").
* scripts/functions/andor: Tests for $(and ..) and $(or ...)
functions.
2006-02-08 Boris Kolpackov <boris@kolpackov.net>
* scripts/features/parallelism: Add a test for bug #15641.
2006-02-06 Paul D. Smith <psmith@gnu.org>
* scripts/options/dash-W: Add a test for bug #15341.
2006-01-03 Paul D. Smith <psmith@gnu.org>
* scripts/variables/automatic: Add a test for bug #8154.
* README: Update to reflect the current state of the test suite.
2005-12-12 Paul D. Smith <psmith@gnu.org>
* scripts/features/parallelism, scripts/functions/wildcard,
scripts/targets/FORCE, scripts/targets/PHONY,
scripts/targets/SILENT: Use the default setting for
$delete_command. Fixes bug #15085.
* run_make_tests.pl (get_this_pwd) [VMS]: Use -no_ask with delete_file.
2005-12-11 Paul D. Smith <psmith@gnu.org>
* scripts/misc/general4: Test implicit rules with '$' in the
prereq list & prereq patterns.
* scripts/features/se_implicit: Add in .SECONDEXPANSION settings.
2005-12-09 Boris Kolpackov <boris@kolpackov.net>
* scripts/features/patternrules: Add a test for bug #13022.
2005-12-07 Boris Kolpackov <boris@kolpackov.net>
* scripts/features/double_colon: Add a test for bug #14334.
2005-11-17 Boris Kolpackov <boris@kolpackov.net>
* scripts/functions/flavor: Add a test for the flavor function.
2005-11-14 Boris Kolpackov <boris@kolpackov.net>
* scripts/variables/INCLUDE_DIRS: Add a test for the .INCLUDE_DIRS
special variable.
2005-10-24 Paul D. Smith <psmith@gnu.org>
* scripts/misc/general4: Test '$$' in prerequisites list.
* scripts/features/statipattrules: Rewrite to use run_make_test().
Add various static pattern info.
* scripts/features/se_statpat: Enable .SECONDEXPANSION target.
* scripts/features/se_explicit: Add tests for handling '$$' in
prerequisite lists with and without setting .SECONDEXPANSION.
* scripts/features/order_only: Convert to run_make_test().
* run_make_tests.pl (set_more_defaults): If we can't get the value
of $(MAKE) from make, then fatal immediately.
2005-08-31 Paul D. Smith <psmith@gnu.org>
* run_make_tests.pl (get_this_pwd): Require the POSIX module (in
an eval to trap errors) and if it exists, use POSIX::getcwd to
find the working directory. If it doesn't exist, go back to the
previous methods. This tries to be more accurate on Windows
systems.
2005-08-29 Paul D. Smith <psmith@gnu.org>
* scripts/functions/abspath: Add some text to the error messages
to get a better idea of what's wrong. Make warnings instead of
errors.
* scripts/features/patspecific_vars: Don't use "test", which is
UNIX specific. Print the values and let the test script match
them.
2005-08-25 Paul Smith <psmith@gnu.org>
* scripts/variables/SHELL: Use a /./ prefix instead of //: the
former works better with non-UNIX environments. Fixes Savannah
bug #14129.
2005-08-13 Boris Kolpackov <boris@kolpackov.net>
* scripts/functions/wildcard: Wrap calls to $(wildcard ) with
$(sort) so that the resulting order is no longer filesystem-
dependant.
2005-08-10 Boris Kolpackov <boris@kolpackov.net>
* scripts/features/statipattrules: Add a test for Savannah bug #13881.
2005-08-07 Paul D. Smith <psmith@gnu.org>
* scripts/features/parallelism: Add a test for a bug reported by
Michael Matz (matz@suse.de) in which make exits without waiting
for all its children in some situations during parallel builds.
2005-07-08 Paul D. Smith <psmith@gnu.org>
* test_driver.pl: Reset the environment to a clean value every
time before we invoke make. I'm suspicious that the environment
isn't handled the same way in Windows as it is in UNIX, and some
variables are leaking out beyond the tests they are intended for.
Create an %extraENV hash tests can set to add more env. vars.
* tests/scripts/features/export: Change to use %extraENV.
* tests/scripts/functions/eval: Ditto.
* tests/scripts/functions/origin: Ditto.
* tests/scripts/options/dash-e: Ditto.
* tests/scripts/variables/SHELL: Ditto.
2005-06-27 Paul D. Smith <psmith@gnu.org>
* scripts/options/dash-W: Use 'echo >>' instead of touch to update
files.
* scripts/features/reinvoke: Rewrite to be safer on systems with
subsecond timestamps.
* scripts/features/patternrules: False exits with different error
codes on different systems (for example, Linux => 1, Solaris => 255).
* scripts/options/dash-W: Set the timestamp to foo.x in the future,
to be sure it will be considered updated when it's remade.
2005-06-26 Paul D. Smith <psmith@gnu.org>
* scripts/functions/shell: New test suite for the shell function.
2005-06-25 Paul D. Smith <psmith@gnu.org>
* scripts/features/include: Test include/-include/sinclude with no
arguments. Tests fix for Savannah bug #1761.
* scripts/misc/general3: Implement comprehensive testing of
backslash-newline behavior in command scripts: various types of
quoting, fast path / slow path, etc.
Tests fix for Savannah bug #1332.
* scripts/options/symlinks: Test symlinks to non-existent files.
Tests fix for Savannah bug #13280.
* scripts/misc/general3: Test semicolons in variable references.
Tests fix for Savannah bug #1454.
* scripts/variables/MAKE_RESTARTS: New file: test the
MAKE_RESTARTS variable.
* scripts/options/dash-B: Test re-exec doesn't loop infinitely.
Tests fix for Savannah bug #7566.
* scripts/options/dash-W: New file: test the -W flag, including
re-exec infinite looping.
2005-06-12 Paul D. Smith <psmith@gnu.org>
* scripts/misc/close_stdout: Add a test for Savannah bug #1328.
This test only works on systems that have /dev/full (e.g., Linux).
2005-06-09 Paul D. Smith <psmith@gnu.org>
* scripts/functions/foreach: Add a test for Savannah bug #11913.
2005-05-31 Boris Kolpackov <boris@kolpackov.net>
* scripts/features/include: Add a test for Savannah bug #13216.
* scripts/features/patternrules: Add a test for Savannah bug #13218.
2005-05-13 Paul D. Smith <psmith@gnu.org>
* scripts/features/conditionals: Add tests for the new if... else
if... endif syntax.
2005-05-03 Paul D. Smith <psmith@gnu.org>
* scripts/variables/DEFAULT_GOAL: Rename DEFAULT_TARGET to
DEFAULT_GOAL.
2005-05-02 Paul D. Smith <psmith@gnu.org>
* scripts/features/parallelism: Add a test for exporting recursive
variables containing $(shell ) calls. Rewrite this script to use
run_make_test() everywhere.
2005-04-07 Paul D. Smith <psmith@gnu.org>
* scripts/targets/SECONDARY: Add a test for Savannah bug #12331.
2005-03-15 Boris Kolpackov <boris@kolpackov.net>
* scripts/variables/automatic: Add a test for Savannah bug #12320.
2005-03-10 Boris Kolpackov <boris@kolpackov.net>
* scripts/features/patternrules: Add a test for Savannah bug #12267.
2005-03-09 Boris Kolpackov <boris@kolpackov.net>
* scripts/variables/DEFAULT_TARGET: Add a test for Savannah
bug #12266.
2005-03-04 Boris Kolpackov <boris@kolpackov.net>
* scripts/features/patternrules: Add a test for Savannah bug #12202.
2005-03-03 Boris Kolpackov <boris@kolpackov.net>
* scripts/features/se_implicit: Add a test for stem
termination bug. Add a test for stem triple-expansion bug.
* scripts/features/se_statpat: Add a test for stem
triple-expansion bug.
* scripts/features/statipattrules: Change test #4 to reflect
new way empty prerequisite list is handled.
2005-03-01 Boris Kolpackov <boris@kolpackov.net>
* scripts/features/statipattrules: Add a test for
Savannah bug #12180.
2005-02-28 Paul D. Smith <psmith@gnu.org>
* scripts/options/dash-q: Add a test for Savannah bug # 7144.
* scripts/options/symlinks: New file to test checking of symlink
timestamps. Can't use filename dash-L because it conflicts with
dash-l on case-insensitive filesystems.
* scripts/variables/MAKEFILE_LIST, scripts/variables/MFILE_LIST:
Rename MAKEFILE_LIST test to MFILE_LIST, for systems that need 8.3
unique filenames.
2005-02-28 Boris Kolpackov <boris@kolpackov.net>
* scripts/variables/DEFAULT_TARGET: Test the .DEFAULT_TARGET
special variable.
2005-02-27 Boris Kolpackov <boris@kolpackov.net>
* scripts/features/se_explicit: Test the second expansion in
explicit rules.
* scripts/features/se_implicit: Test the second expansion in
implicit rules.
* scripts/features/se_statpat: Test the second expansion in
static pattern rules.
* scripts/variables/automatic: Fix to work with the second
expansion.
* scripts/misc/general4: Add a test for bug #12091.
2005-02-27 Paul D. Smith <psmith@gnu.org>
* scripts/functions/eval: Check that eval of targets within
command scripts fails. See Savannah bug # 12124.
2005-02-26 Paul D. Smith <psmith@gnu.org>
* test_driver.pl (compare_output): If a basic comparison of the
log and answer doesn't match, try harder: change all backslashes
to slashes and all CRLF to LF. This helps on DOS/Windows systems.
2005-02-09 Paul D. Smith <psmith@gnu.org>
* scripts/features/recursion: Test command line variable settings:
only one instance of a given variable should be provided.
2004-11-30 Boris Kolpackov <boris@kolpackov.net>
* tests/scripts/functions/abspath: New file: test `abspath'
built-in function.
* tests/scripts/functions/realpath: New file: test `realpath'
built-in function.
2004-11-28 Paul D. Smith <psmith@gnu.org>
* scripts/options/dash-C [WINDOWS32]: Add a test for bug #10252;
this doesn't really test anything useful in UNIX but...
* scripts/variables/SHELL: New file: test proper handling of SHELL
according to POSIX rules. Fixes bug #1276.
2004-10-21 Boris Kolpackov <boris@kolpackov.net>
* scripts/functions/word: Test $(firstword ) and $(lastword ).
2004-10-05 Boris Kolpackov <boris@kolpackov.net>
* scripts/features/patspecific_vars: Test simple/recursive
variable expansion.
2004-09-28 Boris Kolpackov <boris@kolpackov.net>
* scripts/features/include: Test dontcare flag inheritance
when rebuilding makefiles.
2004-09-27 Boris Kolpackov <boris@kolpackov.net>
* scripts/features/patspecific_vars: Test exported variables.
2004-09-22 Paul D. Smith <psmith@gnu.org>
* run_make_tests.pl (run_make_test): Don't add newlines to the
makestring or answer if they are completely empty.
* scripts/features/patternrules: Rename from implicit_prereq_eval.
* scripts/test_template: Rework the template.
2004-09-21 Boris Kolpackov <boris@kolpackov.net>
* run_make_tests.pl: Change `#!/usr/local/bin/perl' to be
`#!/usr/bin/env perl'.
* scripts/features/implicit_prereq_eval: Test implicit rule
prerequisite evaluation code.
2004-09-21 Paul D. Smith <psmith@gnu.org>
* run_make_tests.pl (run_make_test): Enhance to allow the make
string to be undef: in that case it reuses the previous make
string. Allows multiple tests on the same makefile.
* scripts/variables/flavors: Add some tests for prefix characters
interacting with define/endef variables.
2004-09-20 Paul D. Smith <psmith@gnu.org>
* scripts/functions/substitution: Rewrite to use run_make_test()
interface, and add test for substitution failures reported by
Markus Mauhart <qwe123@chello.at>.
2004-03-22 Paul D. Smith <psmith@gnu.org>
* test_driver.pl (run_each_test, toplevel, compare_output): Change
to track both the testing categories _AND_ the number of
individual tests, and report both sets of numbers.
2004-02-21 Paul D. Smith <psmith@gnu.org>
* scripts/functions/origin: Set our own environment variable
rather than relying on $HOME.
2004-01-21 Paul D. Smith <psmith@gnu.org>
* scripts/features/conditionals: Test arguments to ifn?def which
contain whitespace (such as a function that is evaluated). Bug
#7257.
2004-01-07 Paul D. Smith <psmith@gnu.org>
* scripts/features/order_only: Test order-only prerequisites in
pattern rules (patch #2349).
2003-11-02 Paul D. Smith <psmith@gnu.org>
* scripts/functions/if: Test if on conditionals with trailing
whitespace--bug #5798.
* scripts/functions/eval: Test eval in a non-file context--bug #6195.
2003-04-19 Paul D. Smith <psmith@gnu.org>
* scripts/features/patspecific_vars: Test multiple patterns
matching the same target--Bug #1405.
2003-04-09 Paul D. Smith <psmith@gnu.org>
* run_make_tests.pl (set_more_defaults): A new $port_type of
'OS/2' for (surprise!) OS/2. Also choose a wait time of 2 seconds
for OS/2.
2003-03-28 Paul D. Smith <psmith@gnu.org>
* scripts/targets/SECONDARY: Test the "global" .SECONDARY (with
not prerequisites)--Bug #2515.
2003-01-30 Paul D. Smith <psmith@gnu.org>
* scripts/features/targetvars: Test very long target-specific
variable definition lines (longer than the default make buffer
length). Tests patch # 1022.
* scripts/functions/eval: Test very recursive $(eval ...) calls
with simple variable expansion (bug #2238).
* scripts/functions/word: Test error handling for word and
wordlist functions (bug #2407).
2003-01-22 Paul D. Smith <psmith@gnu.org>
* scripts/functions/call: Test recursive argument masking (bug
#1744).
2002-10-25 Paul D. Smith <psmith@gnu.org>
* scripts/functions/eval: Test using $(eval ...) inside
conditionals (Bug #1516).
2002-10-14 Paul D. Smith <psmith@gnu.org>
* scripts/options/dash-t: Add a test for handling -t on targets
with no commands (Bug #1418).
2002-10-13 Paul D. Smith <psmith@gnu.org>
* scripts/features/targetvars: Add a test for exporting
target-specific vars (Bug #1391).
2002-10-05 Paul D. Smith <psmith@gnu.org>
* scripts/variables/automatic: Add tests for $$(@), $${@}, $${@D},
and $${@F}.
2002-09-23 Paul D. Smith <psmith@gnu.org> 2002-09-23 Paul D. Smith <psmith@gnu.org>
* scripts/features/escape: Test handling of escaped comment * scripts/features/escape: Test handling of escaped comment
@@ -59,9 +534,8 @@
2002-07-11 Paul D. Smith <psmith@gnu.org> 2002-07-11 Paul D. Smith <psmith@gnu.org>
* run_make_tests.pl (valid_option): Add support for Valgrind * run_make_tests.pl (valid_option): Add support for Valgrind. Use
<http://developer.kde.org/~sewardj/>. Use -valgrind option to the -valgrind option to the test suite.
test suite.
(set_more_defaults): Set up the file descriptor to capture (set_more_defaults): Set up the file descriptor to capture
Valgrind output. We have to unset its close-on-exec flag; we Valgrind output. We have to unset its close-on-exec flag; we
hardcode the value for F_SETFD (2) rather than load it; hopefully hardcode the value for F_SETFD (2) rather than load it; hopefully
@@ -345,3 +819,20 @@
1999-09-15 Paul D. Smith <psmith@gnu.org> 1999-09-15 Paul D. Smith <psmith@gnu.org>
ChangeLog file for the test suite created. ChangeLog file for the test suite created.
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
GNU Make; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

View File

@@ -159,3 +159,21 @@ Changes from 0.1 to 0.2 (5-4-92):
way (testing for /mnt) fails on his machine). way (testing for /mnt) fails on his machine).
Some new tests were added. Some new tests were added.
-------------------------------------------------------------------------------
Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of GNU Make.
GNU Make is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
Foundation; either version 2, or (at your option) any later version.
GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with
GNU Make; see the file COPYING. If not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.

Some files were not shown because too many files have changed in this diff Show More