This breaks cross-building with WITH_META_MODE since it will rebuild
'build-tools' during the 'everything' phase.
A more proper fix is coming to bmake to implicitly require .META unless
.NOMETA (and other restrictions) are in place.
Adding .META to targets-to-build will ensure that they will rebuild if there
is no .meta file.
Adding it to all SUFFIXES and objects ensures that at least objects will
rebuild if there is no .meta file.
This will be reverted if bmake's behavior changes to rebuild on missing .meta
files.
Sponsored by: EMC / Isilon Storage Division
For PROGS this was recursing twice since MAKELEVEL0 is for 'dirdeps'
which then really builds in a sub-make.
Sponsored by: EMC / Isilon Storage Division
Before this, if a file was installed to DESTDIR/some/dir and that directory
was missing due to not having ran 'make distrib-dirs' yet, the file would
be installed as 'some/dir'. For something like bsd.incs.mk with INCLUDEDIR
being a sub-directory of /usr/include, this could result in all of the headers
being installed to a file rather than getting a directory of them.
Now it will error that the file/directory does not exist rather than hide
the issue.
Another option being discussed is to implement GNU's install -D flag which
would auto create any missing directories.
This is a mitigation of the problem. The proper order to the build is to
run 'make distrib-dirs' first, but that can be forgotten if building from
a sub-directory after updating the source code to the latest revision.
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
As a side-effect now info pages will always be built/installed if
MK_INFO == yes, whereas before their presence was conditional based on the
value of MK_INFO
This .mk file might be removed in the future, pending discussion on -arch. For
now unbreak its use outside of src (with the only use in ports according to
bapt being devel/cvs*)
X-MFC with: r276551, r276556
Reviewed by: bapt
Differential Revision: D1413
Reported by: scottl
I'm not very fond of using the non-standard lockf(1) here, but I
have no better idea at the moment. NetBSD uses ln(1) to create a
lock file, but this approach can result in a deadlock if make is
interrupted, leaving an orphaned lock file.
Ensure all standard targets honor SUBDIR. Now `make obj' descends into
SUBDIRs even if NOOBJ is set (some descendants may still need an object
directory, but we do not have such precedents). Now `make install' in
non-bsd.subdir.mk makefiles runs `afterinstall' target _after_ `install'
in SUBDIRs, like we do in bsd.subdir.mk. Nothing depended on the wrong
order anyway.
Fixed `distribute' targets (except for the bsd.subdir.mk version) so that
they do not depend on _SUBDIR; `distribute' calls `install' which already
depends on _SUBDIR.
De-standardize `maninstall', otherwise manpages would be installed twice.
(To be revised later.)
to use ``.if defined()'' inside bsd.own.mk to test for defines
in individual makefiles. For example, setting DEBUG_FLAGS in
Makefile didn't take the desired effect on the STRIP assignment.
Added bsd.init.mk (like in NetBSD) that handles the inclusion
of ../Makefile.inc and bsd.own.mk from all bsd.*.mk files that
"build something".
Back out bsd.own.mk,v 1.15: moved OBJFORMAT initialization back
to sys.mk (several source tree makefiles want to check it early)
and removed MACHINE_ARCH initialization (it's hard to see from
looking at the commitlogs what the problem was at the time, but
now it serves no purpose).
Prohibit the direct inclusion of bsd.man.mk and bsd.libnames.mk.
Protect bsd.obj.mk from repetitive inclusion. Prohibiting the
direct inclusion of bsd.obj.mk might be a good idea too.
"env name=value ... cmd ..." was just a pessimized way of doing
"name=value ... cmd ...". Note that make(1) can't optimize
either of these to an exec of env(1) or "cmd" even if the second
"..." is simple, since it can't tell that the shell metacharacter
in "name=value" is actually handled by env(1).
there happens to be a source file named install.sh. The null rule
for "install" in the NOINFO case must not be completely null, since
then it may be overridden by the implicit .sh rule.
when certain .mk files include other .mk files. This will remove the
need for multiple include protection in some other makefiles around the
tree (and helps some elf conditionals).
bsd.obj.mk instead of bsd.dep.mk for defining the _SUBDIR target
and a default tags target. Abuse bsd.obj.mk for defining default
cleandepend and depend targets.
when there is no /usr/src/share/info if it were actually used.
Added comments to explain duplicated tex commands.
Use substitution in IFILENS to simplify some things.
Removed /g from many substitutions. It is bogus for anchored matches.
Don't echo nothing.
Don't add things that wouldn't be built with the current options to
CLEANFILES (except for some cases involving tex).
Reviewed by: wosch
Run tex twice due cross references.
Cleanup many tex generated files in `make clean'
Format latin1 output in 80 characters column (was ~110 characters).
with these files MUST understand what a `make release' does before
making changes like this or get nasty-grams from me when my builds start
falling over. In fact, if they can't test "make release" after making
such changes then they *should leave these files completely alone*.
Thank you.
file so that we fail if it isn't already installed. The bootstrap
is now done by `make install' in the top-level src directory. As
well as being gross, the rule didn't actually work for src trees
other than /usr/src, and this is difficult to fix since the whole
src tree may not exist.
is most useful for centralizing the definitions of paths to contrib
directories.
Removed useless subshell and evil-hiding @ in the the rule for
initializing the info dir.
interesting problems because the resulting file is newer than the source
and this stops 'make' from rebuilding it. Go via an intermediate file
and rename to make sure this doesn't happen.
to before they are used in .for loops and .SUFFIXES lists, or it
doesn't work! Without this, 'make all' doesn't gzip the result as the
generated 'all' target doesn't seem to be defined completely.
bsd.doc.mk:
rename GZIPCMD to DCOMPRESS_CMD, add DCOMPRESS_EXT
bsd.info.mk:
rename GZIPCMD to ICOMPRESS_CMD, add ICOMPRESS_EXT
set INFOTMPL to ${INFODIR}/dir-tmpl
bsd.man.mk
rename ZEXTENSION to MCOMPRESS_EXT, MCOMPRESS to MCOMPRESS_CMD