mrg
f22d12ed49
back out rev 1.23 (don't stat PHONY targets). it broken the libcrypto
...
build by causing everything to be remade everytime. this fixes PR#8419.
1999-11-25 22:34:16 +00:00
kristerw
e71aea426d
Typos (from OpenBSD)
1999-11-19 22:29:24 +00:00
msaitoh
0fcbe067c6
s/ the the / the /
1999-10-08 20:13:42 +00:00
kim
6c6c0c0d5c
Make this compile on Solaris...
1999-09-16 19:57:54 +00:00
mycroft
2500a4b975
Some minor cleanup of :: tests.
1999-09-16 00:54:14 +00:00
mycroft
ce14db1fcd
Fix a bug in the previous. In the `compat' case, we don't actually use the
...
list of target nodes returned by Make_ExpandUse(). We have to search the
cohorts explicitly while iterating through the tree. So, tweak CompatMake()
to do this.
1999-09-16 00:49:48 +00:00
sommerfeld
bcb141e5d0
Reuse the Hash_Entry `name' field to store the variable name when we
...
can (i.e., everything except environment variables, which aren't
stored in hash tables).
While we're here, inline the body of VarDelete into Var_Delete since
it's the only caller and it's just simpler that way when v->name can
share storage with the hash entry and may not need to be freed
separately.
Speeds up the infamous libc build benchhmark maybe 1% on PIII, 4% on
alpha pc164
Suggested by Perry Metzger.
1999-09-15 22:51:05 +00:00
mycroft
b12871c6cb
Rework how :: dependencies are handled.
...
Build a list of `cohorts' as before, but do *not* link each one into all the
parent nodes; instead, copy the `cohort' lists into the stream of targets to
be built inside Make_ExpandUse(). Also do the attribute propagation as a
separate pass after parsing.
This eliminates several O(n^2) algorithms.
1999-09-15 10:47:37 +00:00
mycroft
c29ad80902
More cleanup code bites it.
1999-09-15 08:48:17 +00:00
mycroft
dd291116bc
Don't bother iterating through all the data structures to free(3) everything
...
right before exiting.
(The code is still present, `#ifdef CLEANUP', in case someone needs it...)
1999-09-15 08:43:21 +00:00
mycroft
441a442e46
Fix another case where we stat(2)ed .PHONY targets.
1999-09-15 05:56:33 +00:00
mycroft
ff6341a190
Nuke Buf_{G,Ung}etByte{,s}(), since they aren't used, and make BufExpand do
...
power-of-2 allocation.
1999-09-15 04:16:31 +00:00
mycroft
c33b6eca55
Avoid using Lst_Member() in SuffExpandChildren(), by avoiding Lst_ForEach() and
...
passing in the LstNode of the child being inspected. Shaves off another few %,
particularly when there are long child lists containing $ expansions (e.g. in
libc).
1999-09-15 03:59:44 +00:00
mycroft
d2ec8b0e26
Replace the linear variable list in the GNode with a hash table. Gives a
...
small (~10% on my machine) speedup building libc.
Changes by: perry (+ bug fix and minor change by me)
Reviewed by: mycroft sommerfeld
1999-09-15 02:56:34 +00:00
christos
ab01074993
Add :O var modifier, that sorts the words in a variable.
1999-09-12 00:17:50 +00:00
christos
7057287c54
PR/8259: Chris Demetriou: Fix stack overflow bugs exposed by the glibc-2.1.1
...
Makefile. Use snprintf everywhere.
1999-09-04 04:21:28 +00:00
simonb
dcb4cadef7
Don't need strftime() on Ultrix either.
1999-08-27 00:47:25 +00:00
aidan
58f27ba58c
Added .PARSEDIR and .PARSEFILE variables to make(1).
1999-08-09 21:06:28 +00:00
ross
7886a593e3
Back out part of previous, only the parse.c mod was intended.
1999-08-04 16:44:07 +00:00
ross
0728723c31
Trivial speed hack.
1999-08-04 02:54:56 +00:00
hubertf
5674691260
Save the walls, use fly swatters instead of machine guns!
...
(s/sscanf/strtol/, per Christos)
1999-08-02 17:23:58 +00:00
hubertf
a38c426e1c
Detect invalid arguments to -j and -L by using sscanf() instead of atoi().
...
Fixes PR 6743 by Assar Westerlund <assar@sics.se>
1999-08-02 15:23:11 +00:00
hubertf
d5df2197fb
sprite.h is private to make, so #include it with "sprite.h",
...
not <sprite.h>.
Problem reported in PR 4381 bye Soren S. Jorvang <soren@t.dk>
1999-07-29 19:45:32 +00:00
christos
10e7b7f04d
Fix extreme brokeness with job control that appeared when we set USE_PGRP.
1999-07-16 05:38:20 +00:00
thorpej
70b6975a7e
Fix a typo.
1999-07-12 18:22:49 +00:00
thorpej
484fe86089
Correct an inverse initialization of a variable, which caused all .PATHs
...
to be treated as .DOTLAST.
1999-07-12 17:29:32 +00:00
thorpej
5a0addc0ef
Add a mechanism for specifying that ${.CURDIR} will be searched last
...
in the presence of .PATH directives by specifying:
.PATH: .DOTLAST
This will be used to fixup the build system to work with both crypto-us
and crypto-intl sub-trees.
Make(1) changes by Christos Zoulas, after much badgering by me :-)
1999-07-11 02:06:57 +00:00
christos
80d9d7d175
Regular bourne shells don't have the -q option (from Chuck Cranor)
1999-07-06 14:02:56 +00:00
christos
516292d398
apply solaris fixes
1999-06-29 07:44:21 +00:00
christos
eee5bfa70d
Revert previous change. I am a bonehead.
1999-06-06 21:16:23 +00:00
christos
9081585e9b
remove accidentally left debugging code
1999-06-06 20:41:04 +00:00
christos
4d93254198
Allow junk variable to work in non dynamic contexts. Allows as to say things
...
like:
.if defined(COPTS) && !empty(COPTS:M*-g*)
1999-06-06 20:24:02 +00:00
christos
f15f83610f
Fix awful bug where:
...
V := $V foo
V := $V bar
would report that variable V is recursive...
1999-06-02 18:47:11 +00:00
christos
94df9ca047
Define USE_PGRP so that we send signals to our job's process group instead
...
of only pid.
1999-05-03 12:01:14 +00:00
christos
130a3bae01
killpg(pgrp, sig) == kill(-pgrp, sig) in the sysv case.
1999-05-03 09:49:55 +00:00
gwr
4761a8c13b
Uh... should have been ${MACHINE} not hard coded... Duh!
1999-04-03 04:50:16 +00:00
gwr
ae400a2e31
Define CC=gcc -O and add -DMACHINE=...
1999-04-03 04:39:10 +00:00
gwr
0a1b2f4b53
Make regex support conditional on NO_REGEX (was MAKE_BOOTSTRAP)
...
Solaris has a compatible regex, as do many others now...
1999-04-03 04:37:47 +00:00
sommerfe
1be2746ed5
report a sensible error if wait() fails.
1999-03-24 13:19:26 +00:00
christos
8001a619fc
use emalloc() instead of malloc()
1999-03-19 16:11:02 +00:00
erh
fa45851f9b
Add missing .El line.
1999-03-10 05:14:51 +00:00
ross
7f8e818918
Missing .El.
1999-03-09 03:19:28 +00:00
mycroft
a1c657fe56
Clean up SYNOPSIS formatting.
1999-03-07 11:29:58 +00:00
cjs
d5ce180dc0
When giving the -v option to /bin/sh, also give the new -q option so that
...
the execution of $ENV isn't printed with every job that's started.
1999-02-04 00:40:55 +00:00
christos
24eea87b54
Allow system path to be overriden in the Makefile
1998-12-19 17:26:12 +00:00
ross
3eb0afd457
Fix a bug that apparently prevented, since day 1, the .-include / .sinclude
...
feature from ever working. Also, fix the man page that incorrectly described
the syntax of the feature that didn't work.
1998-11-17 23:56:23 +00:00
christos
4f3cc30bcc
This patch fixes the problem introduced in the previous commit where
...
parents would be get remade, even if children were not really updated
by the commands executed for them. It also makes all the children have
the real modification time set if possible, so it should fix some other
timing weirdnesses...
- collapse childMade and make fields into flags and convert them to bits
CHILDMADE and REMAKE
- introduce FORCE flag that gets set in all the parents of a child that
has no sources and does not exist.
- set oodate if the FORCE flag is set, and not if CHILDMADE
- centralize the RECHECK into Make_Recheck() and use this in make.c and compat.c
- use Make_TimeStamp for all child -> parent timestamp propagations
1998-11-11 19:37:06 +00:00
christos
7e91b1976d
PR/6426: Jim Bernard: make sometimes does not make directories on top of
...
a union mount.
eg.
src: FORCE
FORCE is a fake target that does not have sources. When FORCE is
considered made it gets updated with the current timestamp. If the
directory happens to have the same timestamp too, then it will not
be made because it is considered to be up-to-date with respect to
the child. This can happen because the time resolution is only in
seconds. It is more likely to happen on a union filesystem where
the timestamps take longer to update.
The fix is to consider the parent unmade when children have been
updated.
1998-11-11 11:25:43 +00:00
christos
889ce7db6e
- full prototypes
...
- more conservative printf
- char -> unsigned char
1998-11-06 23:31:09 +00:00
itohy
6aeb72f23f
Reduced memory leaks.
...
I found some more leaks, but are not in inside of iterations.
1998-11-01 03:07:33 +00:00
itohy
841c52934a
If the target name is shorter than the suffix,
...
the previous garbage bytes may be read.
Example: "make n" --- target = n, suffix = .ln
Changing interface of SuffSuffIsSuffix() is required to fix this bug.
1998-11-01 03:05:03 +00:00
itohy
f748b52ef3
Avoid reading outside of allocated memory
...
on command execution if the output is empty.
1998-11-01 03:01:53 +00:00
christos
ff08129ca5
strftime is not needed for svr4 machines; also fix the prototype footprint.
1998-10-18 14:24:16 +00:00
christos
3b7c5b4ed8
Only define const and volatile when __STDC__ is not defined (for BOOTSTRAP)
1998-10-18 14:23:48 +00:00
wsanchez
65b6624a6d
Include sys/types.h
1998-10-13 17:09:16 +00:00
wsanchez
8a6084908f
Use __ARCHITECTURE__, if defined, as MACHINE_ARCH
1998-10-13 17:08:34 +00:00
christos
82ee767393
Fix conditional variable expression parsing (reported by cgd)
1998-09-18 20:35:11 +00:00
christos
1b24c735a6
PR/6162: Greg A. Woods: pmake does not add suffix rules if gnodes have children.
...
This is traditional make behavior (Solaris make does the same), but
GNU does not. Lets see what breaks.
1998-09-18 20:20:52 +00:00
christos
aed39ca72c
PR/6174: ITOH Yasufumi: Purify bug and a compile error in utility code.
1998-09-18 20:15:36 +00:00
christos
8bd03e9aab
- Add {.,}[s-]include for silent include file failures
...
- Make traditional include statement include more than one file if present
on the line.
Keeping up with the other's :-)
1998-08-06 13:42:22 +00:00
christos
ea21627e65
Fix access to freed memory; pointed out by Todd Miller.
1998-07-04 21:53:11 +00:00
christos
076a184bb0
PR/5690: Wolfgang Rupprecht: deleting a suffix that has 0 source references
...
causes core-dump. Fix: when an unused suffix gets removed, delete
it from the suffix list.
1998-07-02 23:30:18 +00:00
tv
f0dcde8323
Make a MAKE_BOOTSTRAP case work on NetBSD, too, for cross-compile cases
1998-05-21 17:19:46 +00:00
cgd
b374e69f29
in Var_Parse(), set delim in a couple of other paths into cleanup
1998-04-03 04:07:15 +00:00
kleink
fb7502608a
Need <time.h> for time() prototype.
1998-04-02 10:33:17 +00:00
christos
84e525a801
Add conditional variable evaluation from Alistair Crooks.
1998-04-01 14:18:10 +00:00
christos
d611392726
PR/5225: Jason Thorpe: make with -j 4 and subdirs core-dumps.
...
This revealed another long standing problem with pmake's port to bsd.
.MAKE was not set as the manual page states. Set it and remove another
typo in my last commit.
1998-03-28 22:29:04 +00:00
christos
f46f2d693e
PR/5210: Hauke Fath: make core dumps with .SHELL
...
Unfortunately this revealed a deeper problem with the brk_string code.
To fix it:
- remove sharing of the buffer between brk_string invocations
- change the semantics of brk_string so that the argument array
starts with 0, and return the buffer where the strings are
stored
1998-03-26 19:20:36 +00:00
fair
78f41cb540
patch from PR#3573 to rename a variable "main" to "mainList"
1998-03-23 08:52:48 +00:00
hubertf
51dc9a9405
Fix typos from PR 5055 by NAKAJIMA Yoshihiro <nakayosh@kcn.or.jp>.
1998-02-24 18:34:31 +00:00
christos
79400c03dd
Y2K fixes: use strftime(), and add a fake strftime() for systems that do
...
not have it.
1998-02-04 14:47:39 +00:00
thorpej
f04b8efed3
Change an exit() to _exit(), so that it's safe for vfork().
1997-12-31 06:06:12 +00:00
lukem
8640f5d0af
getopt returns -1 not EOF, use memmove instead of bcopy
1997-11-08 09:33:15 +00:00
lukem
8ba07ab0b3
use CPPFLAGS instead of CFLAGS
1997-10-24 09:00:17 +00:00
lukem
6d1c625f54
fix up .Nm usage
1997-10-19 05:05:24 +00:00
lukem
00c29d5afe
don't define WARNS=1 here
1997-10-19 04:23:02 +00:00
mikel
d9c915fd1a
add missing .Nm argument
1997-10-12 05:51:47 +00:00
mycroft
e96e918e60
Use bsd.subdir.mk as appropriate.
1997-10-11 09:34:07 +00:00
thorpej
75b410b331
If printing a u_long, use the %lu format.
1997-10-03 17:58:00 +00:00
enami
5a3584034e
Make this compile on NetBSD/alpha; use %ld and cast to u_long to print
...
a variable of type size_t.
1997-10-03 16:06:26 +00:00
lukem
2ba9e97765
wrap #include <sys/cdefs.h>, __RCSID(...) stuff in #ifndef MAKE_BOOTSTRAP
1997-09-28 03:30:58 +00:00
christos
a004ae7f41
PR/4140: David A. Holland: use svr4 style archives for ELF environments
1997-09-26 13:29:05 +00:00
fair
7eaeaff5f2
fix some ints that should be "time_t" per PR#4139
1997-09-23 21:15:07 +00:00
christos
7b8cd5e6e3
Expand variables within variables correctly; eg.
...
foo.123=abc
bar=123
all:
echo ${foo.${bar}}
1997-09-22 17:11:12 +00:00
kleink
66105c37fc
Lseek(2) usage cleanup: the use of L_SET/L_INCR/L_XTND is deprecated,
...
use SEEK_SET/SEEK_CUR/SEEK_END instead.
1997-08-25 19:31:43 +00:00
christos
87d111ebee
#if __STDC__ -> #ifdef __STDC__
1997-07-11 20:17:37 +00:00
christos
4507c82bcc
sprintf -> vsprintf
1997-07-11 20:16:01 +00:00
christos
487628a792
Fix memory corruption that was caused by debugging code leftovers.
1997-07-10 00:54:44 +00:00
christos
e2d4e7ccc8
PR/3825: David A. Holland: global regexp handling gets stuck in infinite loop.
...
Actually there were two bugs:
- Add REG_NOTBOL after the first substitution.
- Handle the rm_so == rm_eo == 0 case, where in a substitution such
as 's/bzzzt/z*/g' the first time z* matches nothing.
1997-07-07 19:06:17 +00:00
christos
254d64f064
Add WARNS=1
...
RCSID police
1997-07-01 21:17:00 +00:00
christos
9981dd99c2
Apparently, using _doprnt(_IOREAD) to emulate vsnprintf() on SVR4 *sometimes*
...
core-dumps; use sprintf()+strlen() for now.
1997-06-07 16:42:31 +00:00
christos
702a3f7097
Deal with archive.a(member.o) nodes when expanding .USE dependencies or
...
adding children to .OODATE.
1997-06-07 16:41:09 +00:00
christos
fab62ec0e9
Don't confuse `member' with `target'
1997-06-07 16:39:45 +00:00
pk
3552d54978
Erase spurious character.
1997-05-26 23:07:31 +00:00
pk
7abb0d066d
Minor formatting glitch.
1997-05-26 21:04:28 +00:00
mycroft
c19bda7d4c
Check the .PHONY attribute...
1997-05-20 22:53:30 +00:00
christos
041c0c5158
Change the way curdir is handled [this started at the previous version]...
...
Instead of adding it in .PATH, handle it specially the same way as "." is
handled.
1997-05-09 17:05:59 +00:00
mycroft
f88245a571
Make sure to propagate OP_PHONY to all cohorts that already existed.
1997-05-09 04:08:26 +00:00
mycroft
8aed472136
Fix description of .NOPATH.
1997-05-08 22:34:34 +00:00
gwr
bf6930a26c
Add the new .NOPATH feature which can be used to disable .PATH search
...
for particular targets, i.e. .depend, objects, etc. (from Christos).
1997-05-08 21:24:41 +00:00