summaryrefslogtreecommitdiff
path: root/devel/libgetopt
diff options
context:
space:
mode:
authorjlam <jlam>2001-05-24 08:53:54 +0000
committerjlam <jlam>2001-05-24 08:53:54 +0000
commitea9a943426ae849f8671eeb8718e501bfeadb315 (patch)
tree5f91b7729fd1bdb67af0af17bb78b53ca29f8bd6 /devel/libgetopt
parenteb8ff3e130393605c7f87cc5adb1b7df003f0849 (diff)
downloadpkgsrc-ea9a943426ae849f8671eeb8718e501bfeadb315.tar.gz
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.
Diffstat (limited to 'devel/libgetopt')
-rw-r--r--devel/libgetopt/Makefile.getopt34
-rw-r--r--devel/libgetopt/buildlink.mk36
2 files changed, 36 insertions, 34 deletions
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}