Commit Graph

30 Commits

Author SHA1 Message Date
Juli Mallett
85779f0ead Split var.c into var.c and var_modify.c and move all the modification funcs
to var_modify.c, for readability.  constify some low hanging fruit (string
manipulation functions) and the upper layers appropriately.  No longer use
the private strstr(3) implementation, while changing string code.

Tested by:      lots of successful make buildworld.
2002-10-28 23:33:57 +00:00
Juli Mallett
f8137bcf93 Move utilitarian routines to util.c, which isn't the same as the old
compatability-geared util.c.  These are things like message printers
and the PrintAddr function for traversing lists.  Other general-purpose
utilities inside make(1) can go here, in time.
2002-10-10 19:27:48 +00:00
Poul-Henning Kamp
5fd43411f3 Give make(1) the ability to use KQUEUE to wait for worker processes
instead of polling for them.

Unfortunately we cannot enable it yet because it panics the kernel
somewhere in kqueue.

Submitted by:	Stefan Farfeleder <e0026813@stud3.tuwien.ac.at>
2002-10-04 20:30:03 +00:00
Juli Mallett
cdba64071c Move common use of if (DEBUG(FOO)) printf... to DEBUGF(FOO, ...), using
variable length arguments to a macro.  Bump version as this makes DEBUG
statements *always* go to stderr rather than sometimes stdout.  There are
a few stragglers, which I will take care of as soon as I can.  Mostly these
relate to the need-for-death-of some of the remote job code.

Nearby stylistic nits and XXX added/fixed where appropriate.
2002-09-17 22:31:26 +00:00
Peter Wemm
7b2f27b0fe Deal with bootstrapping from an old -current (almost exactly a year old)
which fails the make tests (doesn't understand ${notdef:U}) and therefore
fails on __FBSDID in usr.bin/make/*.  -DBOOTSTRAPPING is no help here since
this is before we are using the new share/mk/* files, and it would conflict
with the builtin -DBOOTSTRAPPING support later.. so use a different flag.
2002-08-31 07:18:40 +00:00
Juli Mallett
acdb9a105e Add a -C ala GNU make(1) for Makefiles which are too lazy to use $(MAKE) and
this particular GNU flag.  It changes into the given directory for the
operation in question.  This just goes into said directory at the time of
parsing the argument for getopt(3).

Submitted by:	Rachel Hestilow <rachel@jerkcity.com>
2002-08-25 02:45:04 +00:00
Ruslan Ermilov
1737392273 Back out the ``run shell from $PATH'' change; this was an overkill
and is insecure.

Requested by:	bde
2002-05-24 15:51:27 +00:00
Ruslan Ermilov
ea98f295f7 Do not run shell from /bin, run it from $PATH.
Bump MAKE_VERSION to 5200205221.
2002-05-22 14:53:18 +00:00
Ruslan Ermilov
8e9bddc97b Added the MAKE_VERSION global that could be useful in determining
if a given make(1) is feature-compatible with a set of makefiles.

When merged, this will be used to replace the ugly upgrade_checks
hacks in src/Makefile.

Version has the RYYYYMMDDX format, where R is from RELENG_<R> and
X allows for 10 distinguishable changes per day.

Discussed with:	bde
2002-05-22 14:35:47 +00:00
David E. O'Brien
9b24805230 Fix copyrights, and undo SCS ID damage. 2002-04-13 10:57:56 +00:00
Warner Losh
c120448ada o unifdef -D__STDC__
o remove badly bit-rotted compat file that likely won't work on the systems
  it purports to support.
2002-03-23 23:30:30 +00:00
Maxim Sobolev
6649ab78e1 By default build make(1) as a static binary. It costs only 100k of additional
disk space, buf provides measureable speed increase for make-intensive
operations, such as pkg_version(1), `make world' and so on.

MFC after:	1 week
2001-05-18 09:05:56 +00:00
Will Andrews
40adb1a63b Remove GCC-ism (-Wall).
Submitted by:	bde
2001-04-26 04:40:57 +00:00
Ruslan Ermilov
9aa8f5f68a Add -Wall. 2001-04-25 14:59:16 +00:00
Bill Fumerola
bdc8631e01 with my mentor hat on...
remove the concept of a 'maintainer' of our make. there really isn't a
need for any one committer to hold an exclusive lock or serve as a filter
for this code.
2001-03-15 10:33:00 +00:00
Will Andrews
b17aa0e426 Assume MAINTAINER. I will be taking the job of merging NetBSD/OpenBSD
improvements (including :C & :L, among others).  After that, I'll be coming
up with other ways to improve make(1).

Discussed in spirit with:	peter
2000-09-29 19:51:48 +00:00
Brian Feldman
c7322223b9 Allow use of the ${MAKE_SHELL} variable to specify alternate shells for
make(1) to use.  Setting it to "sh" and "ksh" are the only values which
work right ATM; I wouldn't expect "csh" to get you far ;)
2000-08-16 23:31:43 +00:00
Marcel Moolenaar
f5c0c6abaa Remove CROSS_MAKE_FLAGS. 1999-11-15 17:07:45 +00:00
Peter Wemm
c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Warner Losh
1713906692 Per requests from the community, commit rudimentary cross compilation
support.  I've been building world with these changes for months w/o
ill effect.  I've also managed to build the cross tool chain for MIPS
with these patches.

Please note that the extent to which these patches work is largely
dictated by how well our tool chains support the cross compilation.
Building alpha binaries on i386 doesn't work.  Supposedly building
i386 binaries on alpha does work, but I've not verified it with these
patches, however.
1999-07-07 04:46:46 +00:00
Peter Wemm
53faa0dade Revert $FreeBSD$ to $Id$ 1997-02-22 19:29:21 +00:00
Jordan K. Hubbard
1130b656e5 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
Steve Price
8b69153a4d Correct problem with traversing into PSD.doc directory,
these files are actually installed/built as part of
src/share/doc/psd/12.make.  Oops. :)

Pointed out by:	Peter Wemm and Bruce Evans
1996-10-06 13:02:43 +00:00
Jordan K. Hubbard
09502a0eb9 Correct merge bogon: You want to descend into PSD.doc for both `all' and
`install' cases or there's never anything made to install, and you blow
up in the install. :-)
1996-10-06 12:43:14 +00:00
Steve Price
c0d06fe463 Merge in NetBSD's changes to make(1). Changes include:
- Add the .PHONY, .PARALLEL, and .WAIT directives
	- Added the -B and -m commandline flags
	- misc. man page cleanups
	- numerous job-related enhancements
	- removed unused header file (bit.h)
	- add util.c for functions not found in other envs.
	- and a few coordinated whitespace changes

Special thanks to Christos Zoulas <christos@netbsd.org>
for help in the merge.  A 'diff -ur' between Net and
FreeBSD now only contains sccsid-related diffs. :)

Obtained from: NetBSD, christos@netbsd.org, and me
1996-10-06 02:35:38 +00:00
Poul-Henning Kamp
0ad2ff70ee Stop using gnumalloc. 1995-09-22 14:14:32 +00:00
Andrey A. Chernov
6ed40291ad Allow additional parsing of SYSV/GNU make "include" directive, it covers
90% of problems in ports Makefiles
1995-06-16 22:46:38 +00:00
Jordan K. Hubbard
9f574f9a90 Bring in a number of changes from NetBSD's make, fixing quite a few
problems in the process:

1. Quoting should work properly now.  In particular, Chet's reported bash
   make problem has gone away.
2. A lot of memory that just wasn't being free'd after use is now freed.
   This should cause make to take up a LOT less memory when dealing with
   archive targets.
3. Give proper credit to Adam de Boor in a number of files.
Obtained from: NetBSD (and Adam de Boor)
1995-01-23 21:03:17 +00:00
David Greenman
14810c626c Use gnumalloc. 1994-08-29 17:01:06 +00:00
Rodney W. Grimes
9b50d90275 BSD 4.4 Lite Usr.bin Sources 1994-05-27 12:33:43 +00:00