Changeset View
Changeset View
Standalone View
Standalone View
Mk/Uses/libtool.mk
Show All 9 Lines | |||||
# script and relies on the system to provide one. | # script and relies on the system to provide one. | ||||
# | # | ||||
# MAINTAINER: tijl@FreeBSD.org | # MAINTAINER: tijl@FreeBSD.org | ||||
.if !defined(_INCLUDE_USES_LIBTOOL_MK) | .if !defined(_INCLUDE_USES_LIBTOOL_MK) | ||||
_INCLUDE_USES_LIBTOOL_MK= yes | _INCLUDE_USES_LIBTOOL_MK= yes | ||||
_USES_POST+= libtool | _USES_POST+= libtool | ||||
.if ${libtool_ARGS:Mbuild} | . if ${libtool_ARGS:Mbuild} | ||||
BUILD_DEPENDS+= libtool:devel/libtool | BUILD_DEPENDS+= libtool:devel/libtool | ||||
.endif | . endif | ||||
.endif | .endif | ||||
.if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_LIBTOOL_POST_MK) | .if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_LIBTOOL_POST_MK) | ||||
_INCLUDE_USES_LIBTOOL_POST_MK= yes | _INCLUDE_USES_LIBTOOL_POST_MK= yes | ||||
_USES_configure+= 480:patch-libtool | _USES_configure+= 480:patch-libtool | ||||
patch-libtool: | patch-libtool: | ||||
@${FIND} ${WRKDIR} \( -name configure -or -name ltconfig \) \ | @${FIND} ${WRKDIR} \( -name configure -or -name ltconfig \) \ | ||||
Show All 33 Lines | @${FIND} ${WRKDIR} -type f -name ltmain.sh | \ | ||||
-e '/if.*linkmode.*prog.*mode.*!= relink/s/if.*;/if :;/'\ | -e '/if.*linkmode.*prog.*mode.*!= relink/s/if.*;/if :;/'\ | ||||
-e '/if.*prog.*linkmode.*relink !=.*mode/s/if.*;/if :;/'\ | -e '/if.*prog.*linkmode.*relink !=.*mode/s/if.*;/if :;/'\ | ||||
-e '/if.*linkmode.*prog.*mode.* = relink/s/||.*;/;/' \ | -e '/if.*linkmode.*prog.*mode.* = relink/s/||.*;/;/' \ | ||||
-e '/if.*prog.*linkmode.*relink = .*mode/s/||.*;/;/' \ | -e '/if.*prog.*linkmode.*relink = .*mode/s/||.*;/;/' \ | ||||
-e 's/|-p|-pg|/|-B*|-fstack-protector*|-fuse-ld=*|-p|-pg|/' | -e 's/|-p|-pg|/|-B*|-fstack-protector*|-fuse-ld=*|-p|-pg|/' | ||||
_USES_stage+= 790:patch-lafiles | _USES_stage+= 790:patch-lafiles | ||||
patch-lafiles: | patch-lafiles: | ||||
.if ${libtool_ARGS:Mkeepla} | . if ${libtool_ARGS:Mkeepla} | ||||
@${FIND} ${STAGEDIR} -type f -name '*.la' | \ | @${FIND} ${STAGEDIR} -type f -name '*.la' | \ | ||||
${XARGS} ${SED} -i '' -e "/dependency_libs=/s/=.*/=''/" | ${XARGS} ${SED} -i '' -e "/dependency_libs=/s/=.*/=''/" | ||||
.else | . else | ||||
@${FIND} ${STAGEDIR} -type l -exec ${SH} -c \ | @${FIND} ${STAGEDIR} -type l -exec ${SH} -c \ | ||||
'case `${REALPATH} -q "{}"` in \ | 'case `${REALPATH} -q "{}"` in \ | ||||
*.la) ${ECHO_CMD} "{}" ;; esac' \; | \ | *.la) ${ECHO_CMD} "{}" ;; esac' \; | \ | ||||
${XARGS} ${GREP} -l 'libtool library' | ${XARGS} ${RM} | ${XARGS} ${GREP} -l 'libtool library' | ${XARGS} ${RM} | ||||
@${FIND} ${STAGEDIR} -type f -name '*.la' | \ | @${FIND} ${STAGEDIR} -type f -name '*.la' | \ | ||||
${XARGS} ${GREP} -l 'libtool library' | ${XARGS} ${RM} | ${XARGS} ${GREP} -l 'libtool library' | ${XARGS} ${RM} | ||||
.endif | . endif | ||||
.endif | .endif |