Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 Oct 2015 06:24:10 +0000 (UTC)
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r288475 - head/share/mk
Message-ID:  <201510020624.t926OAKl027678@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bdrewery
Date: Fri Oct  2 06:24:09 2015
New Revision: 288475
URL: https://svnweb.freebsd.org/changeset/base/288475

Log:
  META_MODE: Fix stage_links not running in the right order without -j.
  
  This fixes staging errors for non-parallel builds that have LINKS.
  
  Creating hardlinks must always happen after the actual files are installed.
  The staging code was protected by an .ORDER statement that only affected
  parallel -j builds but not non-parallel builds.  Fix this by making the
  real stage_links.SET (stage_links.links, stage_links.mlinks, etc) targets
  depend on the main targets for all of the other possible staging needs.  For
  example, stage_links.links will depend on stage_as and stage_files, which have
  their own dependencies to stage_as.prog or stage_files.prog or stage_files.SET,
  which is enough to satistfy the ordering.
  
  Also remove the requirement that symlinks be created last, as they can
  safely be made without the source being present unlike hardlinks.  This also
  fixes symlinks to come before hardlinks as it is possible, in theory, to
  hardlink a symlink.  This is not actually supported here though.
  
  Sponsored by:	EMC / Isilon Storage Division

Modified:
  head/share/mk/meta.stage.mk

Modified: head/share/mk/meta.stage.mk
==============================================================================
--- head/share/mk/meta.stage.mk	Fri Oct  2 05:30:46 2015	(r288474)
+++ head/share/mk/meta.stage.mk	Fri Oct  2 06:24:09 2015	(r288475)
@@ -237,10 +237,11 @@ stage_as.$s:	.dirdep
 CLEANFILES += ${STAGE_TARGETS} stage_incs stage_includes
 
 # stage_*links usually needs to follow any others.
-.for t in ${STAGE_TARGETS:N*links:O:u}
-.ORDER: $t stage_links
-.ORDER: $t stage_symlinks
+.if !empty(STAGE_SETS) && !empty(STAGE_TARGETS:Nstage_links)
+.for s in ${STAGE_SETS:O:u}
+stage_links.$s: ${STAGE_TARGETS:Nstage_links:O:u}
 .endfor
+.endif
 
 # make sure this exists
 staging:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510020624.t926OAKl027678>