same formatting clean-up as bsd.port.mk
This commit is contained in:
parent
6eb7a1f31c
commit
926c904147
47
Makefile
47
Makefile
|
@ -1,26 +1,31 @@
|
|||
# $OpenBSD: Makefile,v 1.53 2006/10/30 17:49:04 ckuethe Exp $
|
||||
# $OpenBSD: Makefile,v 1.54 2006/11/27 15:38:01 espie Exp $
|
||||
# $FreeBSD: Makefile,v 1.36 1997/10/04 15:54:31 jkh Exp $
|
||||
#
|
||||
|
||||
PKGPATH=
|
||||
PKGPATH =
|
||||
MIRROR_MK ?= ${.CURDIR}/distfiles/Makefile
|
||||
PORTSTOP ?= yes
|
||||
DISTFILES_DB ?= ${.CURDIR}/infrastructure/db/locate.database
|
||||
|
||||
|
||||
.if defined(SUBDIR)
|
||||
# nothing to do
|
||||
.elif defined(key) || defined(name) || defined(category) || defined(author)
|
||||
|
||||
# set up subdirs from the index, assume it's up-to-date
|
||||
_CMD=perl ${.CURDIR}/infrastructure/build/index-retrieve index='${.CURDIR}/INDEX'
|
||||
. if defined(key)
|
||||
_CMD+=key='${key}'
|
||||
. endif
|
||||
. if defined(name)
|
||||
_CMD+=maintainer='${name}'
|
||||
. endif
|
||||
. if defined(category)
|
||||
_CMD+=category='${category}'
|
||||
. endif
|
||||
. if defined(maintainer)
|
||||
_CMD+=maintainer='${maintainer}'
|
||||
. endif
|
||||
_CMD = perl ${.CURDIR}/infrastructure/build/index-retrieve index='${.CURDIR}/INDEX'
|
||||
. if defined(key)
|
||||
_CMD += key='${key}'
|
||||
. endif
|
||||
. if defined(name)
|
||||
_CMD += maintainer='${name}'
|
||||
. endif
|
||||
. if defined(category)
|
||||
_CMD += category='${category}'
|
||||
. endif
|
||||
. if defined(maintainer)
|
||||
_CMD += maintainer='${maintainer}'
|
||||
. endif
|
||||
SUBDIR != ${_CMD}
|
||||
.elif defined(SUBDIRLIST)
|
||||
SUBDIR != sed -e 's,[ ]*\#.*,,' -e '/^[ ]*$$/d' ${SUBDIRLIST}
|
||||
|
@ -68,8 +73,6 @@ SUBDIR += www
|
|||
SUBDIR += x11
|
||||
.endif
|
||||
|
||||
PORTSTOP?= yes
|
||||
|
||||
.include <bsd.port.subdir.mk>
|
||||
|
||||
index:
|
||||
|
@ -93,16 +96,14 @@ search: ${.CURDIR}/INDEX
|
|||
@echo "The search target requires a keyword or name parameter,"
|
||||
@echo "e.g.: \"make search key=somekeyword\" \"make search name=somename\""
|
||||
.else
|
||||
. if defined(key)
|
||||
. if defined(key)
|
||||
@egrep -i -- "${key}" ${.CURDIR}/INDEX | awk -F\| '{ printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nL-deps:\t%s\nB-deps:\t%s\nR-deps:\t%s\nArchs:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9, $$10, $$11); }'
|
||||
. else
|
||||
. else
|
||||
@awk -F\| '$$1 ~ /${name}/ { printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nL-deps:\t%s\nB-deps:\t%s\nR-deps:\t%s\nArchs:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9, $$10, $$11); }' ${.CURDIR}/INDEX
|
||||
. endif
|
||||
. endif
|
||||
.endif
|
||||
|
||||
|
||||
MIRROR_MK?= ${.CURDIR}/distfiles/Makefile
|
||||
|
||||
mirror-maker:
|
||||
@mkdir -p ${MIRROR_MK:H}
|
||||
# Indirection needed for broken OSes that don't grok this exec
|
||||
|
@ -121,8 +122,6 @@ homepages.html:
|
|||
@${MAKE} homepage-links ECHO_MSG='echo >&2' >>$@
|
||||
@echo '</ul></html>' >>$@
|
||||
|
||||
DISTFILES_DB?=${.CURDIR}/infrastructure/db/locate.database
|
||||
|
||||
distfiles-update-locatedb:
|
||||
@PORTSDIR=${.CURDIR} /bin/sh ${.CURDIR}/infrastructure/fetch/distfiles-update-locatedb ${DISTFILES_DB}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#-*- mode: Makefile; tab-width: 4; -*-
|
||||
# ex:ts=4 sw=4 filetype=make:
|
||||
# from: @(#)bsd.subdir.mk 5.9 (Berkeley) 2/1/91
|
||||
# $OpenBSD: bsd.port.subdir.mk,v 1.78 2006/11/13 13:55:10 espie Exp $
|
||||
# $OpenBSD: bsd.port.subdir.mk,v 1.79 2006/11/27 15:38:01 espie Exp $
|
||||
# FreeBSD Id: bsd.port.subdir.mk,v 1.20 1997/08/22 11:16:15 asami Exp
|
||||
#
|
||||
# The include file <bsd.port.subdir.mk> contains the default targets
|
||||
|
@ -52,32 +52,38 @@
|
|||
.endif
|
||||
|
||||
.if !defined(DEBUG_FLAGS)
|
||||
STRIP?= -s
|
||||
STRIP ?= -s
|
||||
.endif
|
||||
|
||||
.if !defined(OPSYS) # XXX !!
|
||||
OPSYS= OpenBSD
|
||||
OPSYS = OpenBSD
|
||||
.endif
|
||||
|
||||
.include "${PORTSDIR}/infrastructure/mk/pkgpath.mk"
|
||||
|
||||
ECHO_MSG?= echo
|
||||
ECHO_MSG ?= echo
|
||||
|
||||
# create a full list of SUBDIRS...
|
||||
.if empty(PKGPATH)
|
||||
_FULLSUBDIR:=${SUBDIR}
|
||||
_FULLSUBDIR := ${SUBDIR}
|
||||
.else
|
||||
_FULLSUBDIR:=${SUBDIR:S@^@${PKGPATH}/@g}
|
||||
_FULLSUBDIR := ${SUBDIR:S@^@${PKGPATH}/@g}
|
||||
.endif
|
||||
|
||||
_SKIPPED=
|
||||
_SKIPPED =
|
||||
.for i in ${SKIPDIR}
|
||||
_SKIPPED:+=${_FULLSUBDIR:M$i}
|
||||
_FULLSUBDIR:=${_FULLSUBDIR:N$i}
|
||||
_SKIPPED :+= ${_FULLSUBDIR:M$i}
|
||||
_FULLSUBDIR := ${_FULLSUBDIR:N$i}
|
||||
.endfor
|
||||
|
||||
TEMPLATES ?= ${PORTSDIR}/infrastructure/templates
|
||||
.if defined(PORTSTOP)
|
||||
README = ${TEMPLATES}/README.top
|
||||
.else
|
||||
README = ${TEMPLATES}/README.category
|
||||
.endif
|
||||
|
||||
_subdir_fragment= \
|
||||
_subdir_fragment = \
|
||||
: $${echo_msg:=${ECHO_MSG:Q}}; \
|
||||
: $${target:=${.TARGET}}; \
|
||||
for i in ${_SKIPPED}; do \
|
||||
|
@ -93,19 +99,19 @@ _subdir_fragment= \
|
|||
done; set -e
|
||||
|
||||
.for __target in all fetch package fake extract patch configure \
|
||||
build distclean deinstall install update \
|
||||
reinstall checksum fetch-makefile \
|
||||
link-categories unlink-categories regress lib-depends-check \
|
||||
newlib-depends-check manpages-check license-check \
|
||||
print-package-signature
|
||||
build distclean deinstall install update \
|
||||
reinstall checksum fetch-makefile \
|
||||
link-categories unlink-categories regress lib-depends-check \
|
||||
newlib-depends-check manpages-check license-check \
|
||||
print-package-signature
|
||||
|
||||
${__target}:
|
||||
@${_subdir_fragment}
|
||||
.endfor
|
||||
|
||||
.for __target in describe show verbose-show dump-vars \
|
||||
homepage-links print-plist print-plist-contents \
|
||||
print-plist-all
|
||||
homepage-links print-plist print-plist-contents \
|
||||
print-plist-all
|
||||
${__target}:
|
||||
@DESCRIBE_TARGET=Yes; export DESCRIBE_TARGET; ${_subdir_fragment}
|
||||
.endfor
|
||||
|
@ -119,7 +125,8 @@ ${__target}:
|
|||
clean:
|
||||
.if defined(clean) && ${clean:L:Mdepends}
|
||||
@{ target=all-dir-depends; echo_msg=:; \
|
||||
${_depfile_fragment}; ${_subdir_fragment}; }| tsort -r|while read subdir; do \
|
||||
${_depfile_fragment}; ${_subdir_fragment}; }| tsort -r| \
|
||||
while read subdir; do \
|
||||
${_flavor_fragment}; \
|
||||
eval $$toset ${MAKE} _CLEANDEPENDS=No clean; \
|
||||
done
|
||||
|
@ -135,13 +142,6 @@ readmes:
|
|||
@rm -f ${.CURDIR}/README.html
|
||||
@cd ${.CURDIR} && exec ${MAKE} README.html
|
||||
|
||||
TEMPLATES ?= ${PORTSDIR}/infrastructure/templates
|
||||
.if defined(PORTSTOP)
|
||||
README= ${TEMPLATES}/README.top
|
||||
.else
|
||||
README= ${TEMPLATES}/README.category
|
||||
.endif
|
||||
|
||||
README.html:
|
||||
@>$@.tmp
|
||||
.for d in ${_FULLSUBDIR}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $OpenBSD: modules.port.mk,v 1.3 2004/10/18 15:17:17 robert Exp $
|
||||
# $OpenBSD: modules.port.mk,v 1.4 2006/11/27 15:38:01 espie Exp $
|
||||
#
|
||||
# Copyright (c) 2001 Marc Espie
|
||||
#
|
||||
|
@ -27,25 +27,25 @@
|
|||
#
|
||||
|
||||
# XXX need this because make is buggy
|
||||
_empty=
|
||||
_empty =
|
||||
.undef _MODULES_DONE_ON_THIS_ROUND
|
||||
.for _m in ${MODULES:L}
|
||||
. if ${_empty} != "${_m:M*/*}"
|
||||
. for _d in ${PORTSDIR_PATH:S/:/ /}
|
||||
. if empty(_MODULES_DONE:M${_m}) && exists(${_d}/${_m}/${_m:T}.port.mk)
|
||||
. include "${_d}/${_m}/${_m:T}.port.mk"
|
||||
_MODULES_DONE+=${_m}
|
||||
_MODULES_DONE_ON_THIS_ROUND=Yep
|
||||
_MODULES_DONE += ${_m}
|
||||
_MODULES_DONE_ON_THIS_ROUND = Yep
|
||||
. endif
|
||||
. endfor
|
||||
. endif
|
||||
. if empty(_MODULES_DONE:M${_m})
|
||||
. if exists(${PORTSDIR}/infrastructure/mk/${_m}.port.mk)
|
||||
. include "${PORTSDIR}/infrastructure/mk/${_m}.port.mk"
|
||||
_MODULES_DONE+=${_m}
|
||||
_MODULES_DONE_ON_THIS_ROUND=Yep
|
||||
_MODULES_DONE += ${_m}
|
||||
_MODULES_DONE_ON_THIS_ROUND = Yep
|
||||
. else
|
||||
ERRORS+="Fatal: Missing support for module ${_m}."
|
||||
ERRORS += "Fatal: Missing support for module ${_m}."
|
||||
. endif
|
||||
. endif
|
||||
.endfor
|
||||
|
|
|
@ -1,33 +1,35 @@
|
|||
# $OpenBSD: pkgpath.mk,v 1.9 2006/11/03 23:19:42 espie Exp $
|
||||
# $OpenBSD: pkgpath.mk,v 1.10 2006/11/27 15:38:01 espie Exp $
|
||||
# ex:ts=4 sw=4 filetype=make:
|
||||
# pkgpath.mk - 2003 Marc Espie
|
||||
# This file is in the public domain.
|
||||
|
||||
# definitions common to bsd.port.mk and bsd.port.subdir.mk
|
||||
|
||||
.if !defined(PKGPATH)
|
||||
_PORTSDIR!= cd ${PORTSDIR} && pwd -P
|
||||
_CURDIR!= cd ${.CURDIR} && pwd -P
|
||||
PKGPATH=${_CURDIR:S,${_PORTSDIR}/,,}
|
||||
_PORTSDIR != cd ${PORTSDIR} && pwd -P
|
||||
_CURDIR != cd ${.CURDIR} && pwd -P
|
||||
PKGPATH = ${_CURDIR:S,${_PORTSDIR}/,,}
|
||||
.endif
|
||||
.if empty(PKGPATH)
|
||||
PKGDEPTH=
|
||||
PKGDEPTH =
|
||||
.else
|
||||
PKGDEPTH=${PKGPATH:C|[^./][^/]*|..|g}/
|
||||
PKGDEPTH = ${PKGPATH:C|[^./][^/]*|..|g}/
|
||||
.endif
|
||||
|
||||
PORTSDIR_PATH?=${PORTSDIR}:${PORTSDIR}/mystuff
|
||||
PORTSDIR_PATH ?= ${PORTSDIR}:${PORTSDIR}/mystuff
|
||||
|
||||
# Code to invoke to split dir,-multi,flavor
|
||||
|
||||
_flavor_fragment= \
|
||||
_flavor_fragment = \
|
||||
unset FLAVOR SUBPACKAGE || true; \
|
||||
multi=''; flavor=''; space=''; sawflavor=false; \
|
||||
case "$$subdir" in \
|
||||
"") \
|
||||
echo 1>&2 ">> Broken dependency: empty directory $$extra_msg"; \
|
||||
exit 1;; \
|
||||
echo 1>&2 ">> Broken dependency: empty directory $$extra_msg"; \
|
||||
exit 1;; \
|
||||
*,*) \
|
||||
IFS=,; first=true; for i in $$subdir; do \
|
||||
IFS=,; first=true; \
|
||||
for i in $$subdir; do \
|
||||
if $$first; then \
|
||||
dir=$$i; first=false; \
|
||||
else \
|
||||
|
@ -40,7 +42,8 @@ _flavor_fragment= \
|
|||
space=' ';; \
|
||||
esac \
|
||||
fi; \
|
||||
done; unset IFS;; \
|
||||
done; \
|
||||
unset IFS;; \
|
||||
*) \
|
||||
dir=$$subdir;; \
|
||||
esac; \
|
||||
|
@ -68,20 +71,20 @@ _flavor_fragment= \
|
|||
exit 1; \
|
||||
fi
|
||||
|
||||
_depfile_fragment= \
|
||||
_depfile_fragment = \
|
||||
case X$${_DEPENDS_FILE} in \
|
||||
X) _DEPENDS_FILE=`mktemp /tmp/depends.XXXXXXXXX|| exit 1`; \
|
||||
export _DEPENDS_FILE; \
|
||||
trap "rm -f $${_DEPENDS_FILE}" 0 1 2 3 13 15;; \
|
||||
esac
|
||||
|
||||
HTMLIFY= sed -e 's/&/\&/g' -e 's/>/\>/g' -e 's/</\</g'
|
||||
HTMLIFY = sed -e 's/&/\&/g' -e 's/>/\>/g' -e 's/</\</g'
|
||||
|
||||
|
||||
REPORT_PROBLEM_LOGFILE?=
|
||||
REPORT_PROBLEM_LOGFILE ?=
|
||||
.if !empty(REPORT_PROBLEM_LOGFILE)
|
||||
REPORT_PROBLEM?=echo "$$subdir ($@)">>${REPORT_PROBLEM_LOGFILE}
|
||||
REPORT_PROBLEM ?= echo "$$subdir ($@)">>${REPORT_PROBLEM_LOGFILE}
|
||||
.else
|
||||
REPORT_PROBLEM?=exit 1
|
||||
REPORT_PROBLEM ?= exit 1
|
||||
.endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue