On Wed, Mar 24, 2021 at 10:41:53PM +0100, Klemens Nanni wrote: > On Wed, Mar 24, 2021 at 10:29:36PM +0100, Klemens Nanni wrote: > > No need to extract the entire linux source when we only want device > > trees. > > > > While here, use a simple shell idiom to replace file suffix. > > > > Builds all fine on amd64, no PLIST change. > > OK? > > Oops, now without PLIST changes from intermediate testing. >
ok jsg@ if you drop the comment. Those values will change and it is clear without it that using EXTRACT_FILES is to reduce size. > > Index: Makefile > =================================================================== > RCS file: /cvs/ports/sysutils/dtb/Makefile,v > retrieving revision 1.26 > diff -u -p -r1.26 Makefile > --- Makefile 28 Feb 2021 09:33:30 -0000 1.26 > +++ Makefile 24 Mar 2021 21:22:08 -0000 > @@ -25,6 +25,10 @@ NO_TEST= Yes > > ARCHS= arm arm64 mips powerpc > > +# cuts down WRKSRC from ~1G to ~62M > +EXTRACT_FILES= ${ARCHS:=${DISTNAME}/arch/%/boot/dts} \ > + ${DISTNAME}/{include,scripts/dtc/include-prefixes} > + > do-build: > .for ARCH in ${ARCHS} > cd ${WRKSRC}/arch/${ARCH}/boot/dts ; \ > @@ -34,8 +38,7 @@ do-build: > clang-cpp -nostdinc -I . -I include -I${WRKSRC}/include \ > -I ${WRKSRC}/scripts/dtc/include-prefixes \ > -undef -D__DTS__ -x assembler-with-cpp $$dts \ > - | dtc -I dts -O dtb -o `echo "$$dts" \ > - | sed -e 's/\.dts$$/\.dtb/'` - ; \ > + | dtc -I dts -O dtb -o $${dts%.dts}.dtb - ; \ > done ; \ > done > .endfor > >