From: Aaron LI Date: Sun, 3 Mar 2019 07:32:08 +0000 (+0800) Subject: nrelease: Simplify by not handling multiple kernel configs X-Git-Tag: v5.8.0rc1~586 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/751a32470bb9b500b19b030ae39ec64965f25bb7 nrelease: Simplify by not handling multiple kernel configs We don't ship multiple kernels for years, so we can get rid of handling multiple kernel configs in nrelease/Makefile. This simplifies the Makefile and also get rid of the hack of 'SUBDIR += nrelease' in Makefile.inc1. Note that users can still override 'KERNCONF' the same as 'buildkernel'. --- diff --git a/Makefile.inc1 b/Makefile.inc1 index 9f3fa98a2d..4d70cc56f5 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -34,13 +34,6 @@ SUBDIR+= include .if exists(${.CURDIR}/lib) SUBDIR+= lib .endif -# This exists simply to ensure that the obj dir hierarchy is -# intact for nrelease, allowing the nrelease Makefile's to -# reference ${.OBJDIR}. -# -.if exists(${.CURDIR}/nrelease) -SUBDIR+= nrelease -.endif .if exists(${.CURDIR}/bin) SUBDIR+= bin diff --git a/nrelease/Makefile b/nrelease/Makefile index 4696462370..e5395d565b 100644 --- a/nrelease/Makefile +++ b/nrelease/Makefile @@ -17,7 +17,6 @@ gui installer img nopkgs: DPORTS_PATH?= /usr/dports ISODIR?= /usr/obj/release ISOROOT?= ${ISODIR}/root -OBJSYS= ${.OBJDIR}/../sys GITURL_SRC?= git://git.dragonflybsd.org/dragonfly.git GITURL_DPORTS?= git://mirror-master.dragonflybsd.org/dports.git MAKE_JOBS?= $$(sysctl -n hw.ncpu) @@ -25,12 +24,6 @@ MAKE_JOBS?= $$(sysctl -n hw.ncpu) MTREE_FSCHG= -i .endif -# XXX makeshift fix to build the right kernel for the (target) architecture -# We should configure this in the platform files somehow -.if ${MACHINE_ARCH} == "x86_64" -KERNCONF?= X86_64_GENERIC -.endif - GITREV!= sh ${.CURDIR}/../tools/gitrev.sh # The label/name of the disklabel64(5) slice in the ".img" file. This is @@ -157,11 +150,8 @@ buildworld1 buildworld2: buildkernel1 buildkernel2: cd ${.CURDIR}/..; \ - for kernconf in ${KERNCONF}; do \ - ${WORLD_CCVER:C/^..*$/WORLD_CCVER=/}${WORLD_CCVER} \ - make -j ${MAKE_JOBS} ${.TARGET:C/build(.*)2/quick\1/:C/1//} \ - KERNCONF=$${kernconf}; \ - done + ${WORLD_CCVER:C/^..*$/WORLD_CCVER=/}${WORLD_CCVER} \ + make -j ${MAKE_JOBS} ${.TARGET:C/build(.*)2/quick\1/:C/1//} # Unconditionally clean out ${ISOROOT} so a previous img build # does not blow up a future quick iso build @@ -183,10 +173,7 @@ buildiso: DESTDIR=${ISOROOT} distribution && \ rm -rf $${tmpdir} ) cpdup ${ISOROOT}/etc ${ISOROOT}/etc.hdd - ( cd ${.CURDIR}/..; \ - for kernconf in ${KERNCONF}; do \ - make DESTDIR=${ISOROOT} reinstallkernel KERNCONF=$${kernconf}; \ - done ) + ( cd ${.CURDIR}/..; make DESTDIR=${ISOROOT} reinstallkernel ) rm -rf ${ISOROOT}/boot/kernel.old ln -sf kernel ${ISOROOT}/boot/kernel/kernel.BOOTP mtree ${MTREE_FSCHG} -deU -f ${.CURDIR}/../etc/mtree/BSD.var.dist \ @@ -409,7 +396,6 @@ clean: rm -f ${ISODIR}/.didbootstrap ${ISODIR}/vn.which realclean: clean - rm -rf ${OBJSYS}/${KERNCONF} rm -rf ${ISODIR}/packages rm -rf ${ISODIR}/distfiles @@ -434,5 +420,3 @@ help all: .PHONY: check buildworld1 buildworld2 .PHONY: buildkernel1 buildkernel2 buildiso customizeiso mkiso mkimg .PHONY: clean realclean help all srcs - -.include