summaryrefslogtreecommitdiff
path: root/mk/tools
diff options
context:
space:
mode:
authormarkd <markd@pkgsrc.org>2007-12-18 10:18:39 +0000
committermarkd <markd@pkgsrc.org>2007-12-18 10:18:39 +0000
commit4767fe7dc4d3fef4ef03c61957e72d122942663f (patch)
treea12a8cc0b5ef0164a4a618b2f7a1a2ffac8c32e2 /mk/tools
parent037f33900e51337a9ff1d49851256a54e901d2d4 (diff)
downloadpkgsrc-4767fe7dc4d3fef4ef03c61957e72d122942663f.tar.gz
Doing USE_TOOLS+=cmake in the configure stage is too late so move it
to tools. Also cmake wants cpack to exist in the same directory so toolise it and make cmake and cpack imply each other.
Diffstat (limited to 'mk/tools')
-rw-r--r--mk/tools/bsd.tools.mk3
-rw-r--r--mk/tools/cmake.mk14
-rw-r--r--mk/tools/defaults.mk3
-rw-r--r--mk/tools/replace.mk22
4 files changed, 30 insertions, 12 deletions
diff --git a/mk/tools/bsd.tools.mk b/mk/tools/bsd.tools.mk
index 2adb854c9dc..0891bae49e9 100644
--- a/mk/tools/bsd.tools.mk
+++ b/mk/tools/bsd.tools.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.tools.mk,v 1.47 2007/03/15 22:54:25 rillig Exp $
+# $NetBSD: bsd.tools.mk,v 1.48 2007/12/18 10:18:40 markd Exp $
#
# Copyright (c) 2005, 2006 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -155,6 +155,7 @@ post-tools:
.include "${PKGSRCDIR}/mk/tools/ldconfig.mk"
.include "${PKGSRCDIR}/mk/tools/rpcgen.mk"
.include "${PKGSRCDIR}/mk/tools/strip.mk"
+.include "${PKGSRCDIR}/mk/tools/cmake.mk"
.include "${PKGSRCDIR}/mk/tools/imake.mk"
.include "${PKGSRCDIR}/mk/tools/replace.mk"
.include "${PKGSRCDIR}/mk/tools/perl.mk"
diff --git a/mk/tools/cmake.mk b/mk/tools/cmake.mk
new file mode 100644
index 00000000000..5f5bbcd9164
--- /dev/null
+++ b/mk/tools/cmake.mk
@@ -0,0 +1,14 @@
+# $NetBSD: cmake.mk,v 1.1 2007/12/18 10:18:44 markd Exp $
+#
+
+# This file needs to be included before replace.mk as it modifies the
+# USE_TOOLS variables that are used by replace.mk.
+#
+.if defined(USE_CMAKE)
+USE_TOOLS+= cmake cpack
+.endif
+
+# cmake and cpack imply each other
+.if !empty(USE_TOOLS:Mcmake) || !empty(USE_TOOLS:Mcpack)
+USE_TOOLS+= cmake cpack
+.endif
diff --git a/mk/tools/defaults.mk b/mk/tools/defaults.mk
index 135f6d4a90a..7dc8e877c97 100644
--- a/mk/tools/defaults.mk
+++ b/mk/tools/defaults.mk
@@ -1,4 +1,4 @@
-# $NetBSD: defaults.mk,v 1.53 2007/12/12 01:00:40 markd Exp $
+# $NetBSD: defaults.mk,v 1.54 2007/12/18 10:18:49 markd Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -66,6 +66,7 @@ _TOOLS_VARNAME.chown= CHOWN
_TOOLS_VARNAME.cmake= CMAKE
_TOOLS_VARNAME.cmp= CMP
_TOOLS_VARNAME.cp= CP
+_TOOLS_VARNAME.cpack= CPACK
_TOOLS_VARNAME.csh= CSH
_TOOLS_VARNAME.cut= CUT
_TOOLS_VARNAME.date= DATE
diff --git a/mk/tools/replace.mk b/mk/tools/replace.mk
index aaba146a4ac..f4f9e15a55e 100644
--- a/mk/tools/replace.mk
+++ b/mk/tools/replace.mk
@@ -1,4 +1,4 @@
-# $NetBSD: replace.mk,v 1.202 2007/12/12 01:00:40 markd Exp $
+# $NetBSD: replace.mk,v 1.203 2007/12/18 10:18:49 markd Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -283,16 +283,18 @@ TOOLS_PATH.bzcat= ${TOOLS_PREFIX.${_t_}}/bin/${_t_}
. endif
.endfor
-.if !defined(TOOLS_IGNORE.cmake) && !empty(_USE_TOOLS:Mcmake)
-. if !empty(PKGPATH:Mdevel/cmake)
-MAKEFLAGS+= TOOLS_IGNORE.cmake=
-. elif !empty(_TOOLS_USE_PKGSRC.cmake:M[yY][eE][sS])
-TOOLS_DEPENDS.cmake?= cmake>=2.4.6nb3:../../devel/cmake
-TOOLS_CREATE+= cmake
-TOOLS_FIND_PREFIX+= TOOLS_PREFIX.cmake=cmake
-TOOLS_PATH.cmake= ${TOOLS_PREFIX.cmake}/bin/cmake
+.for _t_ in cmake cpack
+. if !defined(TOOLS_IGNORE.${_t_}) && !empty(_USE_TOOLS:M${_t_})
+. if !empty(PKGPATH:Mdevel/cmake)
+MAKEFLAGS+= TOOLS_IGNORE.${_t_}=
+. elif !empty(_TOOLS_USE_PKGSRC.${_t_}:M[yY][eE][sS])
+TOOLS_DEPENDS.${_t_}?= cmake>=2.4.6nb3:../../devel/cmake
+TOOLS_CREATE+= ${_t_}
+TOOLS_FIND_PREFIX+= TOOLS_PREFIX.${_t_}=cmake
+TOOLS_PATH.${_t_}= ${TOOLS_PREFIX.${_t_}}/bin/${_t_}
+. endif
. endif
-.endif
+.endfor
.if !defined(TOOLS_IGNORE.csh) && !empty(_USE_TOOLS:Mcsh)
. if !empty(PKGPATH:Mshells/tcsh)