I think the following is a nice optimization, but I'm confused as to why
we need to check this at all:
check-categories:
.for cat in ${CATEGORIES}
- @if ${ECHO_CMD} ${VALID_CATEGORIES} | ${GREP} -wq ${cat}; then \
- ${TRUE}; \
- else \
- ${ECHO_MSG} "${PKGNAME}: Makefile error: category ${cat} not in list
of valid categories."; \
- ${FALSE}; \
- fi
+. if empty(VALID_CATEGORIES:M${cat})
+ @${ECHO_MSG} "${PKGNAME}: Makefile error: category ${cat} not in list
of valid categories."; \
+ ${FALSE};
+. endif
.endfor
.endif
On the one hand, I don't think bsd.port.mk is the place for this. The
other problem is that if you're creating local ports (e.g.,
/usr/ports/local/foo) you then have to play silly buggers in the port's
Makefile, adding "VALID_CATEGORIES+= local" which just seems pointless
to me.
Is this such a huge problem that we need to check this on every port build?
Doug
On 06/05/2011 22:53, Baptiste Daroussin wrote:
bapt 2011-06-06 05:53:51 UTC
FreeBSD ports repository
Modified files:
Mk bsd.port.mk
Log:
- remove some old code (unsused on supported OS) [1]
- prevent some useless external program call (based on [2])
- simplify (in)valid category detection
PR: ports/155629 [1], ports/65804 [2], ports/157273 [3]
http://www.FreeBSD.org/cgi/query-pr.cgi?pr=155629
Submitted by: Eitan Adler<[email protected]> [1], green@ [2], bapt@
(myself) [2]
Exp-runs by: pav@
Revision Changes Path
1.684 +13 -28 ports/Mk/bsd.port.mk
http://www.FreeBSD.org/cgi/cvsweb.cgi/ports/Mk/bsd.port.mk.diff?&r1=1.683&r2=1.684&f=h
--
Nothin' ever doesn't change, but nothin' changes much.
-- OK Go
Breadth of IT experience, and depth of knowledge in the DNS.
Yours for the right price. :) http://SupersetSolutions.com/
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "[email protected]"