we use in sublte ways with relative paths. Until they can be resolved,
back out these changes and put a big comment about why using realpath is
busted.
Approved by: jmallett
MFC After: 100 millifortnights
seen (somewhat) in NetBSD. This catches a few extra recursion cases that
could be hidden by expanding a NIL variable causing an existing variable to
be returned (which caused infinite looping and climbing memory usage in at
least one case).
Obtained from: NetBSD (in principle)
of ReadMakefile as __unused, it's there because this function is used by
the abstracted list interface which normally deals with item handlers which
take two arguments. Add a missing static prototype.
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
it, which means that relative paths will be expanded to absolute paths, and
filenames without a path will end up with their absolute path included as
well. This aids tremendously in debugging a build using our make(1) with
multiple Makefile's, such as when there is a syntax error in a file in a
sub-directory as per <bsd.subdir.mk>. Normally we'd end up with just
"Makefile" known about the Makefile in question, which means that an error
would be useless for someone trying to debug their build system, now we
end up with a complete real pathname for the Makefile.
So mostly this is useful in a debugging context, but possibly others too
(I haven't thought of them yet, but they probably are more useful if you
make Dir_FindFile use realpath(3), but that's another story).
Reviewed by: -current
MFC after: 2 weeks
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.
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
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.
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
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
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.
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
.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!!)
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
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
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)
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
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>
all-lower or all-upper case characters, respectively. These were added
to further reduce differences between NetBSD/OpenBSD and FreeBSD make(1)
to propagate OpenPackages.
PR: 19959
Submitted by: Gaspar Chilingarav <nm@web.am>
but allows for regex. I removed NO_REGEX since no one could give a reason
to have it, and since we don't use make in bootstrap tools, it's not needed.
This is mostly added to synch up with NetBSD/OpenBSD so as to eliminate
roadblocks in the OpenPackages project (see http://www.openpackages.org/).
It's also quite useful, and costs us only about 3 kilobytes of space.
PR: 21605
Submitted by: Hubert Feyrer <hubertf@NetBSD.org>
Reviewed by: silence on -arch
Obtained from: NetBSD
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>