Skip to content

Commit

Permalink
Only check for the existence of the first word of ${IMAKE} since it may
Browse files Browse the repository at this point in the history
contain a command plus arguments.  We use the standard idiom to extract
the first word of a list stored in a make variable:

	VAR_CMD=	${VAR:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}

XXX This can be replaced with a more succinct use of variable modifiers
XXX when we update the bootstrap bmake to match the latest NetBSD make
XXX sources, i.e.:
XXX
XXX	VAR_CMD=	${VAR:[1]}
  • Loading branch information
jlam committed Jun 3, 2005
1 parent e529e0d commit e7cd475
Show file tree
Hide file tree
Showing 12 changed files with 37 additions and 24 deletions.
5 changes: 3 additions & 2 deletions fonts/Xft2/builtin.mk
@@ -1,4 +1,4 @@
# $NetBSD: builtin.mk,v 1.9 2005/06/03 16:03:09 jlam Exp $
# $NetBSD: builtin.mk,v 1.10 2005/06/03 17:02:36 jlam Exp $

BUILTIN_PKG:= Xft2

Expand All @@ -16,7 +16,8 @@ IS_BUILTIN.Xft2= no
. if exists(${H_XFT2})
PKGSRC_USE_TOOLS+= imake # XXX
IMAKE?= ${X11BASE}/bin/imake # XXX
. if defined(IMAKE) && exists(${IMAKE})
_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} && \
Expand Down
5 changes: 3 additions & 2 deletions fonts/fontconfig/builtin.mk
@@ -1,4 +1,4 @@
# $NetBSD: builtin.mk,v 1.5 2005/06/03 16:03:09 jlam Exp $
# $NetBSD: builtin.mk,v 1.6 2005/06/03 17:02:36 jlam Exp $

BUILTIN_PKG:= fontconfig

Expand All @@ -17,7 +17,8 @@ IS_BUILTIN.fontconfig= no
. if exists(${H_FONTCONFIG})
PKGSRC_USE_TOOLS+= imake # XXX
IMAKE?= ${X11BASE}/bin/imake # XXX
. if defined(IMAKE) && exists(${IMAKE})
_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} && \
Expand Down
5 changes: 3 additions & 2 deletions graphics/MesaLib/builtin.mk
@@ -1,4 +1,4 @@
# $NetBSD: builtin.mk,v 1.7 2005/06/03 16:03:09 jlam Exp $
# $NetBSD: builtin.mk,v 1.8 2005/06/03 17:02:36 jlam Exp $

BUILTIN_PKG:= MesaLib

Expand All @@ -16,7 +16,8 @@ IS_BUILTIN.MesaLib= no
. if exists(${H_MESALIB})
PKGSRC_USE_TOOLS+= imake # XXX
IMAKE?= ${X11BASE}/bin/imake # XXX
. if defined(IMAKE) && exists(${IMAKE})
_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} && \
Expand Down
5 changes: 3 additions & 2 deletions graphics/freetype2/builtin.mk
@@ -1,4 +1,4 @@
# $NetBSD: builtin.mk,v 1.5 2005/06/03 16:03:09 jlam Exp $
# $NetBSD: builtin.mk,v 1.6 2005/06/03 17:02:36 jlam Exp $

BUILTIN_PKG:= freetype2

Expand All @@ -16,7 +16,8 @@ IS_BUILTIN.freetype2= no
. if exists(${H_FREETYPE2})
PKGSRC_USE_TOOLS+= imake # XXX
IMAKE?= ${X11BASE}/bin/imake # XXX
. if defined(IMAKE) && exists(${IMAKE})
_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} && \
Expand Down
5 changes: 3 additions & 2 deletions graphics/glu/builtin.mk
@@ -1,4 +1,4 @@
# $NetBSD: builtin.mk,v 1.6 2005/06/03 16:03:09 jlam Exp $
# $NetBSD: builtin.mk,v 1.7 2005/06/03 17:02:36 jlam Exp $

BUILTIN_PKG:= glu

Expand All @@ -16,7 +16,8 @@ IS_BUILTIN.glu= no
. if exists(${H_GLU})
PKGSRC_USE_TOOLS+= imake # XXX
IMAKE?= ${X11BASE}/bin/imake # XXX
. if defined(IMAKE) && exists(${IMAKE})
_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} && \
Expand Down
5 changes: 3 additions & 2 deletions graphics/xpm/builtin.mk
@@ -1,4 +1,4 @@
# $NetBSD: builtin.mk,v 1.8 2005/06/03 16:03:09 jlam Exp $
# $NetBSD: builtin.mk,v 1.9 2005/06/03 17:02:36 jlam Exp $

BUILTIN_PKG:= xpm

Expand Down Expand Up @@ -26,7 +26,8 @@ IS_BUILTIN.xpm= yes
. else
PKGSRC_USE_TOOLS+= imake # XXX
IMAKE?= ${X11BASE}/bin/imake # XXX
. if defined(IMAKE) && exists(${IMAKE:C/ .*//})
_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} && \
Expand Down
5 changes: 3 additions & 2 deletions textproc/expat/builtin.mk
@@ -1,4 +1,4 @@
# $NetBSD: builtin.mk,v 1.5 2005/06/03 16:03:09 jlam Exp $
# $NetBSD: builtin.mk,v 1.6 2005/06/03 17:02:36 jlam Exp $

BUILTIN_PKG:= expat

Expand All @@ -16,7 +16,8 @@ IS_BUILTIN.expat= no
. if exists(${H_EXPAT})
PKGSRC_USE_TOOLS+= imake # XXX
IMAKE?= ${X11BASE}/bin/imake # XXX
. if defined(IMAKE) && exists(${IMAKE})
_BUILTIN_IMAKE_CMD= ${IMAKE:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}
. if exists(${_BUILTIN_IMAKE_CMD})
IS_BUILTIN.expat!= \
dir=`cd ${BUILDLINK_PKGSRCDIR.expat} && ${PWD_CMD}`; \
cd ${TMPDIR:U/tmp:Q} && \
Expand Down
5 changes: 3 additions & 2 deletions x11/Xcomposite/builtin.mk
@@ -1,4 +1,4 @@
# $NetBSD: builtin.mk,v 1.7 2005/06/03 16:03:09 jlam Exp $
# $NetBSD: builtin.mk,v 1.8 2005/06/03 17:02:36 jlam Exp $

BUILTIN_PKG:= Xcomposite

Expand All @@ -17,7 +17,8 @@ IS_BUILTIN.Xcomposite= no
. if exists(${H_XCOMPOSITE})
PKGSRC_USE_TOOLS+= imake # XXX
IMAKE?= ${X11BASE}/bin/imake # XXX
. if defined(IMAKE) && exists(${IMAKE})
_BUILTIN_IMAKE_CMD= ${IMAKE:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}
. if exists(${_BUILTIN_IMAKE_CMD})
IS_BUILTIN.Xcomposite!= \
dir=`cd ${BUILDLINK_PKGSRCDIR.Xcomposite} && ${PWD_CMD}`; \
cd ${TMPDIR:U/tmp:Q} && \
Expand Down
5 changes: 3 additions & 2 deletions x11/Xfixes/builtin.mk
@@ -1,4 +1,4 @@
# $NetBSD: builtin.mk,v 1.6 2005/06/03 16:03:09 jlam Exp $
# $NetBSD: builtin.mk,v 1.7 2005/06/03 17:02:36 jlam Exp $

BUILTIN_PKG:= Xfixes

Expand All @@ -16,7 +16,8 @@ IS_BUILTIN.Xfixes= no
. if exists(${H_XFIXES})
PKGSRC_USE_TOOLS+= imake # XXX
IMAKE?= ${X11BASE}/bin/imake # XXX
. if defined(IMAKE) && exists(${IMAKE})
_BUILTIN_IMAKE_CMD= ${IMAKE:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}
. if exists(${_BUILTIN_IMAKE_CMD})
IS_BUILTIN.Xfixes!= \
dir=`cd ${BUILDLINK_PKGSRCDIR.Xfixes} && ${PWD_CMD}`; \
cd ${TMPDIR:U/tmp:Q} && \
Expand Down
5 changes: 3 additions & 2 deletions x11/Xrandr-mixedcase/builtin.mk
@@ -1,4 +1,4 @@
# $NetBSD: builtin.mk,v 1.10 2005/06/03 16:03:09 jlam Exp $
# $NetBSD: builtin.mk,v 1.11 2005/06/03 17:02:36 jlam Exp $

BUILTIN_PKG:= Xrandr

Expand All @@ -16,7 +16,8 @@ IS_BUILTIN.Xrandr= no
. if exists(${H_XRANDR})
PKGSRC_USE_TOOLS+= imake # XXX
IMAKE?= ${X11BASE}/bin/imake # XXX
. if defined(IMAKE) && exists(${IMAKE})
_BUILTIN_IMAKE_CMD= ${IMAKE:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}
. if exists(${_BUILTIN_IMAKE_CMD})
IS_BUILTIN.Xrandr!= \
dir=`cd ${BUILDLINK_PKGSRCDIR.Xrandr} && ${PWD_CMD}`; \
cd ${TMPDIR:U/tmp:Q} && \
Expand Down
6 changes: 4 additions & 2 deletions x11/Xrender/builtin.mk
@@ -1,9 +1,10 @@
# $NetBSD: builtin.mk,v 1.9 2005/06/03 16:03:09 jlam Exp $
# $NetBSD: builtin.mk,v 1.10 2005/06/03 17:02:36 jlam Exp $

BUILTIN_PKG:= Xrender

BUILTIN_FIND_FILES_VAR:= H_XRENDER
BUILTIN_FIND_FILES.H_XRENDER= ${X11BASE}/include/X11/extensions/Xrender.h

.include "../../mk/buildlink3/bsd.builtin.mk"

###
Expand All @@ -15,7 +16,8 @@ IS_BUILTIN.Xrender= no
. if exists(${H_XRENDER})
PKGSRC_USE_TOOLS+= imake # XXX
IMAKE?= ${X11BASE}/bin/imake # XXX
. if defined(IMAKE) && exists(${IMAKE})
_BUILTIN_IMAKE_CMD= ${IMAKE:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}
. if exists(${_BUILTIN_IMAKE_CMD})
IS_BUILTIN.Xrender!= \
dir=`cd ${BUILDLINK_PKGSRCDIR.Xrender} && ${PWD_CMD}`; \
cd ${TMPDIR:U/tmp:Q} && \
Expand Down
5 changes: 3 additions & 2 deletions x11/xcursor/builtin.mk
@@ -1,4 +1,4 @@
# $NetBSD: builtin.mk,v 1.7 2005/06/03 16:03:09 jlam Exp $
# $NetBSD: builtin.mk,v 1.8 2005/06/03 17:02:36 jlam Exp $

BUILTIN_PKG:= xcursor

Expand All @@ -16,7 +16,8 @@ IS_BUILTIN.xcursor= no
. if exists(${H_XCURSOR})
PKGSRC_USE_TOOLS+= imake # XXX
IMAKE?= ${X11BASE}/bin/imake # XXX
. if defined(IMAKE) && exists(${IMAKE})
_BUILTIN_IMAKE_CMD= ${IMAKE:C/^/_asdf_/1:M_asdf_*:S/^_asdf_//}
. if exists(${_BUILTIN_IMAKE_CMD})
IS_BUILTIN.xcursor!= \
dir=`cd ${BUILDLINK_PKGSRCDIR.xcursor} && ${PWD_CMD}`; \
cd ${TMPDIR:U/tmp:Q} && \
Expand Down

0 comments on commit e7cd475

Please sign in to comment.