pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc Coalesce the common makefile code in the builtin.mk fi...
details: https://anonhg.NetBSD.org/pkgsrc/rev/b00e156fc114
branches: trunk
changeset: 495169:b00e156fc114
user: jlam <jlam%pkgsrc.org@localhost>
date: Fri Jun 03 19:12:49 2005 +0000
description:
Coalesce the common makefile code in the builtin.mk file that inspect
the X11 distribution using imake into mk/buildlink3/imake-check.mk.
imake-check.mk calls out to a helper shell script mk/buildlink3/imake-check
that generates the required Imakefiles and runs imake. Remove the
now extraneous builtin-imake.mk files as the builtin.mk files can now
contain the name of the imake symbol to check.
diffstat:
fonts/Xft2/builtin-imake.mk | 12 ----
fonts/Xft2/builtin.mk | 17 +-----
fonts/fontconfig/builtin-imake.mk | 12 ----
fonts/fontconfig/builtin.mk | 17 +-----
graphics/MesaLib/builtin-imake.mk | 12 ----
graphics/MesaLib/builtin.mk | 17 +-----
graphics/freetype2/builtin-imake.mk | 12 ----
graphics/freetype2/builtin.mk | 17 +-----
graphics/glu/builtin-imake.mk | 12 ----
graphics/glu/builtin.mk | 17 +-----
graphics/xpm/builtin-imake.mk | 12 ----
graphics/xpm/builtin.mk | 17 +-----
mk/buildlink3/imake-check | 88 +++++++++++++++++++++++++++++++++++
mk/buildlink3/imake-check.mk | 79 +++++++++++++++++++++++++++++++
textproc/expat/builtin-imake.mk | 12 ----
textproc/expat/builtin.mk | 17 +-----
x11/Xcomposite/builtin-imake.mk | 12 ----
x11/Xcomposite/builtin.mk | 17 +-----
x11/Xfixes/builtin-imake.mk | 12 ----
x11/Xfixes/builtin.mk | 17 +-----
x11/Xrandr-mixedcase/builtin-imake.mk | 12 ----
x11/Xrandr-mixedcase/builtin.mk | 17 +-----
x11/Xrender/builtin-imake.mk | 12 ----
x11/Xrender/builtin.mk | 17 +-----
x11/xcursor/builtin-imake.mk | 12 ----
x11/xcursor/builtin.mk | 17 +-----
26 files changed, 215 insertions(+), 300 deletions(-)
diffs (truncated from 739 to 300 lines):
diff -r 7a3ccb826fd5 -r b00e156fc114 fonts/Xft2/builtin-imake.mk
--- a/fonts/Xft2/builtin-imake.mk Fri Jun 03 17:02:36 2005 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-XCOMM $NetBSD: builtin-imake.mk,v 1.1 2005/06/01 18:02:48 jlam Exp $
-
-/*
- * Check the value of BuildXftLibrary for the presence of
- * Xft2 in the X11 distribution.
- */
-builtin-test:
-#if BuildXftLibrary
- @echo yes
-#else
- @echo no
-#endif
diff -r 7a3ccb826fd5 -r b00e156fc114 fonts/Xft2/builtin.mk
--- a/fonts/Xft2/builtin.mk Fri Jun 03 17:02:36 2005 +0000
+++ b/fonts/Xft2/builtin.mk Fri Jun 03 19:12:49 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.10 2005/06/03 17:02:36 jlam Exp $
+# $NetBSD: builtin.mk,v 1.11 2005/06/03 19:12:49 jlam Exp $
BUILTIN_PKG:= Xft2
@@ -14,18 +14,9 @@
.if !defined(IS_BUILTIN.Xft2)
IS_BUILTIN.Xft2= no
. if exists(${H_XFT2})
-PKGSRC_USE_TOOLS+= imake # XXX
-IMAKE?= ${X11BASE}/bin/imake # XXX
-_BUILTIN_IMAKE_CMD= ${IMAKE:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}
-. if exists(${_BUILTIN_IMAKE_CMD})
-IS_BUILTIN.Xft2!= \
- dir=`cd ${BUILDLINK_PKGSRCDIR.Xft2} && ${PWD_CMD}`; \
- cd ${TMPDIR:U/tmp:Q} && \
- ${IMAKE} -DUseInstalled -I${X11BASE}/lib/X11/config \
- -f $$dir/builtin-imake.mk -C builtin-imake.$$$$.c \
- -s - | \
- ${IMAKE_MAKE} -f - builtin-test
-. endif
+BUILTIN_IMAKE_CHECK:= Xft2:BuildXftLibrary
+. include "../../mk/buildlink3/imake-check.mk"
+IS_BUILTIN.Xft2= ${BUILTIN_IMAKE_CHECK.Xft2}
. endif
.endif
MAKEVARS+= IS_BUILTIN.Xft2
diff -r 7a3ccb826fd5 -r b00e156fc114 fonts/fontconfig/builtin-imake.mk
--- a/fonts/fontconfig/builtin-imake.mk Fri Jun 03 17:02:36 2005 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-XCOMM $NetBSD: builtin-imake.mk,v 1.1 2005/06/01 18:02:48 jlam Exp $
-
-/*
- * Check the value of BuildFontconfigLibrary for the presence of
- * fontconfig in the X11 distribution.
- */
-builtin-test:
-#if BuildFontconfigLibrary
- @echo yes
-#else
- @echo no
-#endif
diff -r 7a3ccb826fd5 -r b00e156fc114 fonts/fontconfig/builtin.mk
--- a/fonts/fontconfig/builtin.mk Fri Jun 03 17:02:36 2005 +0000
+++ b/fonts/fontconfig/builtin.mk Fri Jun 03 19:12:49 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.6 2005/06/03 17:02:36 jlam Exp $
+# $NetBSD: builtin.mk,v 1.7 2005/06/03 19:12:49 jlam Exp $
BUILTIN_PKG:= fontconfig
@@ -15,18 +15,9 @@
.if !defined(IS_BUILTIN.fontconfig)
IS_BUILTIN.fontconfig= no
. if exists(${H_FONTCONFIG})
-PKGSRC_USE_TOOLS+= imake # XXX
-IMAKE?= ${X11BASE}/bin/imake # XXX
-_BUILTIN_IMAKE_CMD= ${IMAKE:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}
-. if exists(${_BUILTIN_IMAKE_CMD})
-IS_BUILTIN.fontconfig!= \
- dir=`cd ${BUILDLINK_PKGSRCDIR.fontconfig} && ${PWD_CMD}`; \
- cd ${TMPDIR:U/tmp:Q} && \
- ${IMAKE} -DUseInstalled -I${X11BASE}/lib/X11/config \
- -f $$dir/builtin-imake.mk -C builtin-imake.$$$$.c \
- -s - | \
- ${IMAKE_MAKE} -f - builtin-test
-. endif
+BUILTIN_IMAKE_CHECK:= fontconfig:BuildFontconfigLibrary
+. include "../../mk/buildlink3/imake-check.mk"
+IS_BUILTIN.fontconfig= ${BUILTIN_IMAKE_CHECK.fontconfig}
. endif
.endif
MAKEVARS+= IS_BUILTIN.fontconfig
diff -r 7a3ccb826fd5 -r b00e156fc114 graphics/MesaLib/builtin-imake.mk
--- a/graphics/MesaLib/builtin-imake.mk Fri Jun 03 17:02:36 2005 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-XCOMM $NetBSD: builtin-imake.mk,v 1.1 2005/06/01 18:02:54 jlam Exp $
-
-/*
- * Check the value of BuildGLXLibrary for the presence of
- * MesaLib in the X11 distribution.
- */
-builtin-test:
-#if BuildGLXLibrary
- @echo yes
-#else
- @echo no
-#endif
diff -r 7a3ccb826fd5 -r b00e156fc114 graphics/MesaLib/builtin.mk
--- a/graphics/MesaLib/builtin.mk Fri Jun 03 17:02:36 2005 +0000
+++ b/graphics/MesaLib/builtin.mk Fri Jun 03 19:12:49 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.8 2005/06/03 17:02:36 jlam Exp $
+# $NetBSD: builtin.mk,v 1.9 2005/06/03 19:12:49 jlam Exp $
BUILTIN_PKG:= MesaLib
@@ -14,18 +14,9 @@
.if !defined(IS_BUILTIN.MesaLib)
IS_BUILTIN.MesaLib= no
. if exists(${H_MESALIB})
-PKGSRC_USE_TOOLS+= imake # XXX
-IMAKE?= ${X11BASE}/bin/imake # XXX
-_BUILTIN_IMAKE_CMD= ${IMAKE:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}
-. if exists(${_BUILTIN_IMAKE_CMD})
-IS_BUILTIN.MesaLib!= \
- dir=`cd ${BUILDLINK_PKGSRCDIR.MesaLib} && ${PWD_CMD}`; \
- cd ${TMPDIR:U/tmp:Q} && \
- ${IMAKE} -DUseInstalled -I${X11BASE}/lib/X11/config \
- -f $$dir/builtin-imake.mk -C builtin-imake.$$$$.c \
- -s - | \
- ${IMAKE_MAKE} -f - builtin-test
-. endif
+BUILTIN_IMAKE_CHECK:= MesaLib:BuildGLXLibrary
+. include "../../mk/buildlink3/imake-check.mk"
+IS_BUILTIN.MesaLib= ${BUILTIN_IMAKE_CHECK.MesaLib}
. endif
.endif
MAKEVARS+= IS_BUILTIN.MesaLib
diff -r 7a3ccb826fd5 -r b00e156fc114 graphics/freetype2/builtin-imake.mk
--- a/graphics/freetype2/builtin-imake.mk Fri Jun 03 17:02:36 2005 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-XCOMM $NetBSD: builtin-imake.mk,v 1.1 2005/06/01 18:02:55 jlam Exp $
-
-/*
- * Check the value of BuildFreetype2Library for the presence of
- * freetype2 in the X11 distribution.
- */
-builtin-test:
-#if BuildFreetype2Library
- @echo yes
-#else
- @echo no
-#endif
diff -r 7a3ccb826fd5 -r b00e156fc114 graphics/freetype2/builtin.mk
--- a/graphics/freetype2/builtin.mk Fri Jun 03 17:02:36 2005 +0000
+++ b/graphics/freetype2/builtin.mk Fri Jun 03 19:12:49 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.6 2005/06/03 17:02:36 jlam Exp $
+# $NetBSD: builtin.mk,v 1.7 2005/06/03 19:12:49 jlam Exp $
BUILTIN_PKG:= freetype2
@@ -14,18 +14,9 @@
.if !defined(IS_BUILTIN.freetype2)
IS_BUILTIN.freetype2= no
. if exists(${H_FREETYPE2})
-PKGSRC_USE_TOOLS+= imake # XXX
-IMAKE?= ${X11BASE}/bin/imake # XXX
-_BUILTIN_IMAKE_CMD= ${IMAKE:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}
-. if exists(${_BUILTIN_IMAKE_CMD})
-IS_BUILTIN.freetype2!= \
- dir=`cd ${BUILDLINK_PKGSRCDIR.freetype2} && ${PWD_CMD}`; \
- cd ${TMPDIR:U/tmp:Q} && \
- ${IMAKE} -DUseInstalled -I${X11BASE}/lib/X11/config \
- -f $$dir/builtin-imake.mk -C builtin-imake.$$$$.c \
- -s - | \
- ${IMAKE_MAKE} -f - builtin-test
-. endif
+BUILTIN_IMAKE_CHECK:= freetype2:BuildFreetype2Library
+. include "../../mk/buildlink3/imake-check.mk"
+IS_BUILTIN.freetype2= ${BUILTIN_IMAKE_CHECK.freetype2}
. endif
.endif
MAKEVARS+= IS_BUILTIN.freetype2
diff -r 7a3ccb826fd5 -r b00e156fc114 graphics/glu/builtin-imake.mk
--- a/graphics/glu/builtin-imake.mk Fri Jun 03 17:02:36 2005 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-XCOMM $NetBSD: builtin-imake.mk,v 1.1 2005/06/01 18:02:56 jlam Exp $
-
-/*
- * Check the value of BuildGLULibrary for the presence of
- * glu in the X11 distribution.
- */
-builtin-test:
-#if BuildGLULibrary
- @echo yes
-#else
- @echo no
-#endif
diff -r 7a3ccb826fd5 -r b00e156fc114 graphics/glu/builtin.mk
--- a/graphics/glu/builtin.mk Fri Jun 03 17:02:36 2005 +0000
+++ b/graphics/glu/builtin.mk Fri Jun 03 19:12:49 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.7 2005/06/03 17:02:36 jlam Exp $
+# $NetBSD: builtin.mk,v 1.8 2005/06/03 19:12:49 jlam Exp $
BUILTIN_PKG:= glu
@@ -14,18 +14,9 @@
.if !defined(IS_BUILTIN.glu)
IS_BUILTIN.glu= no
. if exists(${H_GLU})
-PKGSRC_USE_TOOLS+= imake # XXX
-IMAKE?= ${X11BASE}/bin/imake # XXX
-_BUILTIN_IMAKE_CMD= ${IMAKE:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}
-. if exists(${_BUILTIN_IMAKE_CMD})
-IS_BUILTIN.glu!= \
- dir=`cd ${BUILDLINK_PKGSRCDIR.glu} && ${PWD_CMD}`; \
- cd ${TMPDIR:U/tmp:Q} && \
- ${IMAKE} -DUseInstalled -I${X11BASE}/lib/X11/config \
- -f $$dir/builtin-imake.mk -C builtin-imake.$$$$.c \
- -s - | \
- ${IMAKE_MAKE} -f - builtin-test
-. endif
+BUILTIN_IMAKE_CHECK:= glu:BuildGLULibrary
+. include "../../mk/buildlink3/imake-check.mk"
+IS_BUILTIN.glu= ${BUILTIN_IMAKE_CHECK.glu}
. endif
.endif
MAKEVARS+= IS_BUILTIN.glu
diff -r 7a3ccb826fd5 -r b00e156fc114 graphics/xpm/builtin-imake.mk
--- a/graphics/xpm/builtin-imake.mk Fri Jun 03 17:02:36 2005 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-XCOMM $NetBSD: builtin-imake.mk,v 1.1 2005/06/01 18:02:58 jlam Exp $
-
-/*
- * Check the value of NormalLibXpm for the presence of Xpm
- * in the X11 distribution.
- */
-builtin-test:
-#if NormalLibXpm
- @echo yes
-#else
- @echo no
-#endif
diff -r 7a3ccb826fd5 -r b00e156fc114 graphics/xpm/builtin.mk
--- a/graphics/xpm/builtin.mk Fri Jun 03 17:02:36 2005 +0000
+++ b/graphics/xpm/builtin.mk Fri Jun 03 19:12:49 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.9 2005/06/03 17:02:36 jlam Exp $
+# $NetBSD: builtin.mk,v 1.10 2005/06/03 19:12:49 jlam Exp $
BUILTIN_PKG:= xpm
@@ -24,18 +24,9 @@
. elif ${OPSYS} == "IRIX"
IS_BUILTIN.xpm= yes
. else
-PKGSRC_USE_TOOLS+= imake # XXX
-IMAKE?= ${X11BASE}/bin/imake # XXX
-_BUILTIN_IMAKE_CMD= ${IMAKE:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}
-. if exists(${_BUILTIN_IMAKE_CMD})
-IS_BUILTIN.xpm!= \
- dir=`cd ${BUILDLINK_PKGSRCDIR.xpm} && ${PWD_CMD}`; \
- cd ${TMPDIR:U/tmp:Q} && \
- ${IMAKE} -DUseInstalled -I${X11BASE}/lib/X11/config \
- -f $$dir/builtin-imake.mk -C builtin-imake.$$$$.c \
- -s - | \
- ${IMAKE_MAKE} -f - builtin-test
-. endif
+BUILTIN_IMAKE_CHECK:= xpm:NormalLibXpm
+. include "../../mk/buildlink3/imake-check.mk"
+IS_BUILTIN.xpm= ${BUILTIN_IMAKE_CHECK.xpm}
. endif
. endif
.endif
diff -r 7a3ccb826fd5 -r b00e156fc114 mk/buildlink3/imake-check
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mk/buildlink3/imake-check Fri Jun 03 19:12:49 2005 +0000
@@ -0,0 +1,88 @@
+#! /bin/sh
+#
+# Copyright (c) 2005 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# This code is derived from software contributed to The NetBSD Foundation
+# by Johnny C. Lam.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
Home |
Main Index |
Thread Index |
Old Index