2007-08-13 07:58:44 +02:00
|
|
|
# $NetBSD: help.mk,v 1.10 2007/08/13 05:58:44 rillig Exp $
|
2006-10-23 16:40:14 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
# This is the integrated pkgsrc online help system. To query for the
|
|
|
|
# meaning of a variable, run "make help TOPIC=VARNAME". All variables from
|
|
|
|
# certain pkgsrc Makefile fragments that have inline comments are eligible
|
|
|
|
# for querying.
|
|
|
|
|
2007-01-06 17:49:40 +01:00
|
|
|
_HELP_FILES= Makefile
|
2007-03-09 02:34:50 +01:00
|
|
|
_HELP_FILES+= mk/*.mk mk/*/*.mk mk/*/*/*.mk
|
2007-01-06 17:49:40 +01:00
|
|
|
_HELP_FILES+= mk/defaults/mk.conf
|
2006-12-21 20:50:20 +01:00
|
|
|
_HELP_FILES+= lang/perl5/*.mk lang/php/*.mk lang/python/*.mk
|
|
|
|
_HELP_FILES+= lang/ruby/*.mk
|
2007-01-12 08:54:30 +01:00
|
|
|
_HELP_FILES+= mk/*/*.help
|
2007-04-11 08:40:09 +02:00
|
|
|
.if exists(${.PARSEDIR}/../../wip/mk)
|
|
|
|
_HELP_FILES+= wip/mk/*.mk
|
|
|
|
.endif
|
2006-10-23 16:40:14 +02:00
|
|
|
|
|
|
|
.if defined(VARNAME)
|
|
|
|
TOPIC?= ${VARNAME}
|
|
|
|
.endif
|
|
|
|
.if defined(topic)
|
|
|
|
TOPIC?= ${topic}
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.PHONY: help
|
|
|
|
help:
|
|
|
|
.if !defined(TOPIC)
|
2007-05-24 07:33:49 +02:00
|
|
|
@${ECHO} "usage: "${MAKE:Q}" help topic=<topic>"
|
|
|
|
@${ECHO} ""
|
|
|
|
@${ECHO} " <topic> may be a variable name or a make target,"
|
|
|
|
@${ECHO} " for example CONFIGURE_DIRS or patch. For convenience,"
|
|
|
|
@${ECHO} " you don't need to use uppercase letters when typing"
|
|
|
|
@${ECHO} " variable names."
|
|
|
|
@${ECHO} ""
|
2006-10-23 16:40:14 +02:00
|
|
|
.else
|
2007-01-02 18:22:30 +01:00
|
|
|
${RUN} cd ${PKGSRCDIR}; \
|
|
|
|
env TOPIC=${TOPIC:Q} ${AWK} -f ${PKGSRCDIR}/mk/help/help.awk ${_HELP_FILES}
|
2006-10-23 16:40:14 +02:00
|
|
|
.endif
|