| Summary: | [build] [patch] include /usr/obj/lib32 in cleanworld target on amd64 arch | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Base System | Reporter: | Alexander Best <alexbestms> | ||||
| Component: | amd64 | Assignee: | freebsd-amd64 (Nobody) <amd64> | ||||
| Status: | Closed Overcome By Events | ||||||
| Severity: | Affects Only Me | CC: | avos | ||||
| Priority: | Normal | ||||||
| Version: | 9.0-CURRENT | ||||||
| Hardware: | Any | ||||||
| OS: | Any | ||||||
| Attachments: |
|
||||||
|
Description
Alexander Best
2010-03-02 00:10:07 UTC
What do you think about respecting WITHOUT_LIB32 and TARGET?
--- a.diff begins here ---
diff --git a/Makefile b/Makefile
index 5edb4da..7d261c3 100644
--- a/Makefile
+++ b/Makefile
@@ -157,9 +157,7 @@ cleanworld:
# To be safe in this case, fall back to a 'make cleandir'
${_+_}@cd ${.CURDIR}; ${_MAKE} cleandir
.else
- -rm -rf ${.OBJDIR}/*
- -chflags -R 0 ${.OBJDIR}
- rm -rf ${.OBJDIR}/*
+ ${_+_}@cd ${.CURDIR}; ${_MAKE} cleanworld
.endif
#
diff --git a/Makefile.inc1 b/Makefile.inc1
index d939280..0b9981d 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -1508,3 +1503,15 @@ builddtb:
dtc -O dtb -o \
${DTBOUTPUTPATH}/`echo ${FDT_DTS_FILE} | cut -d. -f1`.dtb -b 0 \
-p 1024 ${.CURDIR}/sys/boot/fdt/dts/${FDT_DTS_FILE}
+
+cleanworld:
+.if exists(${OBJTREE}${.CURDIR})
+ -rm -rf ${OBJTREE}${.CURDIR}/*
+ -chflags -R 0 ${OBJTREE}${.CURDIR}
+ rm -rf ${OBJTREE}${.CURDIR}/*
+.endif
+.if exists(${OBJTREE}/lib32${.CURDIR}) && ${MK_LIB32} != "no"
+ -rm -rf ${OBJTREE}/lib32${.CURDIR}/*
+ -chflags -R 0 ${OBJTREE}/lib32${.CURDIR}
+ rm -rf ${OBJTREE}/lib32${.CURDIR}/*
+.endif
--- a.diff ends here ---
2010/7/16 Anonymous <swell.k@gmail.com>: > What do you think about respecting WITHOUT_LIB32 and TARGET? i like it. i'm not sure however if WITHOUT_LIB32 should have an impact on cleandir/cleanworld. if i remember correctly running target clean e.g. also doesn't skip certain directories in the tree even if the user has set WITHOUT_* and doesn't want specific code to be built. i can't really think of a situation where somebody wants to remove all the 64bit objs but keep the 32bit ones. alex > > --- a.diff begins here --- > diff --git a/Makefile b/Makefile > index 5edb4da..7d261c3 100644 > --- a/Makefile > +++ b/Makefile > @@ -157,9 +157,7 @@ cleanworld: > =A0 =A0 =A0 =A0# =A0 To be safe in this case, fall back to a 'make cleand= ir' > =A0 =A0 =A0 =A0${_+_}@cd ${.CURDIR}; ${_MAKE} cleandir > =A0.else > - =A0 =A0 =A0 -rm -rf ${.OBJDIR}/* > - =A0 =A0 =A0 -chflags -R 0 ${.OBJDIR} > - =A0 =A0 =A0 rm -rf ${.OBJDIR}/* > + =A0 =A0 =A0 ${_+_}@cd ${.CURDIR}; ${_MAKE} cleanworld > =A0.endif > > =A0# > diff --git a/Makefile.inc1 b/Makefile.inc1 > index d939280..0b9981d 100644 > --- a/Makefile.inc1 > +++ b/Makefile.inc1 > @@ -1508,3 +1503,15 @@ builddtb: > =A0 =A0 =A0 =A0dtc -O dtb -o \ > =A0 =A0 =A0 =A0 =A0 =A0${DTBOUTPUTPATH}/`echo ${FDT_DTS_FILE} | cut -d. -= f1`.dtb -b 0 \ > =A0 =A0 =A0 =A0 =A0 =A0-p 1024 ${.CURDIR}/sys/boot/fdt/dts/${FDT_DTS_FILE= } > + > +cleanworld: > +.if exists(${OBJTREE}${.CURDIR}) > + =A0 =A0 =A0 -rm -rf ${OBJTREE}${.CURDIR}/* > + =A0 =A0 =A0 -chflags -R 0 ${OBJTREE}${.CURDIR} > + =A0 =A0 =A0 rm -rf ${OBJTREE}${.CURDIR}/* > +.endif > +.if exists(${OBJTREE}/lib32${.CURDIR}) && ${MK_LIB32} !=3D "no" > + =A0 =A0 =A0 -rm -rf ${OBJTREE}/lib32${.CURDIR}/* > + =A0 =A0 =A0 -chflags -R 0 ${OBJTREE}/lib32${.CURDIR} > + =A0 =A0 =A0 rm -rf ${OBJTREE}/lib32${.CURDIR}/* > +.endif > --- a.diff ends here --- > --=20 Alexander Best Alexander Best <alexbestms@uni-muenster.de> writes: > i can't really think of a situation where somebody wants to remove all > the 64bit objs but keep the 32bit ones. I was concerned about cleanworld invoked by crossbuild breaking normal build when running concurrently but looks like that's not the case, i.e. $ make cleanworld TARGET=i386 # /usr/obj/i386.i386/lib32/usr/src doesn't wipe out lib32 for normal build (/usr/obj/lib32/usr/src). Since crossbuild encloses lib32 in its OBJTREE there is no need for MK_LIB32 check. --- b.diff begins here --- diff --git a/Makefile.inc1 b/Makefile.inc1 index 85669d5..2298eca 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1512,7 +1512,7 @@ cleanworld: -chflags -R 0 ${OBJTREE}${.CURDIR} rm -rf ${OBJTREE}${.CURDIR}/* .endif -.if exists(${OBJTREE}/lib32${.CURDIR}) && ${MK_LIB32} != "no" +.if exists(${OBJTREE}/lib32${.CURDIR}) -rm -rf ${OBJTREE}/lib32${.CURDIR}/* -chflags -R 0 ${OBJTREE}/lib32${.CURDIR} rm -rf ${OBJTREE}/lib32${.CURDIR}/* --- b.diff ends here --- 2010/7/19 Anonymous <swell.k@gmail.com>: > Alexander Best <alexbestms@uni-muenster.de> writes: > >> i can't really think of a situation where somebody wants to remove all >> the 64bit objs but keep the 32bit ones. > > I was concerned about cleanworld invoked by crossbuild breaking normal > build when running concurrently but looks like that's not the case, i.e. > > =A0$ make cleanworld TARGET=3Di386 # /usr/obj/i386.i386/lib32/usr/src > > doesn't wipe out lib32 for normal build (/usr/obj/lib32/usr/src). > Since crossbuild encloses lib32 in its OBJTREE there is no need for > MK_LIB32 check. cool. now all that is necessary is somebody to commit those changes. probably the hardest part of all. ;) cheers. alex > > --- b.diff begins here --- > diff --git a/Makefile.inc1 b/Makefile.inc1 > index 85669d5..2298eca 100644 > --- a/Makefile.inc1 > +++ b/Makefile.inc1 > @@ -1512,7 +1512,7 @@ cleanworld: > =A0 =A0 =A0 =A0-chflags -R 0 ${OBJTREE}${.CURDIR} > =A0 =A0 =A0 =A0rm -rf ${OBJTREE}${.CURDIR}/* > =A0.endif > -.if exists(${OBJTREE}/lib32${.CURDIR}) && ${MK_LIB32} !=3D "no" > +.if exists(${OBJTREE}/lib32${.CURDIR}) > =A0 =A0 =A0 =A0-rm -rf ${OBJTREE}/lib32${.CURDIR}/* > =A0 =A0 =A0 =A0-chflags -R 0 ${OBJTREE}/lib32${.CURDIR} > =A0 =A0 =A0 =A0rm -rf ${OBJTREE}/lib32${.CURDIR}/* > --- b.diff ends here --- > --=20 Alexander Best Hey guys, have you tried discussing this on the mailing lists? -- Andriy Gapon For bugs matching the following criteria: Status: In Progress Changed: (is less than) 2014-06-01 Reset to default assignee and clear in-progress tags. Mail being skipped Seems to be initially fixed in base r271730 (however, now obj tree have a bit different structure...) |