etc.sparc64: fix syntax errors in MK32BITLIBS=yes

sparc64 snapshots with MK32BITLIBS=yes has been broken
because of make(1) and sh(1) syntax errors since
my change in revision 1.18 on 2002-12-03, when
snap_md_pre target was deprecated...
Move the rules to snap_md_post and fix the syntax errors.

The cross-build make snapshot snapbecause of the missing
$TOOLDIR/bin/sparc--netbsdelf-gcc due to the invocation
with SPARC32_ENV=MACHINE=sparc MACHINE_ARCH=sparc.
A separate issue to resolve.

(It seems MK32BITLIBS hasn't worked for 20+ years and
noone noticed! Do we need it?)
This commit is contained in:
lukem 2023-06-02 14:32:04 +00:00
parent b329684b89
commit e3f25515e3
1 changed files with 7 additions and 6 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.33 2023/06/02 14:25:35 lukem Exp $
# $NetBSD: Makefile.inc,v 1.34 2023/06/02 14:32:04 lukem Exp $
#
# etc.sparc64/Makefile.inc -- sparc64-specific etc Makefile targets
#
@ -26,6 +26,9 @@ SPARC32=COPTS=-m32 LD="ld -m elf32_sparc" AS="as -32" \
SHLIB_LDSTARTFILE=${DESTDIR}${LIBDIR}/crtbeginS.o \
SHLIB_LDENDFILE=${DESTDIR}${LIBDIR}/crtendS.o
snap_md_post:
.if ${MACHINE_ARCH} == "sparc64" && ${MK32BITLIBS} != "no"
# build 32 bit programs
@ -35,7 +38,7 @@ SPARC32=COPTS=-m32 LD="ld -m elf32_sparc" AS="as -32" \
${SPARC32_ENV} ${MAKE} ${SPARC32} ${_M} obj)
.endif
.if ${MKUPDATE} == "no"
(cd ${NETBSDSRCDIR}/${_s64dir} && ${MAKE} cleandir
(cd ${NETBSDSRCDIR}/${_s64dir} && ${MAKE} cleandir)
.endif
(cd ${NETBSDSRCDIR}/${_s64dir} && \
${SPARC32_ENV} ${MAKE} ${SPARC32} ${_M} ${_J} MKSHARE=no dependall \
@ -43,10 +46,7 @@ SPARC32=COPTS=-m32 LD="ld -m elf32_sparc" AS="as -32" \
.endfor
.endif # MACHINE_ARCH==sparc64 && MACHINE==sparc && MK32BITLIBS!=no
#
# Install miniroot images and auxiliary scripts to the release tree
#
snap_md_post:
# Install miniroot images and auxiliary scripts to the release tree
.if exists($(XSRCDIR)/xc/Imakefile)
# build X11
.ifndef XSRC_DONE
@ -73,6 +73,7 @@ snap_md_post:
${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/${dir} '*'
.endfor
ISOBOOTFILEDIR!=cd ${.CURDIR}/../distrib/${MACHINE}/bootfs && ${PRINTOBJDIR}
ISOBOOTFILE?= ${ISOBOOTFILEDIR}/boot.fs