summaryrefslogtreecommitdiffstats
path: root/share/mk/bsd.obj.mk
Commit message (Collapse)AuthorAgeFilesLines
* Add support for bmake. This includes:marcel2012-10-061-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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 sure the only thing that follows .endif or .else is a comment.harti2005-04-111-2/+2
|
* Remove trailing spaces.krion2005-01-061-2/+2
|
* Start the dreaded NOFOO -> NO_FOO conversion.ru2004-12-211-4/+4
| | | | OK'ed by: core
* Mark the "obj" target with the .PHONY attribute.ru2004-04-131-1/+1
|
* Fix a very corner case when you want to make cleandir SUBDIRs whichgreen2004-01-021-2/+2
| | | | | | are built using a ${MAKE} that's not just "make". Test by: make universe (followed by cleandirs)
* test -h is deprecated; use -L instead.kris2002-08-311-1/+1
| | | | | | Submitted by: april <april@oublinet.net> PR: misc/38724 (part of) MFC after: 3 days
* Moved the `distribute' target from bsd.obj.mk to bsd.subdir.mk,ru2002-07-121-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Moved checkdpadd target to where it logically belongs.ru2002-07-031-25/+0
|
* Fixed typos.ru2002-07-011-4/+4
|
* Quiet ``make objlink'' when NOOBJ is defined.ru2002-06-211-1/+3
| | | | | PR: bin/21142 Submitted by: Craig Leres <leres@ee.lbl.gov>
* Abuse bsd.obj.mk for defining default distribute target.ru2002-04-241-0/+8
|
* Merge bsd.obj.mk's version of the _SUBDIR target with bsd.subdir.mk.ru2002-04-231-36/+6
| | | | | | | | | | | | | | | | 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.)
* Fixed _SUBDIR.ru2002-04-221-4/+8
| | | | Obtained from: bsd.subdir.mk
* Don't include bsd.own.mk from sys.mk, this makes it impossibleru2002-04-171-0/+6
| | | | | | | | | | | | | | | | | | | | | 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.
* Really finish the removal of ${LDDESTDIR} in bsd.lib.mk,v 1.55.ru2002-04-111-1/+1
| | | | bsd.lib.mk,v 1.101 only did that partly.
* Neither .depend nor ${DEPENDFILE} depend on _SUBDIR.ru2002-02-061-1/+1
| | | | (One step closer to _SUBDIR <-> _SUBDIRUSE merge.)
* Fixed `objwarn' so that it doesn't issue spurious warnings,ru2001-05-201-3/+18
| | | | | | | especially now that ${.OBJDIR} is canonicalized by make(1). Urged by: bde Reviewed by: bde
* ... and do it make(1) way.ru2001-04-261-5/+5
|
* Fix the fix in rev.1.34.ru2001-04-231-1/+1
| | | | | Makes `cleandir' DTRT if MAKEOBJDIRPREFIX set and not empty, like in `buildworld' case.
* Use test -z rather than -n.obrien2000-11-011-1/+1
| | | | Submitted by: bde
* Fix the arguments to [(1) (AKA test(1)). If the string being testedmarkm2000-08-191-1/+1
| | | | | | | by -n is nonexistant, then the following -d was misinterpreted with a strange error. By putting double quotes (") around the argument, we can be sure there is _something_ there that we can check a zero length against.
* The previous delta was wrong; an empty MAKEOBJDIRPREFIX shouldsheldonh2000-08-171-2/+2
| | | | | | | | | | | | cause the working directory to be used. Make it so. When we're more convinced that it'll work, we might try this to avoid a shell invocation: .if defined(MAKEOBJDIRPREFIX) && !empty(MAKEOBJDIRPREFIX) && exists(${CANONICALOBJDIR}/) Reported by: bde
* Do not allow the cleandir target to blow away the entire sourcesheldonh2000-08-161-1/+1
| | | | | | directory when MAKEOBJDIRPREFIX is defined but empty. Reported by: Vernon Schryver <vjs@calcite.rhyolite.com>
* ${MACHINE} -> ${MACHINE_ARCH}marcel1999-11-141-2/+2
| | | | | | | | | | | | | | | | 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-1/+11
| | | | between OBJLINK and objlink.
* Bitrot. Remove objlink as it is not pleasant to be downwind.markm1999-03-141-30/+2
| | | | | PR: 8071 Reviewed by: Sheldon Hearn <sheldonh@iafrica.com>
* BINFORMAT -> OBJFORMAT ready for E-day.jb1998-08-301-2/+2
|
* Make the whereobj target print it's output without the overhead ofpeter1998-06-041-2/+2
| | | | | starting another make.. Besides, make -V is broken, since it will print unexpanded variables.
* Only include bsd.dep.mk in `mk'files that handle C sources. Abusebde1998-05-061-1/+24
| | | | | | 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.
* Improved comparison of ${DPADD} with ${LDADD} for the checkdpadd target.bde1998-03-141-6/+10
| | | | | | `BINFORMAT=foo make checkdpadd' in /usr/src now reports only 2 false negatives (in libss and init). (BINFORMAT=foo is to turn off better handling of the a.out case.)
* Remove ${CLEANDIRS} in the default clean rule, so that bsd.prog.mk canbde1998-02-251-3/+8
| | | | | | | use the default without losing any (currently unused) features. (CLEANDIRS is only used by for libgmp and libmp via bsd.lib.mk, and only documented everywhere it is supported except of course where it is actually used.)
* Only remove ${CLEANFILES} in the default clean rule. In particular,bde1997-12-191-18/+16
| | | | | | | | | | | | | | | | | | don't remove a.out explicitly. a.out should only be generated for libraries and is removed in the non-default rule in bsd.lib.mk. Removed undocumented cleanfiles target. It was the same as the default clean target except it didn't descend into subdirs. It was different from special clean targets in other ways. This feature hasn't been missed for more important targets. Removed unused default cleandepend target. bsd.dep.mk has a better version which is always used. Use a better rule for checkdpadd in the BINFORMAT=aout case. This mainly checks that ld -f is working correctly. The old rule is still available via `make BINFORMAT=foo checkdpadd' and should be used to check for regressions under 2.2 where ld -f is not available.
* Added trailing slash to ${CANONICALOBJDIR} in tests for directories,bde1997-04-301-7/+7
| | | | so that /usr/obj can be a symlink to an existing directory.
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* In the "cleanobj" target, always remove the old-style "${.CURDIR}/obj"jdp1997-02-141-2/+0
| | | | | | | links if they exist. The old-style links confused make and caused problems when upgrading from a 2.1.5 or 2.1.6 system. I will merge this into -2.2.
* 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.
* Don't warn about non-canonical object directories if they have beenbde1996-09-291-15/+20
| | | | | | | | | forced in any of the standard ways (MAKEOBJDIR was lost in the previous commit). Simplified the conditionals for this. Restored comment about MAKEOBJDIR from rev.1.4. Improved English in comments.
* The warning was triggering off the unused variable MAKEOBJDIR, insteadnate1996-09-281-2/+2
| | | | | | of the variable OBJLINK which is used in /etc/make.conf to build 'obj' links in the current directory. This caused lots of useless warnings since if OBJLINK is defined ./obj will be created and used.
* Back out my brackets change, it is definitely make bug, (recentlyache1996-09-241-2/+2
| | | | introduced) because old make version I check do the right job.
* Add brackets to change bogus make expression priority, i.e.ache1996-09-241-2/+2
| | | | | | | | | !defined(X) && $(A) != $(B) parsed as (!defined(X) && $(A)) != $(B) and not as !defined(X) && ($(A) != $(B)) Probably it should be fixed in make
* Added a `checkdpadd' target to help check that ${DPADD} is consistent withbde1996-09-201-1/+13
| | | | ${LDADD}. It doesn't handle internal libraries very well yet.
* Fixed and simplified `whereobj' rule. Use the not-so-new -V feature.bde1996-09-201-10/+2
| | | | Echoing ${.OBJDIR} would work. but -V is more general.
* disable the objwarn warning if NOOBJ is set.. We have quite a few placespeter1996-09-191-3/+5
| | | | | | in the tree that use things like bsd.prog.mk just to get the default targets like install, tags, obj, clean, cleandir, cleandepend, but do not actually build anything there.
* .TARGETOBJDIR has been removed from make and CANONICALOBJDIR set inswallace1996-09-181-23/+43
| | | | | | | | | | bsd.obj.mk. Also, a make target called objwarn checks to see if ${.OBJDIR} != ${.CURDIR} and ${.OBJDIR} != ${CANONICALOBJDIR} and outputs a warning. (No warning for the latter if MAKEOBJDIR or MAKEOBJDIRP REFIX is set). objwarn is called from all targets in bsd.prog.mk, bsd.kmod.mk, and bsd.lib.mk. Reviewed by: bde
* Fixed `make objlink' (and `make obj' in the (non-default) OBJLINK case).bde1996-09-051-3/+5
| | | | | | | | | | | Running them twice usually destroyed the target binary. E.g., the second `make objlink' in `make objlink; make; make objlink' replaced the `cat' binary by a symlink cat@ -> /usr/obj/usr/src/bin/cat. `ln -fs' is unusable when the target might be a symlink that resolves to a directory. Then -f applies to a file in the directory and not to the symlink. This seems to be the standard (and sometimes useful) behaviour.
* Fix the recently added whereobj target.peter1996-07-141-4/+4
| | | | | Add missing end-of-line backslash Remove two extra @ characters
* Add whereobj target to find that pesky obj dirpst1996-07-121-1/+17
|
* Bring in my changes for removing the pestilent obj links (unless youjkh1996-06-241-48/+51
| | | | | really want them) from /usr/src. This is the final version of the patches, incorporating the feedback I've received from -current.
OpenPOWER on IntegriCloud