summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.subdir.mk
Commit message (Collapse)AuthorAgeFilesLines
* MFC r289360,r289361,r289378,r289430,r289605,r289676:bdrewery2015-12-041-1/+1
| | | | | | | | | | | | | | | | | | | r289360: Add temporary workaround for .MAKE being applied to _worldtmp, since r251750. r289361: Consider top-level targets to be .PHONY as bmake won't build them otherwise if a file with the same name is found in the directory. r289378: Mark sub-make targets as .MAKE and .PHONY to handle -n and always-build properly. r289430: Remove .MAKE from targets that do more than just run sub-makes, such as calling rm or mtree. r289605: Add missing .PHONY for parallel subdir target. r289676: Add some missing '+', .MAKE, and .PHONY modifiers.
* MFC r266473,267331,267511:ian2014-08-191-6/+16
| | | | | | | | | | | | | | | | Use an intermediate target to associate with _SUBDIR which is marked .MAKE this allows make -n to do tree walks as expected without doing anything else (as intended). Use prefix _sub. to help avoid conflict with any real target. Put the test suite in its own tests.txz distribution file. Force all the contents of /usr/tests to go into a separate distribution file so that users of binary releases can easily choose to not install Create a mechanism for providing fine-grained build order dependencies during SUBDIR_PARALLEL builds. This augments the coarse .WAIT mechanism, which is still useful if you've got a situation such as "almost everything depends on A and B".
* MFC r264822: Allow .WAIT to appear in SUBDIR= listsian2014-05-121-3/+11
|
* MFC r263778:dim2014-04-091-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a SUBDIR_PARALLEL option to bsd.subdir.mk, to allow make to process all the SUBDIR entries in parallel, instead of serially. Apply this option to a selected number of Makefiles, which can greatly speed up the build on multi-core machines, when using make -j. This can be extended to more Makefiles later on, whenever they are verified to work correctly with parallel building. I tested this on a 24-core machine, with make -j48 buildworld (N = 6): before stddev after stddev ======= ====== ======= ====== real time 1741.1 16.5 959.8 2.7 user time 12468.7 16.4 14393.0 16.8 sys time 1825.0 54.8 2110.6 22.8 (user+sys)/real 8.2 17.1 E.g. the build was approximately 45% faster in real time. On machines with less cores, or with lower -j settings, the speedup will not be as impressive. But at least you can now almost max out a machine with buildworld! Submitted by: jilles MFC r263833: Enable parallel building for gnu/usr.bin and usr.bin/clang too.
* Flag recursive make targets with .MAKE (has no effect on fmake)sjg2013-06-141-4/+4
| | | | | | | make -n will still exectute such targets make -N will not. Reviewed by: obrien
* Enable ATF testing.sjg2012-11-071-0/+5
| | | | | Submitted by: Garrett Cooper Approved by: marcel (mentor)
* Add support for bmake. This includes:marcel2012-10-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Don't do upgrade_checks when using bmake. As long as we have WITH_BMAKE, there's a bootstrap complication in ths respect. Avoid it. Make the necessary changes to have upgrade_checks work wth bmake anyway. 2. Remove the use of -E. It's not needed in our build because we use ?= for the respective variables, which means that we'll take the environment value (if any) anyway. 3. Properly declare phony targets as phony as bmake is a lot smarter (and thus agressive) about build avoidance. 4. Make sure CLEANFILES is complete and use it on .NOPATH. bmake is a lot smarter about build avoidance and should not find files we generate in the source tree. We should not have files in the repository we want to generate, but this is an easier way to cross this hurdle. 5. Have behavior under bmake the same as it is under make with respect to halting when sub-commands fail. Add "set -e" to compound commands so that bmake is informed when sub-commands fail. 6. Make sure crunchgen uses the same make as the rest of the build. This is important when the make utility isn't called make (but bmake for example). 7. While here, add support for using MAKEOBJDIR to set the object tree location. It's the second alternative bmake looks for when determining the actual object directory (= .OBJDIR). Submitted by: Simon Gerraty <sjg@juniper.net> Submitted by: John Van Horne <jvanhorne@juniper.net>
* Make `make cleanilinks' work in /sys/modules.ed2009-12-061-6/+5
| | | | | | | | cleanilinks wasn't listed in <bsd.subdir.mk>. Instead of adding it to /sys/modules/Makefile, we'd better just add it to <bsd.subdir.mk> directly, so we don't need to change files like /sys/modules/sound/Makefile as well. This means you can finally clean up all those dangling symlinks created by individual module compilation at once.
* Make "manlint" recursive.ru2007-12-071-3/+2
| | | | Prodded by: obrien
* For ${SUBDIR} targets, change the type of dependency operator from `::'ru2005-05-311-2/+2
| | | | | | | | | to `:', so that it stays compatible with a stale dependency recorded in .depend when the type of "foo" changes from file to directory or back. Compensate for the loss of the "If no sources are specified, the target is always re-created" feature by marking these targets with the .PHONY attribute. While here, fix a bug in the target's script (nobody uses these targets apparently).
* Add a SUBDIR_TARGETS variable which can be set to a list ofru2005-02-141-1/+2
| | | | | | | | | | | | additional targets that will cause descending into subdirs. Example: cd /sys/modules; make load SUBDIR_TARGETS=load (But don't try it with your pet.) Submitted by: Alexey Klimov PR: 47601
* Remove trailing spaces.krion2005-01-061-1/+1
|
* Although 'Unanimous Consent' appears to be a well defined and used inimp2004-09-071-2/+2
| | | | | | | | | | | | | | | the US Senate, Canadian Parliament and Australian Senate, it was causing some confusion. After some consultation with Mark Murray, change this to 'without objection' since often times a plain-speaking term is preferable to a regionally used term. Also, clarify that this procedure is to be used when for more mundane matters that need a sanity check, but don't need the whole, ponderous voting proceedure that more difficult issues require. Core members that read email in any given 48 hour period are trusted enough to know the difference and to provide the sanity check as necessary. Reviewed by: markm
* Use the '+' flag to make make recurse into sub-directories even whenharti2004-08-091-5/+5
| | | | | | | | given -n. For POLA reasons this behaviour is switched on only when at least two -n flags are given to make. One -n flag keeps the old behaviour of showing the shell command that would recurse into the sub-directories. Discussed with: ru
* Moved the `distribute' target from bsd.obj.mk to bsd.subdir.mk,ru2002-07-121-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to make it call `install' in the bsd.subdir.mk-driven makefiles too. (share/examples/Makefile,v 1.29 changed the bsd.prog.mk to bsd.subdir.mk and many stuff was lost during "make release". I then merged this change in rev. 1.28.2.2 to work around the namespace pollution (FILES) in this makefile.) There was an added complexity here. Both the `distribute' and `install' targets are recursive (they propagate to SUBDIRs). So `distribute' first calls `install' in the ${.CURDIR}, then calls `distribute' in each SUBDIR, etc. The problem is that `install' (being also recursive) causes the stuff from SUBDIR to be installed twice, first time thru `install' in ${.CURDIR} triggered by `distribute', second time by `distribute' run in the SUBDIR. This problem is not new, but it became apparent only after I moved the `distribute' target from bsd.obj.mk to bsd.subdir.mk. My first attempt testing the fix failed due to this, because the whole world was distributed twice, causing all the imaginable mess (kerberos5 stuff was installed into both "base" and "krb5" dists, there was /sbin/init.bak, etc.) I say the problem is not new because bsd.prog.mk and bsd.lib.mk makefiles with SUBDIR (even without this fix) had this problem for years. Try e.g. running ``make distribute DISTDIR=/foo'' from usr.bin/bzip2 or from lib/libcom_err (without the fix) and watch the output. So the solution was to make `install' behave non-recursive when executed by `distribute'. My first attempt in passing SUBDIR= to the `install' in the `distribute' body failed because of the way how src/Makefile and src/Makefile.inc1 communicate with each other. SUBDIR='s assignment precedence on the "make install SUBDIR=" command line is lowered after src/Makefile wrapper calls "make ... -f ${.CURDIR}/Makefile.inc1 install" because SUBDIR= is moved into environment, and Makefile.inc1's assignments now take higher precedence. This may be fixed someday when we merge Makefile with Makefile.inc1. For now, this is implemented as a NO_SUBDIR knob. Spotted by: Dmitry Pryanishnikov <dmitry@atlantis.dp.ua> Prodded by: des MFC after: 3 days
* Get rid of the bogus dependencies between beforeinstall, realinstall,ru2002-07-011-3/+2
| | | | | | | | | | and afterinstall targets. Make sure they are run in sequence in the -j case. This fixes the recent breakage with beforeinstall being run _after_ realinstall. Reported by: knu
* Reimplement FILES support using bsd.files.mk with theru2002-06-031-1/+1
| | | | | | | | same set of features as in recently added bsd.incs.mk (FILESGROUPS, accessibility from both bsd.prog.mk and bsd.lib.mk, de-pessimized typical installation path, etc.) New standard targets: buildfiles, installfiles, and files (buildfiles + installfiles).
* Rename `includes' to `buildincludes'.ru2002-05-151-1/+12
| | | | | | Rename `incsinstall' to `installincludes'. Make `includes' a -j safe shortcut for `buildincludes' + `installincludes'. `buildincludes' and `installincludes' are SUBDIR friendly, if run directly.
* Added new bsd.incs.mk which handles installing of header filesru2002-05-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | via INCS. Implemented INCSLINKS (equivalent to SYMLINKS) to handle symlinking include files. Allow for multiple groups of include files to be installed, with the powerful INCSGROUPS knob. Documentation to follow. Added standard `includes' and `incsinstall' targets, use them in Makefile.inc1. Headers from the following makefiles were not installed before (during `includes' in Makefile.inc1): kerberos5/lib/libtelnet/Makefile lib/libbz2/Makefile lib/libdevinfo/Makefile lib/libform/Makefile lib/libisc/Makefile lib/libmenu/Makefile lib/libmilter/Makefile lib/libpanel/Makefile Replaced all `beforeinstall' targets for installing includes with the INCS stuff. Renamed INCDIR to INCSDIR, for consistency with FILES and SCRIPTS, and for compatibility with NetBSD. Similarly for INCOWN, INCGRP, and INCMODE. Consistently use INCLUDEDIR instead of /usr/include. gnu/lib/libstdc++/Makefile and gnu/lib/libsupc++/Makefile changes were only lightly tested due to the missing contrib/libstdc++-v3. I fully tested the pre-WIP_GCC31 version of this patch with the contrib/libstdc++.295 stuff. These changes have been tested on i386 with the -DNO_WERROR "make world" and "make release".
* Added internal, non-recursive (SUBDIR) versions of the `all-man'ru2002-05-071-2/+2
| | | | | | | | and `maninstall' targets. This fixes the issue where each subdir was descended into twice during "make all", and also resurrects the standardization of `maninstall'. Urged by: bde
* Milestone #1 in cross-arch make releases.ru2002-04-261-13/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not install games and profiled libraries to the ${CHROOTDIR} with the initial installworld. Eliminate the need in the second installworld. For that, make sure _everything_ is built in the "world" environment, using the right tool chain. Added SUBDIR_OVERRIDE helper stuff to Makefile.inc1. Split the buildworld process into stages, and skip some stages when SUBDIR_OVERRIDE is set (used to build crypto, krb4, and krb5 dists). Added NO_MAKEDB_RUN knob to Makefile.inc1 to avoid running makewhatis(1) at the end of installworld (used when making crypto, krb4, and krb5 dists). In release/scripts/doFS.sh, ensure that the correct boot blocks are used. Moved the creation of the "crypto" dist from release.5 to release.2. In release.3 and doMFSKERN, build kernels in the "world" environment. KERNELS now means "additional" kernels, GENERIC is always built. Ensure we build crunched binaries in the "world" environment. Obfuscate release/Makefile some more (WMAKEENV) to achieve this. Inline createBOOTMFS target. Use already built GENERIC kernel modules to augment mfsfd's /stand/modules. GC doMODULES as such. Assorted fixes: Get rid of the "afterdistribute" target by moving the single use of it from sys/Makefile to etc/Makefile's "distribute". Makefile.inc1: apparently "etc" no longer needs to be last for "distribute" to succeed. gnu/usr.bin/perl/library/Makefile.inc: do not override the "install" and "distribute" targets, do it the "canonical" way. release/scripts/{man,cat}pages-make.sh: make sure Perl manpages and catpages appear in the right dists. Note that because Perl does not respect the MANBUILDCAT (and NOMAN), this results in a loss of /usr/share/perl/man/cat* empty directories. This will be fixed soon. Turn MAKE_KERBEROS4 into a plain boolean variable (if it is set it means "make KerberosIV"), as documented in the make.conf(5) manpage. Most of the userland makefiles did not test it for "YES" anyway. XXX Should specialized kerberized libpam versions be included into the krb4 and krb5 dists? (libpam.a would be incorrect anyway if both krb4 and krb5 dists were choosen.) Make sure "games" dist is made before "catpages", otherwise games catpages settle in the wrong dist. Fast build machine provided by: Igor Kucherenko <kivvy@sunbay.com>
* The install.debug and reinstall.debug targets are needed solelyru2002-04-241-2/+1
| | | | | | | | | | to build kernel and kernel modules so stop supporting them in bsd.subdir.mk and reimplement them in kern.post.mk and kmod.mk as special versions of the install and reinstall targets, and only define them if DEBUG is also defined (when debug versions are really built). Prompted by: bde
* Change the name of the 'bin' distribution to 'base'.obrien2002-04-231-2/+2
| | | | | | | This is done since it contains much more than /bin, and also gets in the way when making a combined install+fixit CD. OK'ed by: jkh
* Merge bsd.obj.mk's version of the _SUBDIR target with bsd.subdir.mk.ru2002-04-231-10/+10
| | | | | | | | | | | | | | | | 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.)
* Don't include bsd.own.mk from sys.mk, this makes it impossibleru2002-04-171-8/+1
| | | | | | | | | | | | | | | | | | | | | 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.
* Back out revision 1.23 (SUBDIR_CHANGE).ru2002-02-061-37/+12
| | | | Not objected to by: bde, eivind
* Support the "install.debug" and "reinstall.debug" targets for kernel modules.des2001-10-271-1/+2
| | | | | | | | | Small tweaks to kldxref may be necessary to avoid the surprising (but harm- less) behaviour of 'kldload foo' loading foo.ko.debug instead of foo.ko if it is present in the kernel directory. Approved by: a week of silence on -arch MFC after: 2 weeks
* Make it possible to build manpages for the entire source tree.ru2001-03-271-2/+2
|
* Fix typo.marcel2000-01-031-1/+1
| | | | Submitted by: Richard Wackerbarth <rkw@dataplex.net>
* ${MACHINE} -> ${MACHINE_ARCH}marcel1999-11-141-5/+5
| | | | | | | | | | | | | | | | All Makefiles now use MACHINE_ARCH for the target architecture. Unification is required for cross-building. Tags added to: sys/boot/Makefile sys/boot/arc/loader/Makefile sys/kern/Makefile usr.bin/cpp/Makefile usr.bin/gcore/Makefile usr.bin/truss/Makefile usr.bin/gcore/Makefile: fixed typo: MACHINDE -> MACHINE_ARCH
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Restored objlink. The previous commit was confused about the differencebde1999-03-211-3/+3
| | | | between OBJLINK and objlink.
* Bitrot. Remove objlink as it is not pleasant to be downwind.markm1999-03-141-3/+3
| | | | | PR: 8071 Reviewed by: Sheldon Hearn <sheldonh@iafrica.com>
* Make ../Makefile.inc handling more consistant to prevent multiple includespeter1998-08-081-1/+7
| | | | | | 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).
* Delete stale comment.wosch1998-05-061-4/+2
| | | | Pointed out by: bde
* Support for fine-grained external control of subdir building.eivind1998-03-291-12/+38
|
* Remove special handling of 'tags' for complex subdir systemseivind1998-03-261-26/+4
| | | | | | (presently only used in tip; should have been used by e.g. pkg_add). Submitted by: bde
* Support new version of global.eivind1998-03-231-5/+5
| | | | | Submitted by: Shigio Yamaguchi <shigio@wafu.netgate.net> Tested by: make buildworld
* Introduce the 'regress' target.eivind1998-03-121-2/+2
| | | | Silently approved by: -hackers, -current
* target(__target) -> target(${__target})wosch1997-11-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | PR: bin/4736 Submitted by: Martin Kammerhofer <dada@sbox.tu-graz.ac.at> Index: bsd.subdir.mk =================================================================== RCS file: /usr/cvs/src/share/mk/bsd.subdir.mk,v retrieving revision 1.18 diff -u -r1.18 bsd.subdir.mk --- bsd.subdir.mk 1997/06/21 15:40:34 1.18 +++ bsd.subdir.mk 1997/11/09 18:04:33 @@ -59,7 +59,7 @@ .for __target in all checkdpadd clean cleandir depend lint \ maninstall obj objlink -.if !target(__target) +.if !target(${__target}) ${__target}: _SUBDIRUSE .endif .endfor
* Change the distribute targets so that a given item in our source treejkh1997-06-211-2/+4
| | | | can place itself into n distributions, where n >= 1.
* Support GLOBAL style tags.jkh1997-04-131-3/+25
|
* Remove ${MAKEFLAGS} on recommendation by Bruce, mainly because the reasonscrappy1997-03-311-2/+2
| | | | | for adding it was so that -j3 carried through on a make -j3 world, but found at least one circumstance where it breaks 'make depend'
* Add ${MAKEFLAGS} to ${MAKE} in _SUBDIRUSE so that something likescrappy1997-03-301-2/+2
| | | | | | | 'make -j3 world' works Jordan points out that this may not be the only place this is required to be added, but so far, its the only one I've found to break -j3
* Add comments.wosch1997-03-091-2/+33
|
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-01-141-1/+1
| | | | | | | | 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.
* Added a `checkdpadd' target to help check that ${DPADD} is consistent withbde1996-09-201-2/+3
| | | | ${LDADD}. It doesn't handle internal libraries very well yet.
* Add default targets for cleandepend and objlink.jkh1996-06-241-2/+2
| | | | Submitted by: Michael Hancock <michaelh@cet.co.jp>
* remove BINGRP?=, BINOWN?=, BINMODE?=, STRIP?=wosch1996-04-051-44/+11
| | | | use .for loop for common targets
OpenPOWER on IntegriCloud