From owner-svn-src-head@freebsd.org Fri Oct 2 06:24:10 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76469A0D620; Fri, 2 Oct 2015 06:24:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D7D11AA4; Fri, 2 Oct 2015 06:24:10 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t926OAJM027679; Fri, 2 Oct 2015 06:24:10 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t926OAKl027678; Fri, 2 Oct 2015 06:24:10 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201510020624.t926OAKl027678@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Fri, 2 Oct 2015 06:24:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r288475 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Oct 2015 06:24:10 -0000 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: