From ea9a943426ae849f8671eeb8718e501bfeadb315 Mon Sep 17 00:00:00 2001 From: jlam Date: Thu, 24 May 2001 08:53:54 +0000 Subject: Standardize name of file to include for build-links to be "buildlink.mk". Use BUILDLINK_INCDIR, BUILDLINK_LIBDIR for locations of linked headers and libraries. Create a variable BUILDLINK_TARGETS whose value is the list of build-link targets to execute. --- devel/libgetopt/Makefile.getopt | 34 ---------------------------------- devel/libgetopt/buildlink.mk | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 34 deletions(-) delete mode 100644 devel/libgetopt/Makefile.getopt create mode 100644 devel/libgetopt/buildlink.mk (limited to 'devel/libgetopt') diff --git a/devel/libgetopt/Makefile.getopt b/devel/libgetopt/Makefile.getopt deleted file mode 100644 index 928f131037f..00000000000 --- a/devel/libgetopt/Makefile.getopt +++ /dev/null @@ -1,34 +0,0 @@ -# $NetBSD: Makefile.getopt,v 1.3 2001/05/22 16:45:38 jlam Exp $ -# -# This Makefile fragment is included by packages that use getopt_long(). -# -# If getopt_long() is not present in the base system, then a dependency -# on devel/libgetopt is added, and the appropriate headers are linked -# into ${WRKINCDIR} (${WRKSRC}/include). -# -# To use this Makefile, simply include this Makefile fragment in the -# package Makefile, optionally define WRKINCDIR, add -# link-getopt-headers to the prerequisite targets for pre-configure, -# and add ${WRKINCDIR} to the compiler's header search path. - -.if exists(/usr/include/getopt.h) -GETOPT_H= /usr/include/getopt.h -.else -GETOPT_H= ${LOCALBASE}/include/getopt.h -DEPENDS+= libgetopt>=1.3:../../devel/libgetopt -.if defined(GNU_CONFIGURE) -CONFIGURE_ENV+= LIBS="${LIBS}" -LIBS+= -lgetopt -.endif -.endif - -WRKINCDIR?= ${WRKDIR}/include - -# This target links the getopt header into ${WRKINCDIR}, which should be -# searched first by the C preprocessor. -# -link-getopt-headers: - @${ECHO} "Linking getopt headers into ${WRKINCDIR}." - @${MKDIR} -p ${WRKINCDIR} - @${RM} -f ${WRKINCDIR}/getopt.h - @${LN} -sf ${GETOPT_H} ${WRKINCDIR} diff --git a/devel/libgetopt/buildlink.mk b/devel/libgetopt/buildlink.mk new file mode 100644 index 00000000000..eaef5fb7424 --- /dev/null +++ b/devel/libgetopt/buildlink.mk @@ -0,0 +1,36 @@ +# $NetBSD: buildlink.mk,v 1.1 2001/05/24 08:53:56 jlam Exp $ +# +# This Makefile fragment is included by packages that use getopt_long(). +# +# If getopt_long() is not present in the base system, then a dependency +# on devel/libgetopt is added, and the appropriate headers are linked +# into ${BUILDLINK_INCDIR} (${WRKSRC}/include). +# +# To use this Makefile, simply include this Makefile fragment in the +# package Makefile, optionally define BUILDLINK_INCDIR, add +# ${BUILDLINK_TARGETS} to the prerequisite targets for pre-configure, +# and add ${BUILDLINK_INCDIR} to the compiler's header search path. + +.if exists(/usr/include/getopt.h) +GETOPT_H= /usr/include/getopt.h +.else +GETOPT_H= ${LOCALBASE}/include/getopt.h +DEPENDS+= libgetopt>=1.3:../../devel/libgetopt +.if defined(GNU_CONFIGURE) +CONFIGURE_ENV+= LIBS="${LIBS}" +LIBS+= -lgetopt +.endif +.endif + +BUILDLINK_INCDIR?= ${WRKDIR}/include + +BUILDLINK_TARGETS+= link-getopt-headers + +# This target links the getopt header into ${BUILDLINK_INCDIR}, which should +# be searched first by the C preprocessor. +# +link-getopt-headers: + @${ECHO} "Linking getopt headers into ${BUILDLINK_INCDIR}." + @${MKDIR} ${BUILDLINK_INCDIR} + @${RM} -f ${BUILDLINK_INCDIR}/getopt.h + @${LN} -sf ${GETOPT_H} ${BUILDLINK_INCDIR} -- cgit v1.2.3