pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk Moved the stuff that is common to all directories o...
details: https://anonhg.NetBSD.org/pkgsrc/rev/6e0ea2c0278b
branches: trunk
changeset: 532163:6e0ea2c0278b
user: rillig <rillig%pkgsrc.org@localhost>
date: Mon Aug 13 06:03:46 2007 +0000
description:
Moved the stuff that is common to all directories of pkgsrc into its own
file. Now "make help" can be called from the top-level directory,
avoiding to parse lots of buildlink3.mk files just to get some help.
diffstat:
mk/bsd.pkg.mk | 40 ++--------------------------------------
mk/bsd.pkg.subdir.mk | 15 ++-------------
mk/misc/common.mk | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 52 insertions(+), 51 deletions(-)
diffs (148 lines):
diff -r dc5b3956cfc9 -r 6e0ea2c0278b mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk Mon Aug 13 05:58:44 2007 +0000
+++ b/mk/bsd.pkg.mk Mon Aug 13 06:03:46 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1920 2007/08/13 05:24:26 rillig Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1921 2007/08/13 06:03:46 rillig Exp $
#
# This file is in the public domain.
#
@@ -19,15 +19,7 @@
# build
#
-.MAIN: all
-
-.if defined(.MAKEFLAGS) && !empty(.MAKEFLAGS:M-j*)
-PKG_FAIL_REASON+= "[bsd.pkg.mk] pkgsrc does not support parallel make for the infrastructure."
-PKG_FAIL_REASON+= "[bsd.pkg.mk] Run \"${MAKE} help topic=make_jobs\" to get some parallelism."
-.endif
-
-# Include any preferences, if not already included, and common definitions
-.include "${.PARSEDIR}/bsd.prefs.mk"
+.include "${.PARSEDIR}/misc/common.mk"
.if defined(EMUL_PLATFORMS) && !empty(EMUL_PLATFORMS)
. include "${.PARSEDIR}/emulator/emulator.mk"
@@ -264,31 +256,6 @@
TOUCH_FLAGS?= -f
-# Debugging levels for this file, dependent on PKG_DEBUG_LEVEL definition
-# 0 == normal, default, quiet operation
-# 1 == all shell commands echoed before invocation
-# 2 == shell "set -x" operation
-PKG_DEBUG_LEVEL?= 0
-_PKG_SILENT= @
-_PKG_DEBUG= # empty
-_PKG_DEBUG_SCRIPT= ${SH}
-
-.if ${PKG_DEBUG_LEVEL} > 0
-_PKG_SILENT= # empty
-.endif
-
-.if ${PKG_DEBUG_LEVEL} > 1
-_PKG_DEBUG= set -x;
-_PKG_DEBUG_SCRIPT= ${SH} -x
-.endif
-
-# This variable can be prepended to all shell commands that should not
-# be printed by default, but when PKGSRC_DEBUG_LEVEL is non-zero.
-# It also re-adds the error checking that has been removed in 2004 to
-# make bmake conform to POSIX.
-#
-RUN= ${_PKG_SILENT}${_PKG_DEBUG} set -e;
-
# A few aliases for *-install targets
INSTALL= ${TOOLS_INSTALL} # XXX override sys.mk
INSTALL_PROGRAM?= \
@@ -839,8 +806,5 @@
.if make(debug)
. include "${.PARSEDIR}/bsd.pkg.debug.mk"
.endif
-.if make(help)
-. include "${.PARSEDIR}/help/help.mk"
-.endif
.include "${.PARSEDIR}/misc/warnings.mk"
.include "${.PARSEDIR}/misc/can-be-built-here.mk"
diff -r dc5b3956cfc9 -r 6e0ea2c0278b mk/bsd.pkg.subdir.mk
--- a/mk/bsd.pkg.subdir.mk Mon Aug 13 05:58:44 2007 +0000
+++ b/mk/bsd.pkg.subdir.mk Mon Aug 13 06:03:46 2007 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.subdir.mk,v 1.66 2007/05/09 23:33:52 joerg Exp $
+# $NetBSD: bsd.pkg.subdir.mk,v 1.67 2007/08/13 06:03:46 rillig Exp $
# Derived from: FreeBSD Id: bsd.port.subdir.mk,v 1.19 1997/03/09 23:10:56 wosch Exp
# from: @(#)bsd.subdir.mk 5.9 (Berkeley) 2/1/91
#
@@ -26,18 +26,7 @@
# mirror-distfiles, bulk-install, bulk-package, ${PKG_MISC_TARGETS}
#
-# Pull in stuff from mk.conf - need to check two places as this may be
-# called from pkgsrc or from pkgsrc/category.
-.if exists(${.CURDIR}/mk/bsd.prefs.mk)
-.include "${.CURDIR}/mk/bsd.prefs.mk"
-.else
-.if exists(${.CURDIR}/../mk/bsd.prefs.mk)
-.include "${.CURDIR}/../mk/bsd.prefs.mk"
-.endif # exists(${.CURDIR}/../mk/bsd.prefs.mk)
-.endif # exists(${.CURDIR}/mk/bsd.prefs.mk)
-
-
-.MAIN: all
+.include "${.PARSEDIR}/misc/common.mk"
AWK?= /usr/bin/awk
CAT?= /bin/cat
diff -r dc5b3956cfc9 -r 6e0ea2c0278b mk/misc/common.mk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/mk/misc/common.mk Mon Aug 13 06:03:46 2007 +0000
@@ -0,0 +1,48 @@
+# $NetBSD: common.mk,v 1.1 2007/08/13 06:03:46 rillig Exp $
+#
+# This file contains the definitions that are used in all directories of
+# pkgsrc -- the top-level, the categories and the packages themselves.
+#
+# User-settable variables:
+#
+# PKG_DEBUG_LEVEL
+# (See mk/help/debug.help)
+#
+# System-provided variables:
+#
+# RUN
+# This variable can be prepended to all shell commands that should
+# not be printed by default, but when PKGSRC_DEBUG_LEVEL is
+# non-zero. It also re-adds the error checking that has been
+# removed in 2004 to make bmake conform to POSIX.
+#
+
+.MAIN: all
+
+.if defined(.MAKEFLAGS) && !empty(.MAKEFLAGS:M-j*)
+PKG_FAIL_REASON+= "[bsd.pkg.mk] pkgsrc does not support parallel make for the infrastructure."
+PKG_FAIL_REASON+= "[bsd.pkg.mk] Run \"${MAKE} help topic=make_jobs\" to get some parallelism."
+.endif
+
+# Include any preferences, if not already included, and common definitions
+.include "${.PARSEDIR}/../bsd.prefs.mk"
+
+PKG_DEBUG_LEVEL?= 0
+_PKG_SILENT= @
+_PKG_DEBUG= # empty
+_PKG_DEBUG_SCRIPT= ${SH}
+
+.if ${PKG_DEBUG_LEVEL} > 0
+_PKG_SILENT= # empty
+.endif
+
+.if ${PKG_DEBUG_LEVEL} > 1
+_PKG_DEBUG= set -x;
+_PKG_DEBUG_SCRIPT= ${SH} -x
+.endif
+
+RUN= ${_PKG_SILENT}${_PKG_DEBUG} set -e;
+
+.if make(help)
+.include "${.PARSEDIR}/../help/help.mk"
+.endif
Home |
Main Index |
Thread Index |
Old Index