Commit graph

107 commits

Author SHA1 Message Date
Will Andrews f4180808d2 Update make(1) manpage to include information about the new loud
debugging facility I introduced earlier today.
2000-05-14 23:03:45 +00:00
Will Andrews ea9b438956 Add loud debugging facility (-dl option) which allows programmers/developers
to override @-prefixed commands in Makefiles.  It is especially useful for
debugging ports and/or complex Makefiles in such a manner that is basically
a last resort, but is quite effective if the output is well-handled.

I'll update the manpage after dinner.  ;-)

Better patch submitted by:	steve
Reviewed by:			phk, steve, chuckr, obrien,
				Lyndon Nerenberg <lyndon@orthanc.ab.ca>
2000-05-14 22:24:28 +00:00
Warner Losh 0e7f0658ee #include <errno.h> where needed. Kill extern int errno;.
Minor warnings in tip corrected.
2000-04-14 06:39:19 +00:00
Sheldon Hearn 87faa07bec Remove single-space hard sentence breaks. These degrade the quality
of the typeset output, tend to make diffs harder to read and provide
bad examples for new-comers to mdoc.
2000-03-01 12:20:22 +00:00
Nik Clayton 3615c24e18 Fix errors in .Xr usage.
PR:             docs/17057
Submitted by:   Submitted by:   Udo Erdelhoff <ue@nathan.ruhr.de>
2000-03-01 10:48:35 +00:00
Ruslan Ermilov 810ce16d54 ${.MAKE} -> ${MAKE}
Reviewed by:	hoek
2000-01-19 10:44:28 +00:00
Kris Kennaway 6470ba8b28 Create tempfiles securely.
Reviewed by:	imp
2000-01-17 06:43:41 +00:00
Martin Cracauer 65831093e9 Make '||' visible.
PR:		docs/15265
Submitted by:	Kazu TAKAMUNE <takamune@avrl.mei.co.jp>
1999-12-05 12:23:03 +00:00
Marcel Moolenaar 494b6f4cba Improve backward compatibility.
make(1) uses sysctlbyname() to find out if it is running on a PC98
machine. This check has been added on 1998/9/9. The MIB variable was
added on 1998/8/31. At that time __FreeBSD_version was 300003. So,
only perform the check *if* __FreeBSD_version is defined and if it's
greater than 300003.

For the record: sysctlbyname was added on 1997/5/30 so this change
automaticly handles that...
1999-11-23 10:35:24 +00:00
Marcel Moolenaar f5c0c6abaa Remove CROSS_MAKE_FLAGS. 1999-11-15 17:07:45 +00:00
Julian Elischer 110acfcd2b Fix the following:
It appears that make fails to read the global symbol table of the archive file,
making it think that the library needs to be rebuilt.

fix supplied in PR:

PR:		bin/14167
Submitted by:	Sebastian Lederer <lederer@bonn-online.com>
Reviewed by:	gallatin@FreeBSD.ORG
1999-10-10 20:39:36 +00:00
Tim Vanderhoek 5335af7e73 s/with historical makefils//. Also, relocate and change the description
of VPATH to be a little sexier.  I'd say it looks a bit like Claudia
Schiffer now, which I consider a definate improvement.  We're also a little
more subtle about saying that VPATH is for backward(s) compatibility.

Submitted-by:	chris, bde, and myself
                [although none of their descriptions were as sexy
                 M(|is|r)s Schiffer, of course].
1999-09-11 15:11:56 +00:00
Tim Vanderhoek c947a6678b Remove the #include of sys/param.h. It was meant to improve portability
for BSD less than 4.4 where sys/cdefs.h DNE but can be simulated with
param.h.  Unfortunately, the additional include did little to actually
improve portability since we've lost portability in several other chunks
of make code (err(), sysctlbyname(), probable more).

Partly submitted by:	bde
1999-09-11 13:17:35 +00:00
Tim Vanderhoek 06b1dcf182 Unduplicate IDs from comments, do $Id -> $FreeBSD$ (submitted-by: bde) 1999-09-11 13:08:02 +00:00
Julian Elischer 4aaa4f952a Allow 'make' to check out elements within archive libraries.
"Make no longer properly parses archive files, so using archive members
      as make targets, as described in PSD:12 section 4.2, does not work."

Really should be merged into 3.3 before we ship if we can..
it's a trivial fix.

PR:		bin/13039, bin/10274
Submitted by:	Mikko Tyolajarvi mikko@dynas.se
1999-09-10 20:51:59 +00:00
Peter Wemm c3aac50f28 $Id$ -> $FreeBSD$ 1999-08-28 01:08:13 +00:00
Tim Vanderhoek a6ad7c7f78 Fix a temp file race occurring only when -j is used.
Noticed by:	ru
Obtained from:	OpenBSD
1999-08-22 05:28:13 +00:00
Tim Vanderhoek 9bd2d6eee4 Merge style- and trivial- only changes from OpenBSD (dated 1999/07/29-19:55+1).
Obtained from:	OpenBSD, sometimes indirected from NetBSD; myself
1999-08-17 00:39:26 +00:00
Chris Costello e0fd2ce68f Bad reference of getcwd(2) changed to getcwd(3). 1999-08-14 06:47:13 +00:00
Chris Costello 444449266c Make VPATH explanation more concise. I apparently was not thinking
on the previous commit.
1999-08-12 20:49:20 +00:00
Chris Costello a5813d5e80 Move ${VPATH} explanation under the .PATH rule section.
Clarify my vague explanation of how ${VPATH} works and why it shouldn't
be used.
1999-08-12 20:28:54 +00:00
Tim Vanderhoek 5af2ec36b0 Bugfix to last commit: Correctly intuit when an lhs is a string vs. number. 1999-08-12 13:30:08 +00:00
Chris Costello edad54782b Document ${VPATH} and that it _should_not_ be used in any new Makefiles.
PR:		10556
Submitted by:	Dominic Mitchell <Dom.Mitchell@palmerharvey.co.uk>
1999-08-11 17:52:55 +00:00
Tim Vanderhoek b97af31bdb Add a -E flag, similar to -e (overide variables from environment) except
that -E only operates for a specified variable.  Useful since the -e option
will often pull-in many unwanted variable overrides (esp. in a make world
situation).  Uses include overriding BINOWN (which cannot be done by normal
methods or through abuses of MAKEFLAGS) or likely for ports to honour CFLAGS
(provided they're running on a system whose make(1) has this option).
1999-07-31 20:53:02 +00:00
Tim Vanderhoek 97f8cf3b7f Print an error message on illegal numerical arguments.
Submitted by: bin/9349 (slightly modified) Assar Westerlund <assar@sics.se>
1999-07-31 20:40:23 +00:00
Tim Vanderhoek 3a1c425259 When printing an error message after command execution fails, don't assume
the only possible error is "command not found".  This makes debugging of
messages such as "/bin/sh: not found" less common...
1999-07-31 20:38:22 +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
Tim Vanderhoek 168de44296 Handle ".if ${T} > 1 || ${T} < 3" and friends correctly.
Reported-by:	asami
1999-05-25 13:45:08 +00:00
Warner Losh ab898e2ec9 Add :Q to quote variable expansion to all proper expansion of
variables for recursive makes.  This makes it less painful to cross
build recent NetBSD kernels on FreeBSD.

Obtained from: NetBSD
1999-04-19 07:30:04 +00:00
Warner Losh ac3efb6afc Make MACHINE_ARCH sensitive to the environment, as well as using the
compiled in default in case it isn't defined.  This is needed to make
cross compilation work in some edge cases.  It also makes cross
compiling on FreeBSD other BSD's easier as well.

Obtained from: NetBSD, OpenBSD (predates the split)
1999-03-01 06:01:05 +00:00
Dmitrij Tejblum 69a6a9961e Remove couple of 'extern int errno'. (They turned to something funny when
<errno.h> included).
1999-02-14 22:22:54 +00:00
Jordan K. Hubbard f93b86166a Don't allow pointer underrun in loop.
Spotted by:	John W. DeBoskey <jwd@unx.sas.com>
1999-01-08 18:37:34 +00:00
Peter da Silva 95cf97aa04 Described the search path Make uses to find makefiles. 1998-11-29 13:46:39 +00:00
Bruce Evans 50f292a2b5 Fixed missing 'v' in usage message. 1998-11-15 05:55:58 +00:00
Bruce Evans 3873e6c2a7 Fixed bugs in previous commit:
- missing `v' in synopsis.
- 'v' disordered relative to 'V' in description of options.
- line too long in description of 'v'.
1998-11-15 05:51:55 +00:00
David Greenman 7009ec844f Added a -v (verbose) option and hid multi-job file banner generation
behind it.
1998-11-14 16:15:04 +00:00
David E. O'Brien 9471b48afe Only process the ``PWD'' environmental var if built with "WANT_ENV_PWD"
defined.  Bash v2 sets PWD and it creates major problems for those of us
with /usr/src being a symlink.  See the lists for examples of the problems.
1998-10-18 00:51:46 +00:00
John Polstra 201fdc5426 Fix make world breakage from last commit. 1998-10-15 16:09:56 +00:00
Joseph Koshy 4a949c96ce Fix a serious bug in make(1)'s handling of archive libraries.
This case did not need to be tested when RANLIBMAG was defined
(as when in an `aout' environment) because Arch_StatMember() treated
the two cases of the library not being present and a member of
the library not being present the same way, forcing a rebuild
of the library.  Since in the ELF environment we don't look inside
archive libraries we now need to check if the archive library is
present in order to determine its `out-of-date'-ness.

(I hope I've been able to meet the Oct 15th freeze).

Reported-by:	Steve Price (and a few others whom I've forgotten, sorry)
1998-10-15 13:00:34 +00:00
KATO Takenori cab4769a94 Set the `pc98' string to the MACHINE if machdep.ispc98 != 0. 1998-09-09 14:58:30 +00:00
John Birrell c9db555954 Don't define RANLIBMAG if building an elf version of make. The RANLIBMAG
option lets make look inside archive libraries when determining if a
library is out-of-date. I don't think that make should look inside
files, so this fix effectively tells it not to. If the decision is
made (by someone else) that make _should_ be doing this, it will need
to be taught how to recognise elf archive libraries.

Problem noticed by: Joseph Koshy <jkoshy@freebsd.org>
1998-09-09 08:29:15 +00:00
Joseph Koshy 8460e34a1b Fix spurious `free()' when -d g2 is enabled.
PR:		6790
Submitted by:	nsmart <njs3@doc.ic.ac.uk>
1998-09-09 05:15:38 +00:00
Martin Cracauer 9a4902a99f When exiting on SIGINT, exit with signal status 1998-08-24 10:17:20 +00:00
Warner Losh dff85ecbee Use malloc + sprintf rather than asprintf to ensure portability to
other, less advanced architecutres.  This should minorly help porting
efforts of FreeBSD.  I've done several make worlds since this came up
with this change, as well as debugging several interesting nits with
-V (which is the only thing this change will affect really).
1998-07-26 17:06:05 +00:00
Peter Wemm b9305a0668 Make -V expand it's arguments. This means that instead of 'make -V OBJS'
printing something useless (to a shell) like: ${SRCS:N*.h:R:S/$/.o/g}
it will instead print the actual ${OBJS} value.
1998-06-13 11:55:57 +00:00
Bruce Evans 822aa079ec Don't forget to pretend that `make -n -jN' makes the targets that it
says it pretends to make.

This bug was apparently harmless except for normal cases involving
.ORDER statements when it made debugging of -jN using -n very
confusing.  E.g., for:

.ORDER: beforedepend .depend
depend: beforedepend .depend

where beforedepend depends on something so that it is not initially
up to date, `make [-n] -j2 depend' causes `make' to wait for itself
to make beforedepend.  This works fine without -n.  The job to make
beforedepend has normally been started, and beforedepend is marked
as made when the job completes.  However, with -n, the pseudo-job
for making beforedepend has normally completed, and in any case
there was no chance of beforedepend being marked as made.  `make'
actually exited almost immediately with status 0 instead of waiting
forever.
1998-06-04 05:48:57 +00:00
Peter Hawkins 968d4e7fe2 PR: bin/6828
Submitted by:	njs3@doc.ic.ac.uk
Obtained from:	NetBSD

Implement embedded variable expansion
1998-06-02 13:11:04 +00:00
Steve Price fe6fb5d439 Add a graceful jumping off point with a new .error directive.
PR:		6720
Submitted by:	Niall Smart <njs3@doc.ic.ac.uk>
1998-05-25 03:28:37 +00:00
John Birrell c021a0a9d0 Fix broken (at least on alpha, but probably on i386 too) code which
is supposed to walk an arry of character pointers, not an array of
characters.
1998-05-13 05:50:42 +00:00
Wolfram Schneider 43721e3d1d Some commands are shell builtins. Execute the builtins by the shell
and not directly by make(1).

PR: bin/6550
Submitted by: Theo de Raadt <deraadt@cvs.openbsd.org & wosch
1998-05-12 11:54:12 +00:00