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

Re: /international

On Mon, Jan 22, 2001 at 11:36:39PM -0600, James A. Treacy wrote:
> > Currently, when the makefiles install the pages, it links xxx.html ->
> > xxx.en.html. How do I set it up to link xxx.html -> xxx.sv.html for
> > that directory?
> You need to override the following section of webwml/Makefile.common:
> $(HTMLDIR)/%.$(LANGUAGE).html: %.$(LANGUAGE).html
>    @echo copying $(@F) to $(HTMLDIR)
>    -@cp $(@F) $(HTMLDIR)
> ifeq ($(LANGUAGE),en)
>    @echo making a link $(@D)/$(*F).html -\> $(@F)
>    @ln -sf $(@F) $(@D)/$(*F).html
> endif
> endif

The underlined thing is the fix for this problem, Peter should set up that
makefile to say:


before any `include' statements. And at the end of the file, add:

$(HTMLDIR)/%.$(LANGUAGE).html: %.$(LANGUAGE).html
	@echo copying $(@F) to $(HTMLDIR)
	-@cp $(@F) $(HTMLDIR)
ifeq "$(LANGUAGE)" "sv"
	@echo making a link $(@D)/$(*F).html -\> $(@F)
	@ln -sf $(@F) $(@D)/$(*F).html

I'm not sure if the ifeq is necessary, I don't know if anyone would want to
translate that stuff...

> The first thing to notice is that
> webwml/$lang/international/Makefile includes webwml/$lang/Make.lang
> and
> webwml/$lang/Make.lang includes webwml/Makefile.common

(Just for the record: this is on purpose -- every little makefile includes
Makefile.common, that's why it's got the "common" suffix :)

> I suggest fixing webwml/Makefile.common so that the language that
> gets the symlink is configurable. I'm thinking of something like
> ifeq ($(LANGUAGE),$(LINKLANG))
> instead of
> ifeq ($(LANGUAGE),en)
> where LINKLANG is set by default to en, but can be overridden.

I wouldn't have anything against this, OTOH.

Digital Electronic Being Intended for Assassination and Nullification

Reply to: