make versus _MANPAGE
Gerald Pfeifer
gerald at pfeifer.com
Thu Feb 5 15:07:00 PST 2004
Is the following a ports/Mk bug, a /usr/bin/make bug, or just bad
carma? Seen on 4.8-p13 and 5.2-CURRENT.
I am currently fighting a very nasty problem where a construct involving
.for in a Makefile works as expected, depending on whether I use it before
.include <bsd.port.post.mk> or after.
It's exactly the same code in both cases, and also the ${_MANPAGES}
variable is properly set in both cases!
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/lang/gcc33/Makefile,v
retrieving revision 1.174
diff -u -3 -p -r1.174 Makefile
--- Makefile 5 Feb 2004 22:09:31 -0000 1.174
+++ Makefile 5 Feb 2004 22:10:52 -0000
@@ -187,4 +187,18 @@ cklatest:
@-ncftpls ${SITE} | ${GREP} 'LATEST.*3\.3'
.endfor
+before:
+ @echo ${_MANPAGES}
+ @echo "==============================="
+.for mp in "begin" ${_MANPAGES} "end"
+ @echo ${mp}
+.endfor
+
.include <bsd.port.post.mk>
+
+after:
+ @echo ${_MANPAGES}
+ @echo "==============================="
+.for mp in "begin" ${_MANPAGES} "end"
+ @echo ${mp}
+.endfor
To reproduce, just apply the patch above on the lang/gcc33 port and
exercise two targets added by the patch:
% make before
/s/scratch/gerald/man/man1/cpp33.1 /s/scratch/gerald/man/man1/g++33.1
:
/s/scratch/gerald/man/man7/gpl.7
===============================
begin
end
Where are all those man pages gone?
% make after
/s/scratch/gerald/man/man1/cpp33.1 /s/scratch/gerald/man/man1/g++33.1
:
/s/scratch/gerald/man/man7/gpl.7
===============================
begin
/s/scratch/gerald/man/man1/cpp33.1
:
/s/scratch/gerald/man/man7/gpl.7
end
In this case, after the .include <bsd.port.post.mk> it works?
Gerald
--
Gerald Pfeifer (Jerry) gerald at pfeifer.com http://www.pfeifer.com/gerald/
More information about the freebsd-ports
mailing list