From 61ad1ff58d4e7a8c21f05066d9a05aad2f84d291 Mon Sep 17 00:00:00 2001 From: "Simon J. Gerraty" Date: Sun, 30 Nov 2014 18:45:46 +0000 Subject: [PATCH] Renamed pkgs/ targets/ --- share/mk/local.dirdeps.mk | 12 +++++++--- share/mk/local.gendirdeps.mk | 4 ++-- targets/Makefile | 29 +++++++++--------------- targets/Makefile.inc | 4 ++-- targets/pseudo/the-lot/Makefile.depend | 6 ++--- targets/pseudo/toolchain/Makefile.depend | 4 ++-- targets/pseudo/universe/Makefile | 2 +- targets/pseudo/universe/Makefile.depend | 2 +- targets/pseudo/userland/Makefile.depend | 26 ++++++++++----------- 9 files changed, 44 insertions(+), 45 deletions(-) diff --git a/share/mk/local.dirdeps.mk b/share/mk/local.dirdeps.mk index 5fefd03a640..88783db6997 100644 --- a/share/mk/local.dirdeps.mk +++ b/share/mk/local.dirdeps.mk @@ -17,6 +17,12 @@ DIRDEPS := ${.TARGETS:M*/*} ${.TARGETS:Nall}: all .endif +# making universe is special +.if defined(UNIVERSE_GUARD) +# these should be done by now +DIRDEPS_FILTER+= N*.host +.endif + # pseudo machines get no qualification .for m in host common M_dep_qual_fixes += C;($m),[^/.,]*$$;\1; @@ -75,9 +81,9 @@ DIRDEPS += \ DIRDEPS+= lib/clang/include .endif -# we need pkgs/pseudo/stage to prep the stage tree -.if ${DEP_RELDIR} != "pkgs/pseudo/stage" -DIRDEPS += pkgs/pseudo/stage +# we need targets/pseudo/stage to prep the stage tree +.if ${DEP_RELDIR} != "targets/pseudo/stage" +DIRDEPS += targets/pseudo/stage .endif CSU_DIR.i386 = csu/i386-elf diff --git a/share/mk/local.gendirdeps.mk b/share/mk/local.gendirdeps.mk index ff36d97a836..df32cda6af2 100644 --- a/share/mk/local.gendirdeps.mk +++ b/share/mk/local.gendirdeps.mk @@ -5,10 +5,10 @@ GENDIRDEPS_FILTER+= \ Ncddl/usr.bin/ctf* \ Nlib/clang/include \ Nlib/libc_nonshared \ - Npkgs/pseudo/stage* \ + Ntargets/pseudo/stage* \ Ntools/* -.if ${RELDIR:Mpkgs*} == "" +.if ${RELDIR:Mtargets*} == "" GENDIRDEPS_FILTER+= \ Nusr.bin/clang/clang.host \ Ngnu/usr.bin/cc* \ diff --git a/targets/Makefile b/targets/Makefile index bf2a30036c1..e0d7fa3f1e9 100644 --- a/targets/Makefile +++ b/targets/Makefile @@ -35,23 +35,23 @@ # this is our top-level makefile .if make(pkg-*) -DIRDEPS_FILTER = Mpkgs/* +DIRDEPS_FILTER = Mtargets/* .endif # in theory, this is what we want -target_dirs = pkgs pkgs/pseudo +target_dirs = targets targets/pseudo # these tweak how we do it target_prefix = pkg- build- DIRDEPS := ${.TARGETS:Nall:${target_prefix:@p@S,^$p,,@:ts:}:@t@${target_dirs:@d@$d/$t@}@:@d@${exists(${SRCTOP}/$d):?$d:}@} -.if ${DIRDEPS:Mpkgs/pseudo/*} != "" +.if ${DIRDEPS:Mtargets/pseudo/*} != "" # all bets are off PKG_MACHINE_LIST = ${ALL_MACHINE_LIST} .endif .if make(check-commit) # a special case -DIRDEPS = pkgs/pseudo/check-commit +DIRDEPS = targets/pseudo/check-commit .if defined(ALL_MACHINES) CHECK_MACHINE_LIST = all .undef ALL_MACHINES @@ -127,16 +127,15 @@ start_utc := ${now_utc} _begin = count-makefiles -# by default, we clean pkgs/ which can otherwise accumulate a lot of cruft -.if ${NEED_CLEAN_PKGS:Uyes:tl} != "no" -_begin += clean-pkgs -.endif -.if defined(SHIPDIR) && ${NEED_CLEAN_SHIPDIR:Uno:tl} != "no" && exists(${SHIPDIR}) -_begin += clean-shipdir -.endif -.if ${NEED_CLEAN_ERROR_LOGS:Uyes:tl} == "yes" +__DEFAULT_YES_OPTIONS+= \ + CLEAN_ERROR_LOGS + +.include + +.if ${MK_CLEAN_ERROR_LOGS} == "yes" _begin += clean-error-logs .endif + .if !empty(_begin) && !make(clean*) dirdeps: ${_begin} .WAIT .endif @@ -167,12 +166,6 @@ _build_failed: .NOMETA clean-error-logs: .NOMETA @test ! -d ${meta_error_log:H} || rm -f ${meta_error_log:H}/*log -clean-pkgs: .NOMETA - @rm -rf ${ALL_MACHINE_LIST:N${MACHINE}:@m@${OBJROOT}$m/pkgs@} ${OBJROOT}${MACHINE}/pkgs/* - -clean-shipdir: .NOMETA - ${"${SHIPDIR:tl:Nno:N*\:*}":?rm -f ${SHIPDIR}/*:} - .if !target(_DIRDEP_USE) # we did not read dirdeps.mk above, the target may be here .include "Makefile.xtras" diff --git a/targets/Makefile.inc b/targets/Makefile.inc index 58d19c83c3a..2dc3b815582 100644 --- a/targets/Makefile.inc +++ b/targets/Makefile.inc @@ -6,9 +6,9 @@ __${_this}__: _CURDIR ?= ${.CURDIR} _OBJDIR ?= ${.OBJDIR} -.if ${RELDIR:Mpkgs/*} != "" || ${RELDIR} == "." +.if ${RELDIR:Mtargets/*} != "" || ${RELDIR} == "." -.if ${.MAKE.LEVEL} == 0 && ${RELDIR:Mpkgs/*} != "" +.if ${.MAKE.LEVEL} == 0 && ${RELDIR:Mtargets/*} != "" .if make(bootstrap*) || !exists(${_CURDIR}/${.MAKE.DEPENDFILE:T}) _bootstrap_dirdeps = yes .else diff --git a/targets/pseudo/the-lot/Makefile.depend b/targets/pseudo/the-lot/Makefile.depend index ad51546fd5d..d54c59cc5d5 100644 --- a/targets/pseudo/the-lot/Makefile.depend +++ b/targets/pseudo/the-lot/Makefile.depend @@ -5,8 +5,8 @@ DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,} DIRDEPS = \ - pkgs/pseudo/kernel \ - pkgs/pseudo/toolchain \ - pkgs/pseudo/userland \ + targets/pseudo/kernel \ + targets/pseudo/toolchain \ + targets/pseudo/userland \ .include diff --git a/targets/pseudo/toolchain/Makefile.depend b/targets/pseudo/toolchain/Makefile.depend index 4ea8d587969..bb4bf7ec471 100644 --- a/targets/pseudo/toolchain/Makefile.depend +++ b/targets/pseudo/toolchain/Makefile.depend @@ -10,10 +10,10 @@ DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,} DIRDEPS= usr.bin/xinstall .if ${MK_CLANG} == "yes" -DIRDEPS+= pkgs/pseudo/clang +DIRDEPS+= targets/pseudo/clang .endif .if ${MK_GCC} == "yes" -DIRDEPS+= pkgs/pseudo/gcc +DIRDEPS+= targets/pseudo/gcc .endif .include diff --git a/targets/pseudo/universe/Makefile b/targets/pseudo/universe/Makefile index 85b6b718947..ef696d330e0 100644 --- a/targets/pseudo/universe/Makefile +++ b/targets/pseudo/universe/Makefile @@ -32,7 +32,7 @@ # # this is the RELDIR of the target we build -UNIVERSE_TARGET_RELDIR?= pkgs/pseudo/the-lot +UNIVERSE_TARGET_RELDIR?= targets/pseudo/the-lot # the list of machines TARGET_MACHINE_LIST = i386 amd64 diff --git a/targets/pseudo/universe/Makefile.depend b/targets/pseudo/universe/Makefile.depend index e9cbdb58b35..b55179d0163 100644 --- a/targets/pseudo/universe/Makefile.depend +++ b/targets/pseudo/universe/Makefile.depend @@ -8,7 +8,7 @@ DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,} # our role here is to build all the host tools etc. DIRDEPS = \ - pkgs/pseudo/hosttools.host \ + targets/pseudo/hosttools.host \ .include diff --git a/targets/pseudo/userland/Makefile.depend b/targets/pseudo/userland/Makefile.depend index 10591bdc5f1..12c881f0f2a 100644 --- a/targets/pseudo/userland/Makefile.depend +++ b/targets/pseudo/userland/Makefile.depend @@ -7,18 +7,18 @@ DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,} DEP_MACHINE := ${.PARSEFILE:E} DIRDEPS = \ - pkgs/pseudo/bin \ - pkgs/pseudo/cddl \ - pkgs/pseudo/games \ - pkgs/pseudo/gnu \ - pkgs/pseudo/include \ - pkgs/pseudo/kerberos5 \ - pkgs/pseudo/lib \ - pkgs/pseudo/libexec \ - pkgs/pseudo/sbin \ - pkgs/pseudo/secure \ - pkgs/pseudo/share \ - pkgs/pseudo/usr.bin \ - pkgs/pseudo/usr.sbin \ + targets/pseudo/bin \ + targets/pseudo/cddl \ + targets/pseudo/games \ + targets/pseudo/gnu \ + targets/pseudo/include \ + targets/pseudo/kerberos5 \ + targets/pseudo/lib \ + targets/pseudo/libexec \ + targets/pseudo/sbin \ + targets/pseudo/secure \ + targets/pseudo/share \ + targets/pseudo/usr.bin \ + targets/pseudo/usr.sbin \ .include