Commit Graph

174 Commits

Author SHA1 Message Date
Philippe Charnier
e8937ba009 Use `The .Nm utility' 2002-04-20 12:18:28 +00:00
David E. O'Brien
ccf3ce3e97 Move the sysV variable substitution up with the BSD feature that replaced it. 2002-04-19 04:08:35 +00:00
Ruslan Ermilov
78257b6288 Do not reset MAKEFILE when reading ".depend" as this rather
eliminates the usefulness of ${MAKEFILE}.

Obtained from:	NetBSD
MFC after:	1 week
2002-04-18 12:04:34 +00:00
David E. O'Brien
75a778e9f8 Back out rev 1.17, it breaks dependencies.
With rev 1.7 one cannot build src/bin/sh -- because make fails to create
the buildtools before trying to use them.  Actually it does compile the
buildtools into .o's before trying to use them, but not all the way into
binaries.
2002-04-14 04:15:34 +00:00
David E. O'Brien
ade4ded301 Revision 1.17 seems to break a subsequent buildworld (i.e. with the new
make installed) in gnu/usr.bin/groff/src/preproc/eqn (which, being a
build tool itself, is built with the original make during buildworld).

The problem seems to be that in str_concat(), the string is not
terminated when the length of the second string is 0.
This apparently can happen during null suffix rule processing.

Submitted by:	tmm
2002-04-13 19:36:47 +00:00
David E. O'Brien
79f407f91e Fix a minor lint warning. 2002-04-13 12:20:51 +00:00
David E. O'Brien
664a5a88d4 Prefer BSDmakefile over makefile and Makefile.
Submitted by:	jmallett
Obtained from:	OpenBSD
2002-04-13 12:18:00 +00:00
David E. O'Brien
9b24805230 Fix copyrights, and undo SCS ID damage. 2002-04-13 10:57:56 +00:00
David E. O'Brien
4d1f4209a6 Update SCM ID method. 2002-04-13 10:17:18 +00:00
David E. O'Brien
302d0b1426 Make str_concat handle NULL arguments properly (a-la how ODE-2.3.6 make does).
Submitted by:	jmallett
Inspired by:	CMU BUILDTOOLS4 coredumping, ODE-2.3.6 make(1)
2002-04-13 10:13:39 +00:00
David E. O'Brien
a59e308cd7 De'register. 2002-04-13 10:05:30 +00:00
David E. O'Brien
46f905209d Constify str_concat()
Submitted by:	jmallett
2002-04-13 09:49:33 +00:00
David E. O'Brien
da363cd56a Check to make sure fdopen() succeeds in make(1).
Submitted by:	jmallett
Inspired by:	NetBSD
2002-04-13 09:10:07 +00:00
Philippe Charnier
2cafd1dca7 Un.Ar makefile. The add of .Ar was part of my last commit.
Asked by:	ru
2002-04-12 16:05:53 +00:00
Philippe Charnier
cb497d661f Reorder #include. Cast arg #2 of lseek to an off_t when constant. No need to
test if failsafe memory allocation fails, it can't. perror -> warn. Use
failsafe memory allocation provided.

Use .Pa and .Ar. Uppercase (first letter) programname after dot.
2002-04-12 13:23:33 +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
Warner Losh
d3cb5ded92 remove __P 2002-03-22 01:33:25 +00:00
Crist J. Clark
c62ec993b4 make(1) claims to ignore the remainder of a conditional once its value
has been determined similar to C. That is, one expects a construction
like,

.if defined(TEST) && (${TEST:L} == "test")

Never to generate an error since the second expression should never be
evaluated when TEST is undefined.

However, this was not the case. The above fails with the current
make(1) if TEST is undefined. This patch fixes the above and many
similar cases.

PR:		bin/34032
Submitted by:	Alan Eldridge <alane@geeksrus.net>
MFC after:	1 week
2002-02-20 14:31:19 +00:00
Jens Schweikhardt
e3e5c7667e Make substitutions in internal macros like $(@F:.o=.c) work.
This should not affect our build process, as

	find /usr/src -name Makefile | xargs grep '@[DF]'

has no matches (other than FreeBSD.org email addresses :-)

PR:		bin/24377
Submitted by:	Mark Valentine <mark@thuvia.demon.co.uk>
Reviewed by:	Matthew Emmerton <matt@gsicomp.on.ca>
MFC after:	4 weeks
2002-01-12 10:45:27 +00:00
Ruslan Ermilov
57e4378bf6 mdoc(7) police: protect trailing full stops of abbreviations
with a trailing zero-width space: `e.g.\&'.
2001-08-10 13:45:36 +00:00
Sheldon Hearn
e1b4d8d074 Use STD{ERR,IN,OUT}_FILENO instead of their numeric values. The
definitions are more readable, and it's possible that they're
more portable to pathalogical platforms.

Submitted by:   David Hill <david@phobia.ms>
2001-07-26 11:02:39 +00:00
Ruslan Ermilov
f72acdd4c9 Clarify that MAKEOBJDIR and MAKEOBJDIRPREFIX are environment variables.
Submitted by:	bde
2001-07-16 15:33:34 +00:00
Dima Dorfman
f247324df7 Remove whitespace at EOL. 2001-07-15 08:06:20 +00:00
David E. O'Brien
f23466b9fd Note that sys.mk is read before any other file (even Makefile) 2001-05-23 18:21:36 +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
Dima Dorfman
f238e04f6f mdoc(7) police: remove hard sentence breaks. 2001-04-30 23:20:43 +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
Ruslan Ermilov
f8532548a6 -Wall cleanup. 2001-04-25 14:45:36 +00:00
Ruslan Ermilov
73295d34c7 unifdef -UWANT_ENV_PWD.
No one ever going to use this bugfeature.
2001-04-25 14:44:42 +00:00
Ruslan Ermilov
43403d166a Make ${.OBJDIR} canonical.
Reviewed by:	bde
2001-04-25 14:22:38 +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
fdcd2e7d3a Revert previous change -- apparently it's not quite right. It broke
src/sys/modules/if_ef and possibly other things.  I tested the build with
a make based on rev. 1.26, and it worked fine.  Since I'm not particularly
inclined to figure out what's going on with this, it's probably prudent
just to back it out for now.

Found by:	jkh
Suggested by:	jhay
2001-03-15 10:22:50 +00:00
Will Andrews
fff8dac495 Fix make(1) bug: nested comments may be placed in .if, .else .if, and
.endif statements but can't be placed in .elif.  Basically, the problem
was that ParseSkipLine() didn't handle comments the same way that
ParseReadLine() did, and thus you had errors with comments that are on a
conditional line (i.e. "^.") rather than a non-conditional line.

MFC candidate for 4.3-STABLE and 3.5-STABLE.

PR:			25627
Bug found by:		jhs
Fix submitted by:	Seth Kingsley <sethk@osd.bsdi.com>  (thanks!!)
2001-03-15 02:51:11 +00:00
Thomas Moestl
a333d4f752 Fix two bugs in null suffix handling. Both occured only after the suffix
list was cleared.
Rules with null suffixes would not be rebuilt when the suffixes were
added again.
Adding null suffix rules would fail when a rule for the same source was
declared before the suffix list was cleared.

PR:		23328, 24102
Reviewed by:	will
Approved by:	rwatson
2001-03-08 00:55:08 +00:00
Warner Losh
e829cbf262 Include -DDEFSHELL=1 in Makefile.dist so people boostrapping will
have a sane default.

Also add $FreeBSD$ while I'm here.

Pointed out by: bde
2001-03-01 06:26:32 +00:00
Warner Losh
20b367cea1 MAXPATHLEN includes the trailing NUL.
Correct array sizes to reflect this.
Correct NUL termination after strncpy.

# Didn't to strncpy -> strlcpy change.
2001-03-01 06:03:17 +00:00
Kris Kennaway
0937df81ca Introduce support for using OpenSSL ASM optimizations. This is done
through the use of a new build directive, MACHINE_CPU, which contains a
list of the CPU generations/features for which optimizations are desired.
This feature will be extended to cover the ports tree in the future.

Currently OpenSSL provides optimizations for i386, i586 and i686-class
CPUs. Currently it has not been tested on an i386 or i486.

Teach make(1) to provide sensible defaults for MACHINE_CPU if it is not
defined (namely, the lowest common denominator CPU we support for each
architecture).  Currently this is i386 for the i386 architecture and ev4
for the alpha.  sys.mk also sets the variable as a last resort for
consistency with MACHINE_ARCH and bootstrapping from very old versions of
make.

Benchmarks show a significant speed increase even in the i386 case, with
additional improvements for i586 and i686 systems.  For maximum performance
define MACHINE_CPU=i686 i586 i386 in /etc/make.conf.

Based on a patch submitted by:  Mike Silbersack <silby@silby.com>
Reviewed by:    current
2001-02-19 03:59:05 +00:00
Jeroen Ruigrok van der Werven
d7d97eb0aa Preceed/preceeding are not english words. Use precede and preceding. 2001-02-18 10:43:53 +00:00
David Malone
d3d8587299 Uname is in section 3 of the manual pages.
PR:		25008
Submitted by:	fullermd@over-yonder.net
2001-02-11 21:19:31 +00:00
Will Andrews
2de6a43d0a Fix nasty bug where make(1) assumed that you could read the directory it
was in.  This shall be MFC'd in about three days (probably not a good idea
to MFC the stylistic changes though - see below).

PR:		19978
Submitted by:	Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
Patch by:	roam (slightly modified by me to use NULL not NIL)
2001-02-10 07:12:18 +00:00
Ruslan Ermilov
d0353b836e mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:38:02 +00:00
Will Andrews
e3cb529472 Fix style(9) bug; use ISDOT[DOT,]() macro available in util.c by moving
it to make.h so both dir.c and util.c can use it, although bde didn't
particularly like this part of the idea, IMO it's cleaner than it was.

Submitted by:	bde
2001-01-21 08:24:41 +00:00
Ruslan Ermilov
1bfea903ed Prepare for mdoc(7)NG. 2001-01-16 09:39:23 +00:00
Will Andrews
111632fd99 Fix for the case where the first two entries returned by readdir() are
actually NOT '.' and '..'.  Apparently this isn't the case when accessing
a directory via XFS over NFS on SGI systems.  Since I don't have access to
an environment like that, this will sit out in -current for at least six
weeks.  However, the patch proposed by the submitter seems acceptable, so
I've decided to commit it to the tree, in the hope that it will solve some
problems without bringing up others.

PR:		23300
Submitted by:	Jim Pirzyk <Jim.Pirzyk@disney.com>
2000-12-26 07:36:07 +00:00
Ruslan Ermilov
9b88faecd3 Prepare for mdoc(7)NG. 2000-12-19 16:00:12 +00:00
Dag-Erling Smørgrav
65f74359cb Fix a bug introduced in rev. 1.17: initialize variables before use, not after.
Rev. 1.17 was "Obtained from NetBSD", but is significantly different from the
equivalent NetBSD revision (rev. 1.30), which does not have this bug.
2000-12-16 02:14:37 +00:00
Will Andrews
1a1a8c9324 There's also no point in #typedef'ing void/char pointers. Accordingly,
rip out ClientData/Address pointers and use standard types.

Obtained from:	OpenBSD
2000-12-02 20:24:42 +00:00
Will Andrews
98c28d6cc5 There's no reason to use fancy forms of NULL. Replace all instances
of NIL, NILLST, NILLGNODE, etc. with NULL.

Obtained from:		OpenBSD
2000-12-02 18:58:01 +00:00
Will Andrews
313c36f04b Format string paranoia. This should avoid potential buffer overflows from
user input (in its ever-broadening definition).

Obtained from:	NetBSD
2000-11-30 13:56:19 +00:00