Two nits with the show-shlib-type target:

1.) protect definition of show-shlib-type with `if !target(show-shlib-type)'
    so that it can be overriden in a pkg makefile

2.) move the definition in lang/jdk/Makefile before the include of bsd.pkg.mk
    to trigger this.

Without these changes, show-shlib-type was `ELF\na.out' on i386/ELF, so
it was still treated as ELF.

lang/jdk now works on i386/ELF  (yay!).


While there, fix JAVA_HOME default to be JDK_HOME if PKG_JVM is jdk
and JDK_HOME is defined.
This commit is contained in:
jwise 2000-01-15 02:08:03 +00:00
parent fc211f7069
commit 224a006405
2 changed files with 10 additions and 5 deletions

View file

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.13 2000/01/13 20:13:38 jwise Exp $
# $NetBSD: Makefile,v 1.14 2000/01/15 02:08:04 jwise Exp $
#
VERSION=1.1.8
@ -34,10 +34,10 @@ do-install:
-e 's|@JDK_HOME@|${JDK_HOME}|g' \
<${PKGDIR}/MESSAGE >${MESSAGE_FILE}
.include "../../mk/bsd.pkg.mk"
show-shlib-type:
echo a.out
.include "../../mk/bsd.pkg.mk"
# This needs to be after bsd.pkg.mk
PREFIX:= ${JDK_HOME}

View file

@ -1,4 +1,4 @@
# $NetBSD: bsd.pkg.mk,v 1.393 2000/01/14 11:58:21 agc Exp $
# $NetBSD: bsd.pkg.mk,v 1.394 2000/01/15 02:08:03 jwise Exp $
#
# This file is in the public domain.
#
@ -87,7 +87,11 @@ PKG_JVM?= kaffe
.endif
.if ${PKG_JVM} == "jdk"
DEPENDS+= jdk-1.1.*:${PKGSRCDIR}/lang/jdk
.if defined(JDK_HOME)
JAVA_HOME?= ${JDK_HOME}
.else
JAVA_HOME?= ${LOCALBASE}/java
.endif
.elif ${PKG_JVM} == "kaffe"
DEPENDS+= kaffe-[0-9]*:${PKGSRCDIR}/lang/kaffe
JAVA_HOME?= ${LOCALBASE}/kaffe
@ -1520,7 +1524,7 @@ root-install:
.endif # !NO_PKG_REGISTER
${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_FLAGS} ${WRKDIR}/.install_done
.if !target(show-shlib-type)
# Show the shared lib type being built: one of ELF, a.out or none
show-shlib-type:
${_PKG_SILENT}${_PKG_DEBUG} \
@ -1538,6 +1542,7 @@ show-shlib-type:
fi; \
${ECHO} "$$sotype"; \
${RM} -f a.$$$$.c a.$$$$.out
.endif
################################################################