[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]

Re: question regarding dependencies with wmk

> 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 -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))

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))

	@target=`echo $@ | sed 's/-.*//'`; \
	dir=`echo $@ | sed 's/[^-]*-//'`; \
	echo "Making $$target in " `pwd`/"$$dir"; \
	$(MAKE) -C $$dir $$target


	-rm $(HTML)

	$(WML_EXEC)weblint $(HTML)

	@for X in $(HTML); do \
	   echo '=============================================='; \
	   echo `pwd`/"$$X"; \
	   $(WML_EXEC)htmlinfo "$$X"; \

tags TAGS:
	-rm TAGS
	find . -name '*.wml' -o -name Makefile -o -name .wmlrc | xargs etags -a -l none

.PHONY: tags TAGS clean weblint htmlinfo \