[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]
Re: question regarding dependencies with wmk
- From: Tomasz Cholewo <nospam@thanx>
- Date: Thu, 25 Jun 1998 15:06:32 -0400 (EDT)
> Has anybody already experiences on this topic? How do others run WMk
> or WML?
I am using GNU make which also allows specifying explicit dependencies
between files. Each source directory of my web site contains a Makefile
which includes definitions from a common file make-wml.defs. Only the
names of the .wml files (FILES=...) and source subdirectories
(SUBDIRS=...) have to be specified in most cases.
This for example is my top-level Makefile:
FILES = index pubs
SUBDIRS = cv software photos nn
include $(HOME)/include/make-wml.defs
index.html: index.wml cv.html
pubs.html: pubs.wml publications.html
linklint:
linklint -error -warn -doc .linklint/ -root $(WWWROOT) -host ci.uofl.edu /tom/@
In my main directory I have index.wml and pubs.wml. cv.html and
publications.html are generated from TeX sources and are included by
index.wml and pubs.wml. There are also subdirectories into which make
descends recursively. `make' allows to take the advantage of parallel
building on multiprocessor machines when the `-j' option is used.
# -*- makefile -*-
# definitions for WML (June 25, 1998; Tomasz Cholewo <t.cholewo@ieee.org>)
HTML = $(patsubst %,%.html,$(FILES))
#DEBUG = -DDEBUG=1
WMLFLAGS = $(DEBUG) -I$(HOME)/include -q -Eweblint #-O3
WML_EXEC = /usr/contrib/lib/wml/exec/wml_aux_
%.html: %.wml
wml $(WMLFLAGS) -o $@ $<
ALL_SUBDIRS = $(addprefix all-,$(SUBDIRS))
WEBLINT_SUBDIRS = $(addprefix weblint-,$(SUBDIRS))
HTMLINFO_SUBDIRS = $(addprefix htmlinfo-,$(SUBDIRS))
CLEAN_SUBDIRS = $(addprefix clean-,$(SUBDIRS))
$(ALL_SUBDIRS) $(WEBLINT_SUBDIRS) $(HTMLINFO_SUBDIRS) $(CLEAN_SUBDIRS):
@target=`echo $@ | sed 's/-.*//'`; \
dir=`echo $@ | sed 's/[^-]*-//'`; \
echo "Making $$target in " `pwd`/"$$dir"; \
$(MAKE) -C $$dir $$target
all: $(HTML) $(ALL_SUBDIRS)
clean: $(CLEAN_SUBDIRS)
-rm $(HTML)
weblint: $(WEBLINT_SUBDIRS)
$(WML_EXEC)weblint $(HTML)
htmlinfo: $(HTMLINFO_SUBDIRS)
@for X in $(HTML); do \
echo '=============================================='; \
echo `pwd`/"$$X"; \
$(WML_EXEC)htmlinfo "$$X"; \
done
tags TAGS:
-rm TAGS
find . -name '*.wml' -o -name Makefile -o -name .wmlrc | xargs etags -a -l none
.PHONY: tags TAGS clean weblint htmlinfo \
$(ALL_SUBDIRS) $(WEBLINT_SUBDIRS) $(HTMLINFO_SUBDIRS) $(CLEAN_SUBDIRS)