1 # $NetBSD: builtin.mk,v 1.3 2008/10/25 18:05:03 adrianp Exp $
5 BUILTIN_FIND_FILES_VAR
:= JAVAVM6
6 BUILTIN_FIND_FILES.JAVAVM6
= \
7 /System
/Library
/Frameworks
/JavaVM.framework
/Versions
/1.6/Home \
8 /usr
/jdk
/instances
/jdk1.6
.0
10 .
include "../../mk/buildlink3/bsd.builtin.mk"
13 ### Determine if there is a built-in implementation of the package and
14 ### set IS_BUILTIN.<pkg> appropriately ("yes" or "no").
16 .if
!defined
(IS_BUILTIN.sun-jre6
)
17 . if empty
(JAVAVM6
:M__nonexistent__
)
18 IS_BUILTIN.sun-jre6
= yes
20 IS_BUILTIN.sun-jre6
= no
23 MAKEVARS
+= IS_BUILTIN.sun-jre6
26 ### If there is a built-in implementation, then set BUILTIN_PKG.<pkg> to
27 ### a package name to represent the built-in package.
29 .if
!defined
(BUILTIN_PKG.sun-jre6
) && \
30 !empty
(IS_BUILTIN.sun-jre6
:M
[yY
][eE
][sS
]) && \
31 empty
(JAVAVM6
:M__nonexistent__
)
33 BUILTIN_VERSION.sun-jre6
!= ${JAVAVM6}/bin
/java
-version
2>&1 |
${HEAD} -1 | \
34 ${AWK} -F
\" '{print $$2}' |
${AWK} -F _
'{print $$1}'
36 BUILTIN_PKG.sun-jre6
= sun-jre6-
${BUILTIN_VERSION.sun-jre6
}
38 MAKEVARS
+= BUILTIN_PKG.sun-jre6
41 ### Determine whether we should use the built-in implementation if it
42 ### exists, and set USE_BUILTIN.<pkg> appropriate ("yes" or "no").
44 .if
!defined
(USE_BUILTIN.sun-jre6
)
45 . if
${PREFER.sun-jre6
} == "pkgsrc"
46 USE_BUILTIN.sun-jre6
= no
48 USE_BUILTIN.sun-jre6
= ${IS_BUILTIN.sun-jre6
}
49 . if defined
(BUILTIN_PKG.sun-jre6
) && \
50 !empty
(IS_BUILTIN.sun-jre6
:M
[yY
][eE
][sS
])
51 USE_BUILTIN.sun-jre6
= yes
52 . for _dep_ in
${BUILDLINK_API_DEPENDS.sun-jre6
}
53 . if
!empty
(USE_BUILTIN.sun-jre6
:M
[yY
][eE
][sS
])
54 USE_BUILTIN.sun-jre6
!= \
55 if
${PKG_ADMIN} pmatch
${_dep_
:Q
} ${BUILTIN_PKG.sun-jre6
:Q
}; then \
63 .
endif # PREFER.sun-jre6
65 MAKEVARS
+= USE_BUILTIN.sun-jre6
68 ### The section below only applies if we are not including this file
69 ### solely to determine whether a built-in implementation exists.
71 CHECK_BUILTIN.sun-jre6?
= no
72 .if
!empty
(CHECK_BUILTIN.sun-jre6
:M
[nN
][oO
])
73 . if
!empty
(USE_BUILTIN.sun-jre6
:M
[yY
][eE
][sS
])
74 PKG_JAVA_HOME
= ${JAVAVM6}