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

Re: Install manual, Finnish translation STARTED



On Thu, Feb 25, 1999 at 02:08:31AM -0500, Adam Di Carlo wrote:
> 
> That seems like the best place to put it.  I don't know how we're
> going to handle looping over the Makefile for each language, *and* for
> each platform -- clues?
> 
Here's what we do for the web pages. I'm sure you can use the same
ideas to create the Makefiles you need. You need to know the structure
of the files for this to make sense. Each language is in its own
directory. The variables LANGUAGE and WML are defined in the top level of
each language and the file where those variables are defined is included
into each Makefile (Make.common in the example below). The source for the
web pages are in .wml files. Notice that in each Makefile only WMLBASE and
SUBS need to be modified.

This has been ripped out of the original files and stripped down so there
are probably some mistakes.

#################### begin Makefile ####################
WMLBASE=..
SUBS=
WMLFILES := $(wildcard *.wml)
HTMLFILES := $(patsubst %.wml,%.$(LANGUAGE).html,$(WMLFILES))
TEMPLDIR=$(WMLBASE)/templates

include $(WMLBASE)/Make.common

all:: $(HTMLFILES)
	@for i in $(SUBS) ''; do \
		if [ -d "$$i" ]; then \
			$(MAKE) -C $$i ; \
		fi ; \
	done

%.$(LANGUAGE).html: %.wml $(TEMPLDIR)/template.wml $(TEMPLDIR)/languages.wml
        $(WML) $(<F)

#################### end Makefile ####################

Any subdirectories can be listed in the SUBS variable so it is possible
to do a make at the top level and everthing will be built.

Jay Treacy


Reply to: