Commit Graph

34 Commits

Author SHA1 Message Date
Bryan Drewery
9ef60181ae Respect INSTALL_AS_USER for FILES.
MFC after:	2 weeks
Sponsored by:	Dell EMC Isilon
2017-07-21 16:14:35 +00:00
Bryan Drewery
eba4cc152e DIRDEPS_BUILD: Fix '/' in group names creating a bad cookie.
This is reworking the change in r296585 but to still properly install
the files.  This limits the change to only the DIRDEPS_BUILD logic
for what it considers the name of the staging set, which is what the
cookie name is based off of.

Sponsored by:	Dell EMC Isilon
MFC after:	1 week
2016-12-03 05:29:35 +00:00
Bryan Drewery
d7d0effe49 Revert r296585.
This broke installing dtrace test files.  It was poorly tested.

Reported by:	markj
Pointyhat to:	bdrewery
MFC after:	1 week
2016-12-03 05:29:31 +00:00
Enji Cooper
f2a5d14c4a Allow FILESGROUPS to be specified more than once by pruning out duplicates
MFC after: 2 weeks
Sponsored by: EMC / Isilon Storage Division
2016-04-30 21:32:29 +00:00
Glen Barber
538354481e MFH
Sponsored by:	The FreeBSD Foundation
2016-03-14 18:54:29 +00:00
Bryan Drewery
55f6623d83 Remove out-of-place make(buildincludes) check.
This came in r239572 for META_MODE handling but it doesn't make sense
since the staging is always done in make(all); make(buildincludes)
is never actually ran in the META_MODE build.

Reported by:	bapt
Sponsored by:	EMC / Isilon Storage Division
2016-03-11 23:44:59 +00:00
Glen Barber
7d536dc855 MFH
Sponsored by:	The FreeBSD Foundation
2016-03-10 21:16:01 +00:00
Bryan Drewery
17e75d1cd2 These group names may be used as a cookie, so replace any non-fs-safe characters.
One example is in cddl/usr.sbin/dtrace/tests/common/aggs.  It could be
fixed but other uses of this would break, especially in the
DIRDEPS_BUILD which uses the group names for stage cookies.

MFC after:	1 week
Sponsored by:	EMC / Isilon Storage Division
2016-03-09 22:45:00 +00:00
Glen Barber
52259a98ad MFH
Sponsored by:	The FreeBSD Foundation
2016-03-02 16:14:46 +00:00
Bryan Drewery
db74470bff DIRDEPS_BUILD: Fix some things building in MAKELEVEL0.
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
2016-02-26 22:13:48 +00:00
Glen Barber
b626f5a73a MFH r289384-r293170
Sponsored by:	The FreeBSD Foundation
2016-01-04 19:19:48 +00:00
Bryan Drewery
b0be2b128f META MODE: Fix FILESNAME not being respected sans other FILES_group overrides.
This was fixed in bsd.incs.mk in r242801 already.

Sponsored by:	EMC / Isilon Storage Division
2015-10-26 23:28:35 +00:00
Bryan Drewery
7847b2337e META MODE: bsd.files.mk and bsd.confs.mk don't handle symlinks so there is no
need to set STAGE_SYMLINKS_DIR.${STAGE_SET}.

Sponsored by:	EMC / Isilon Storage Division
2015-10-26 22:31:57 +00:00
Bryan Drewery
61c20fc782 Make installing to a non-existent directory an error.
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
2015-10-15 22:49:56 +00:00
Bryan Drewery
b9b3f1e65a Revert r289282 for now as the interaction with a directory containing
bsd.files.mk and bsd.subdir.mk is recursing too many times.
2015-10-14 19:30:04 +00:00
Bryan Drewery
7b87723296 Replace the out-of-place includes/files/config handling in bsd.subdir.mk with
more typical ALL_SUBDIR_TARGETS entries and target hooks in bsd.incs.mk,
bsd.files.mk and bsd.confs.mk.

This allows the targets to be NOPs if unneeded and still work with the
shortcut 'make includes' to build and then install in a parallel-safe manner.

Sort and re-indent the ALL_SUBDIR_TARGETS with the new entries.

Sponsored by:	EMC / Isilon Storage Division
2015-10-14 02:37:30 +00:00
Baptiste Daroussin
5a2b666ce5 Merge from head 2015-10-01 09:36:43 +00:00
Bryan Drewery
509301d918 META_MODE: Fix staging not respecting _DIR overrides.
This fixes atf-c.h not properly being installed to /usr/include/ (in
the stagedir) via its override of 'INCSDIR_atf-c.h= ${INCLUDEDIR}'.

This fixes building things that depend on atf.

Staging seems to ignore OWN/GRP/MODE settings and needs further exploration.

Sponsored by:	EMC / Isilon Storage Division
2015-09-25 05:15:27 +00:00
Baptiste Daroussin
b5ff185e19 Merge from head 2015-09-12 11:41:31 +00:00
Warner Losh
66d0a2d500 For each FOO in FILESLISTS, append the value of FOO.yes, sort, and
remove duplicates.
2015-08-27 01:52:45 +00:00
Baptiste Daroussin
dad2fb7ece Merge from head 2015-06-15 10:56:01 +00:00
Baptiste Daroussin
144c44214c Allow to tag the METALOG per file group 2015-03-05 12:39:18 +00:00
Baptiste Daroussin
dc6d22c96d Makes it more flexible to tag and define a target package 2015-02-13 00:16:05 +00:00
Baptiste Daroussin
25998b2aa7 Tag the metalog with a global default sets of tags that will be used to decide
what will go in which package, more finer grain tagging to come
2015-02-10 22:29:07 +00:00
Simon J. Gerraty
ee7b0571c2 Merge head from 7/28 2014-08-19 06:50:54 +00:00
Julio Merino
ada17d7bde Ensure files are created during the build when using bsd.subdir.mk.
When FILES is defined in a Makefile that _also_ includes bsd.subdir.mk, the
build of the files (if any) was not properly triggered during the build
stage.  This was because bsd.files.mk did not define the buildfiles target
if it was already defined... and bsd.subdir.mk defined this target on its
own, thus causing a conflict.

Fix this by unconditionally defining buildfiles from bsd.files.mk; this is
safe because nothing else in the tree needs to redefine this and because the
target itself contains no commands: all it does is define dependencies.
Also ensure that bsd.files.mk is always pulled in by bsd.test.mk regardless
of what bsd.prog.mk does.

These fixes allow "make installworld" to run cleanly on a system with
read-only src and obj trees.

This is "make tinderbox" clean.

Reviewed by:	imp
Obtained from:	jilles
2014-06-09 14:36:49 +00:00
Simon J. Gerraty
3b8f084595 Merge head 2014-04-28 07:50:45 +00:00
Rui Paulo
cb56d4a851 Allow mixing bsd.files.mk with bsd.subdir.mk.
If a single Makefile wants to recurse into subdirectories and also
wants to install files, bsd.files.mk's targets would get ignored in
favor of those defined by bsd.subdir.mk because installfiles would
not get defined in bsd.files.mk.

Prevent this from happening by defining the targets in bsd.files.mk
with auxiliary names and listing them as dependencies of installfiles
instead.

This is required by bsd.test.mk, which needs to install a Kyuafile
in pretty much all cases but may also need to recurse into
subdirectories for build purposes.

Submitted by:	Julio Merino jmmv google.com
Reviewed by:	sjg
MFC after:	2 weeks
2013-10-25 05:11:10 +00:00
Simon J. Gerraty
bd64a3c9dc Because the target of SYMLINKS is typically a full path, we
"stage" them to the stage tree rather than a location within.
2013-01-23 00:46:53 +00:00
Marcel Moolenaar
7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Hartmut Brandt
84aac27381 Make sure the only thing that follows .endif or .else is a comment. 2005-04-11 07:13:29 +00:00
Ruslan Ermilov
d2893b161b Drop support for COPY, -c has been the default mode of install(1)
for a long time now.

Approved by:	bde
2002-07-29 09:40:17 +00:00
Ruslan Ermilov
badb7c1c6b Try really hard to fix parallel installs. Add a bunch of .ORDER
directives to ensure that all realinstall sub-tasks are executed
after beforeinstall, similarly ensure that all afterinstall sub-
tasks are executed after realinstall.  Demonstration:

all: task1 task2
.ORDER: task1 task2

task2: task2_subtask
.ORDER: task1 task2_subtask

task1 task2 task2_subtask:
	@sleep `jot -r 1 0 1.0`
	@echo ${.TARGET}

Without the second .ORDER directive, task2_subtask can be run in
parallel with task1.

Spotted by:	Andrea Campi <andrea@webcom.it>
2002-07-03 12:28:03 +00:00
Ruslan Ermilov
af2dc86820 Reimplement FILES support using bsd.files.mk with the
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).
2002-06-03 14:49:34 +00:00