Shaun Amott <[email protected]> wrote in <[email protected]>:
sh> shaun 2011-07-20 23:52:12 UTC
sh>
sh> FreeBSD doc repository (ports committer)
sh>
sh> Modified files:
sh> en/cgi Makefile
sh> share/mk web.site.mk
sh> Log:
sh> Hook up files (Perl modules) for the new query-pr.cgi script. A bit of
sh> extra code to handle the fact that the files are in subdirectories was
sh> required.
sh>
sh> Revision Changes Path
sh> 1.35 +14 -1 www/en/cgi/Makefile
sh> 1.77 +9 -1 www/share/mk/web.site.mk
sh>
Thank you for updating the CGI script, but I do not think it is a
good idea to add CGI_SUB{DIRS,FILES} into web.site.mk.
Sub-directories are handled by bsd.subdir.mk, so it should be used in
straightforward way instead of adding new variables/targets.
What do you think about the attached patch? I did not notice these
changes were submitted somewhere for review before the commit...
-- Hiroki
Index: share/mk/web.site.mk
===================================================================
RCS file: /home/ncvs/www/share/mk/web.site.mk,v
retrieving revision 1.79
diff -d -u -I \$FreeBSD:.*\$ -I \$NetBSD:.*\$ -I \$OpenBSD:.*\$ -I \$DragonFly:.*\$ -I \$Id:.*\$ -I \$Translation:.*\$ -I \$hrs:.*\$ -r1.79 web.site.mk
--- share/mk/web.site.mk 21 Jul 2011 00:42:50 -0000 1.79
+++ share/mk/web.site.mk 21 Jul 2011 03:05:01 -0000
@@ -358,14 +358,6 @@
.endif
.if defined(CGI) && !empty(CGI)
@${MKDIR} -p ${CGIINSTALLDIR}
-.if defined(CGI_SUBDIRS) && !empty(CGI_SUBDIRS)
-.for sd in ${CGI_SUBDIRS}
- @${MKDIR} -p ${CGIINSTALLDIR}/${sd}
-.endfor
-.for sf in ${CGI_SUBFILES}
- ${INSTALL_CGI} ${.CURDIR}/${sf} ${CGIINSTALLDIR}/${sf}
-.endfor
-.endif
.for entry in ${CGI}
${INSTALL_CGI} ${.CURDIR}/${entry} ${CGIINSTALLDIR}
.endfor
Index: en/cgi/Makefile
===================================================================
RCS file: /home/ncvs/www/en/cgi/Makefile,v
retrieving revision 1.35
diff -d -u -I \$FreeBSD:.*\$ -I \$NetBSD:.*\$ -I \$OpenBSD:.*\$ -I \$DragonFly:.*\$ -I \$Id:.*\$ -I \$Translation:.*\$ -I \$hrs:.*\$ -r1.35 Makefile
--- en/cgi/Makefile 20 Jul 2011 23:52:12 -0000 1.35
+++ en/cgi/Makefile 21 Jul 2011 03:03:54 -0000
@@ -16,18 +16,6 @@
DATA+= cvsweb.conf-freebsd
DATA+= query-pr-lib.pl
-CGI_SUBDIRS= GnatsPR GnatsPR/Section
-
-CGI_SUBFILES+= GnatsPR/MIMEIterator.pm
-CGI_SUBFILES+= GnatsPR/Section.pm
-CGI_SUBFILES+= GnatsPR/Section/Email.pm
-CGI_SUBFILES+= GnatsPR/Section/FieldStart.pm
-CGI_SUBFILES+= GnatsPR/Section/MIME.pm
-CGI_SUBFILES+= GnatsPR/Section/Patch.pm
-CGI_SUBFILES+= GnatsPR/Section/StateChange.pm
-CGI_SUBFILES+= GnatsPR/Section/Text.pm
-CGI_SUBFILES+= GnatsPR/SectionIterator.pm
-
CGI=
CGI+= confirm-code.cgi
CGI+= cvsweb.cgi
@@ -46,6 +34,8 @@
CGI+= search.cgi
CGI+= url.cgi
+SUBDIR= GnatsPR
+
.SUFFIXES: .C .cgi
.C.cgi:
Index: en/cgi/Makefile.inc
===================================================================
RCS file: en/cgi/Makefile.inc
diff -N en/cgi/Makefile.inc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ en/cgi/Makefile.inc 21 Jul 2011 03:01:08 -0000
@@ -0,0 +1,4 @@
+# $FreeBSD$
+
+WEBBASE?= /data/cgi
+WEB_PREFIX?= ${.CURDIR}/../../..
Index: en/cgi/GnatsPR/Makefile
===================================================================
RCS file: en/cgi/GnatsPR/Makefile
diff -N en/cgi/GnatsPR/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ en/cgi/GnatsPR/Makefile 21 Jul 2011 02:55:20 -0000
@@ -0,0 +1,14 @@
+# $FreeBSD$
+
+.if exists(../Makefile.conf)
+.include "../Makefile.conf"
+.endif
+.if exists(../Makefile.inc)
+.include "../Makefile.inc"
+.endif
+
+SUBDIR= Section
+
+DATA= MIMEIterator.pm Section.pm
+
+.include "${WEB_PREFIX}/share/mk/web.site.mk"
Index: en/cgi/GnatsPR/Makefile.inc
===================================================================
RCS file: en/cgi/GnatsPR/Makefile.inc
diff -N en/cgi/GnatsPR/Makefile.inc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ en/cgi/GnatsPR/Makefile.inc 21 Jul 2011 03:02:07 -0000
@@ -0,0 +1,4 @@
+# $FreeBSD$
+
+WEBBASE?= /data/cgi/GnatsPR
+WEB_PREFIX?= ${.CURDIR}/../../../..
Index: en/cgi/GnatsPR/Section/Makefile
===================================================================
RCS file: en/cgi/GnatsPR/Section/Makefile
diff -N en/cgi/GnatsPR/Section/Makefile
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ en/cgi/GnatsPR/Section/Makefile 21 Jul 2011 03:03:00 -0000
@@ -0,0 +1,12 @@
+# $FreeBSD$
+
+.if exists(../Makefile.conf)
+.include "../Makefile.conf"
+.endif
+.if exists(../Makefile.inc)
+.include "../Makefile.inc"
+.endif
+
+DATA= Email.pm FieldStart.pm MIME.pm Patch.pm StateChange.pm Text.pm
+
+.include "${WEB_PREFIX}/share/mk/web.site.mk"
pgplYxpdkHEDj.pgp
Description: PGP signature
