First (and very minor) changes on the way to make the www build

obj-clean.

This basically entails putting ${.CURDIR} in front of the occasional
source file, script, or directory.

Also adds '.include <bsd.obj.mk>' to web.mk so 'make obj' works.

Change gencommercial script to take a '-s' flag pointing to the source
directory, and the portindex script to take an optional additional
parameter indicating the source directory.

Add -D ${.CURDIR} to sgmlformat to follow includes properly.
This commit is contained in:
Neil Blakey-Milner 2000-09-30 00:21:39 +00:00
parent 892101a84e
commit fbca680c07
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/www/; revision=8047
12 changed files with 68 additions and 60 deletions

View file

@ -1,4 +1,4 @@
# $FreeBSD: www/Makefile,v 1.12 2000/02/28 12:41:23 phantom Exp $
# $FreeBSD: www/Makefile,v 1.13 2000/02/28 13:15:53 phantom Exp $
LINKS= en/ja en/es en/ru en/zh
LINKS+= ja/web.mk es/web.mk ru/web.mk
@ -11,6 +11,10 @@ LINKS+= ../doc/en_US.ISO_8859-1/includes.sgml
SUBDIR= en
.if make(obj)
SUBDIR+= ja es ru zh
.endif
all: links
@ -21,35 +25,36 @@ clean:
en/ja:
cd en; ln -sf ../ja
cd en; ln -sf ${.CURDIR}/ja
en/es:
cd en; ln -sf ../es
cd en; ln -sf ${.CURDIR}/es
en/ru:
cd en; ln -sf ../ru
cd en; ln -sf ${.CURDIR}/ru
en/zh:
cd en; ln -sf ../zh
cd en; ln -sf ${.CURDIR}/zh
ja/web.mk:
cd ja; ln -sf ../en/web.mk
cd ja; ln -sf ${.CURDIR}/en/web.mk
es/web.mk:
cd es; ln -sf ../en/web.mk
cd es; ln -sf ${.CURDIR}/en/web.mk
ru/web.mk:
cd ru; ln -sf ../en/web.mk
cd ru; ln -sf ${.CURDIR}/en/web.mk
web.mk:
cd .; ln -sf en/web.mk
cd .; ln -sf ${.CURDIR}/en/web.mk
.if !defined(WEB_ONLY) || empty(WEB_ONLY)
../doc/en_US.ISO_8859-1/web.mk:
cd ../doc/en_US.ISO_8859-1; ln -sf ../../www/en/web.mk
cd ../doc/en_US.ISO_8859-1; ln -sf ${.CURDIR}/en/web.mk
../doc/en_US.ISO_8859-1/includes.sgml:
cd ../doc/en_US.ISO_8859-1; ln -sf ../../www/en/includes.sgml
cd ../doc/en_US.ISO_8859-1; ln -sf ${.CURDIR}/en/includes.sgml
.endif
.include <bsd.obj.mk>
.include <bsd.subdir.mk>

View file

@ -1,4 +1,4 @@
# $FreeBSD: www/en/Makefile,v 1.51 2000/01/29 14:18:17 wosch Exp $
# $FreeBSD: www/en/Makefile,v 1.52 2000/06/07 00:03:33 nik Exp $
.if exists(Makefile.conf)
.include "Makefile.conf"
.endif
@ -51,16 +51,15 @@ SUBDIR+= ports
SUBDIR+= gifs
SUBDIR+= cgi
WEB_LANG?= ja es ru zh
# Non-English
.if !defined(ENGLISH_ONLY) || empty(ENGLISH_ONLY)
.if !defined(WEB_LANG) || empty(WEB_LANG)
SUBDIR+= ja
SUBDIR+= es
SUBDIR+= ru
SUBDIR+= zh
.else
SUBDIR+= ${WEB_LANG}
.endif
.for DIR in ${WEB_LANG}
#SUBDIR+= ../${DIR}
SUBDIR+= ${DIR}
.endfor
.endif
.if !defined(WEB_ONLY) || empty(WEB_ONLY)

View file

@ -1,4 +1,4 @@
# $FreeBSD: www/en/commercial/Makefile,v 1.11 2000/03/12 21:41:52 phantom Exp $
# $FreeBSD: www/en/commercial/Makefile,v 1.12 2000/04/04 09:21:21 kuriyama Exp $
.if exists(../Makefile.conf)
.include "../Makefile.conf"
@ -31,21 +31,21 @@ software.html: software.sgml software.inc
software_bycat.html: software_bycat.sgml software_bycat.inc
consulting.inc: gencommercial.pl commercial.desc consulting.raw
${PERL} ./gencommercial.pl consulting
${PERL} ${.CURDIR}/gencommercial.pl -s ${.CURDIR} consulting
consulting_bycat.inc: gencommercial.pl commercial.desc consulting.raw
${PERL} ./gencommercial.pl -c consulting
${PERL} ${.CURDIR}/gencommercial.pl -s ${.CURDIR} -c consulting
hardware.inc: gencommercial.pl commercial.desc hardware.raw
${PERL} ./gencommercial.pl hardware
${PERL} ${.CURDIR}/gencommercial.pl -s ${.CURDIR} hardware
misc.inc: gencommercial.pl commercial.desc misc.raw
${PERL} ./gencommercial.pl misc
${PERL} ${.CURDIR}/gencommercial.pl -s ${.CURDIR} misc
software.inc: gencommercial.pl commercial.desc software.raw
${PERL} ./gencommercial.pl software
${PERL} ${.CURDIR}/gencommercial.pl -s ${.CURDIR} software
software_bycat.inc: gencommercial.pl commercial.desc software.raw
${PERL} ./gencommercial.pl -c software
${PERL} ${.CURDIR}/gencommercial.pl -s ${.CURDIR} -c software
.include <../web.mk>

View file

@ -27,7 +27,7 @@
# This program is made available to the general public under
# the "BSD-style copyright" terms of agreement.
#
# $FreeBSD: www/en/commercial/gencommercial.pl,v 1.5 1999/12/17 14:24:14 phantom Exp $
# $FreeBSD: www/en/commercial/gencommercial.pl,v 1.6 2000/04/04 09:23:41 kuriyama Exp $
#######################################################################
## Configuration Section
@ -36,7 +36,7 @@
# The $description_file contains the definitions for each Category
# and Sub-category.
$description_file = "./commercial.desc";
$description_file = "commercial.desc";
# If you want to change the output file naming convention,
# modify the two lines below.
@ -60,18 +60,20 @@ require 5.001;
# Parse the command line
sub usage_exit {
print STDERR "Usage: gencommercial.pl [-ac] category\n";
print STDERR "Usage: gencommercial.pl [-ac] [-s directory] category\n";
exit (1);
}
use Getopt::Long;
$good_result = GetOptions ("alphabetical" => \$opt_alpha,
"categorical" => \$opt_cat);
"categorical" => \$opt_cat,
"sourcedir=s" => \$opt_srcdir);
&usage_exit() if (not $good_result);
&usage_exit() if (@ARGV != 1);
$opt_alpha = 1 if (! $opt_alpha && ! $opt_cat ); # -a is default;
$category = $ARGV[0];
$srcdir = $opt_srcdir || ".";
#######################################################################
# Now, we parse the description file.
@ -92,9 +94,9 @@ $category = $ARGV[0];
#
# A '#' at the *beginning* of a line marks a comment.
if (open (DESC, "< $description_file") == 0)
if (open (DESC, "< $srcdir/$description_file") == 0)
{
print "ERROR: Unable to open $description_file file.\n";
print "ERROR: Unable to open $srcdir/$description_file file.\n";
print "ERROR: $!. Exiting.\n";
exit 1;
}
@ -193,9 +195,9 @@ else
# In this version, the CATEGORY is actually determined by the name
# of the .raw file, so it is not used.
if (open (RAW, "< ${category}.raw") == 0)
if (open (RAW, "< ${srcdir}/${category}.raw") == 0)
{
print "ERROR: Unable to open ${category}.raw file.\n";
print "ERROR: Unable to open ${srcdir}/${category}.raw file.\n";
print "ERROR: $!. Exiting.\n";
exit 1;
}

View file

@ -1,4 +1,4 @@
# $FreeBSD: www/en/gallery/Makefile,v 1.8 2000/04/07 13:09:21 phantom Exp $
# $FreeBSD: www/en/gallery/Makefile,v 1.9 2000/04/20 16:40:58 phantom Exp $
.if exists(../Makefile.conf)
.include "../Makefile.conf"
@ -15,19 +15,19 @@ CLEANFILES+= cgallery.inc npgallery.inc pgallery.inc gallery.inc
cgallery.html: cgallery.sgml cgallery.inc
cgallery.inc: gallery.db gengallery.pl
${PERL} ./gengallery.pl commercial gallery.db > cgallery.inc
${PERL} ${.CURDIR}/gengallery.pl commercial ${.CURDIR}/gallery.db > cgallery.inc
npgallery.html: npgallery.sgml npgallery.inc
npgallery.inc: gallery.db gengallery.pl
${PERL} ./gengallery.pl nonprofit gallery.db > npgallery.inc
${PERL} ${.CURDIR}/gengallery.pl nonprofit ${.CURDIR}/gallery.db > npgallery.inc
pgallery.html: pgallery.sgml pgallery.inc
pgallery.inc: gallery.db gengallery.pl
${PERL} ./gengallery.pl personal gallery.db > pgallery.inc
${PERL} ${.CURDIR}/gengallery.pl personal ${.CURDIR}/gallery.db > pgallery.inc
gallery.html: gallery.sgml gallery.inc
gallery.inc: gallery.db gallery.sgml
${PERL} ./prune.pl gallery.db /dev/null | \
${PERL} ${.CURDIR}/prune.pl ${.CURDIR}/gallery.db /dev/null | \
${PERL} -ne 'chomp; m/([-\w]+):\s+(\d+)/ and \
print qq/<!ENTITY num./.lc($$1).qq/ CDATA "$$2">\n/' \
> gallery.inc

View file

@ -1,4 +1,4 @@
# $FreeBSD: www/en/ports/Makefile,v 1.26 1999/09/19 09:39:23 wosch Exp $
# $FreeBSD: www/en/ports/Makefile,v 1.27 2000/02/28 12:46:46 phantom Exp $
.if exists(../Makefile.conf)
.include "../Makefile.conf"
@ -55,12 +55,12 @@ Makefile.gen: index.sgml .NOTMAIN
index.sgml: ${INDEX} ${Y2K} categories packages.exists portindex ports.inc .NOTMAIN
rm -f *.sgml
${PORTINDEX} ${INDEX} ${Y2K}
${PORTINDEX} ${INDEX} ${Y2K} ${.CURDIR}
install: all
all install clean:
${MAKE} ${MAKEFLAGS} -f Makefile.inc0 ${.TARGET}
(cd ${.CURDIR} && ${MAKE} ${MAKEFLAGS} -f Makefile.inc0 ${.TARGET})
.include "../web.mk"

View file

@ -1,10 +1,10 @@
# $FreeBSD$
# $FreeBSD: www/en/ports/Makefile.inc0,v 1.2 1999/09/06 07:02:48 peter Exp $
.if exists(../Makefile.conf)
.if exists(${.CURDIR}/../Makefile.conf)
.include "../Makefile.conf"
.endif
.if exists(Makefile.inc)
.if exists(${.CURDIR}/Makefile.inc)
.include "Makefile.inc"
.endif

View file

@ -40,7 +40,7 @@ if ($urlcgi) {
$today = &getdate;
&packages_exist('packages.exists', *packages);
&category_description('categories', *category_description);
&category_description(($ARGV[2] || '.') . '/categories', *category_description);
&y2k_statements;
&main;

View file

@ -1,4 +1,4 @@
# $FreeBSD: www/en/search/Makefile,v 1.5 1999/09/06 07:02:57 peter Exp $
# $FreeBSD: www/en/search/Makefile,v 1.6 2000/04/20 16:41:32 phantom Exp $
.if exists(../Makefile.conf)
.include "../Makefile.conf"
@ -13,12 +13,12 @@ INDEXLINK= search.html
CLEANFILES+=atoz.sgml site.sgml
index-site.sgml: atoz.sgml site.sgml
index-site.html: atoz.sgml site.sgml
atoz.sgml: web.atoz
sort -fu web.atoz | ${PERL} atoz.pl > ${.TARGET}
sort -fu ${.ALLSRC} | ${PERL} ${.CURDIR}/atoz.pl > ${.TARGET}
site.sgml: site.map
${PERL} site.pl < ${.ALLSRC} > ${.TARGET}
${PERL} ${.CURDIR}/site.pl < ${.ALLSRC} > ${.TARGET}
.include "../web.mk"

View file

@ -1,5 +1,5 @@
#
# $FreeBSD: www/en/tutorials/Makefile,v 1.7 2000/05/17 18:33:14 nik Exp $
# $FreeBSD: www/en/tutorials/Makefile,v 1.8 2000/05/19 00:10:09 nik Exp $
#
# Build the FreeBSD tutorials/articles outside of the www tree, and then
# install them in to the right place.
@ -12,9 +12,9 @@ DIRS_TO_CLEAN = ../../../doc/en_US.ISO_8859-1/articles \
../../../doc/en_US.ISO_8859-1/books/ppp-primer
all afterinstall: index.html
(cd ../../../doc/en_US.ISO_8859-1/articles && ${MAKE} 'FORMATS=html html-split' 'DESTDIR=${DESTDIR}/data/tutorials/$${.CURDIR:T}' ${.TARGET:S/afterinstall/install/})
(cd ../../../doc/en_US.ISO_8859-1/books/fdp-primer && ${MAKE} 'FORMATS=html html-split' DESTDIR=${DESTDIR}/data/tutorials/docproj-primer ${.TARGET:S/afterinstall/install/})
(cd ../../../doc/en_US.ISO_8859-1/books/porters-handbook && ${MAKE} 'FORMATS=html html-split' DESTDIR=${DESTDIR}/data/porters-handbook ${.TARGET:S/afterinstall/install/})
(cd ../../../doc/en_US.ISO_8859-1/books/ppp-primer && ${MAKE} 'FORMATS=html html-split' DESTDIR=${DESTDIR}/data/tutorials/ppp ${.TARGET:S/afterinstall/install/})
(cd ${.CURDIR}/../../../doc/en_US.ISO_8859-1/articles && ${MAKE} 'FORMATS=html html-split' 'DESTDIR=${DESTDIR}/data/tutorials/$${.CURDIR:T}' ${.TARGET:S/afterinstall/install/})
(cd ${.CURDIR}/../../../doc/en_US.ISO_8859-1/books/fdp-primer && ${MAKE} 'FORMATS=html html-split' DESTDIR=${DESTDIR}/data/tutorials/docproj-primer ${.TARGET:S/afterinstall/install/})
(cd ${.CURDIR}/../../../doc/en_US.ISO_8859-1/books/porters-handbook && ${MAKE} 'FORMATS=html html-split' DESTDIR=${DESTDIR}/data/porters-handbook ${.TARGET:S/afterinstall/install/})
(cd ${.CURDIR}/../../../doc/en_US.ISO_8859-1/books/ppp-primer && ${MAKE} 'FORMATS=html html-split' DESTDIR=${DESTDIR}/data/tutorials/ppp ${.TARGET:S/afterinstall/install/})
.include "../web.mk"

View file

@ -1,5 +1,5 @@
# bsd.web.mk
# $FreeBSD: www/en/web.mk,v 1.29 2000/04/23 14:31:21 phantom Exp $
# $FreeBSD: www/en/web.mk,v 1.30 2000/04/29 07:50:27 kuriyama Exp $
#
# Build and install a web site.
@ -77,7 +77,7 @@ GENDOCS+= ${REVFILES}
SGMLNORM= sgmlnorm
PREFIX?= /usr/local
CATALOG?= ${PREFIX}/share/sgml/html/catalog
SGMLNORMFLAGS= -d ${SGMLNORMOPTS} -c ${CATALOG}
SGMLNORMFLAGS= -d ${SGMLNORMOPTS} -c ${CATALOG} -D ${.CURDIR}
GENDOCS+= ${DOCS:M*.sgml:S/.sgml$/.html/g}
ORPHANS:= ${ORPHANS:N*.sgml}
DATESUBST= 's/<!ENTITY date[ \t]*"$$Free[B]SD. .* \(.* .*\) .* .* $$">/<!ENTITY date "Last modified: \1">/'
@ -229,4 +229,5 @@ PARAMS+= SGMLOPTS="${SGMLOPTS}"
.endif
.include <bsd.obj.mk>
# THE END

View file

@ -1,5 +1,5 @@
# bsd.web.mk
# $FreeBSD: www/en/web.mk,v 1.29 2000/04/23 14:31:21 phantom Exp $
# $FreeBSD: www/en/web.mk,v 1.30 2000/04/29 07:50:27 kuriyama Exp $
#
# Build and install a web site.
@ -77,7 +77,7 @@ GENDOCS+= ${REVFILES}
SGMLNORM= sgmlnorm
PREFIX?= /usr/local
CATALOG?= ${PREFIX}/share/sgml/html/catalog
SGMLNORMFLAGS= -d ${SGMLNORMOPTS} -c ${CATALOG}
SGMLNORMFLAGS= -d ${SGMLNORMOPTS} -c ${CATALOG} -D ${.CURDIR}
GENDOCS+= ${DOCS:M*.sgml:S/.sgml$/.html/g}
ORPHANS:= ${ORPHANS:N*.sgml}
DATESUBST= 's/<!ENTITY date[ \t]*"$$Free[B]SD. .* \(.* .*\) .* .* $$">/<!ENTITY date "Last modified: \1">/'
@ -229,4 +229,5 @@ PARAMS+= SGMLOPTS="${SGMLOPTS}"
.endif
.include <bsd.obj.mk>
# THE END