Gerfried Fuchs wrote: > * Martin Schulze <email@example.com> [2003-01-16 21:49]: > > Makefile.local is created by a perlie that first reads all local > > foo-report.wml files and prints "foo.wml: foo-report.wml" (or was it > > "foo.$(LANG).html: foo-report.wml"). Then, if LANG is not english, it > > repeats in $ENGLISHDIR, but limits the output to those foo.wml files > > that weren't printed out yet. > > > > For the index file, if there is a foo-report.wml file either in the > > local or in the $ENGLISHDIR directory, it prints "index.wml: files". > > > > The Makefile.local file is regularily regenerated. > > Sounds like an idea that could work. Are you going to try it? :) No need to try, I already use self-modifying Makefiles. What about this patch and the attached script? Index: Makefile =================================================================== RCS file: /cvs/webwml/webwml/english/events/2002/Makefile,v retrieving revision 1.1 diff -u -r1.1 Makefile --- Makefile 10 Nov 2001 20:17:09 -0000 1.1 +++ Makefile 17 Jan 2003 20:52:25 -0000 @@ -1,10 +1,11 @@ -# This Makefile should need no changes from webwml/english/events/2001/Makefile +# This Makefile should need no changes from webwml/english/events/2002/Makefile # Please send a message to debian-www if you need to modify anything, so the # problem can be fixed. WMLBASE=../.. CUR_DIR=events/2002 SUBS= +MLOCAL = $(wildcard Makefile.reports) include $(WMLBASE)/Make.lang @@ -14,3 +15,10 @@ %.$(LANGUAGE).html: %.wml $(TEMPLDIR)/event.wml $(WML) $(<F) + +Makefile.reports: + $(ENGLISHSRCDIR)/events/make_makefile_reports.pl $(ENGLISHSRCDIR)/$(CUR_DIR) + +ifneq "$(MLOCAL)" "" +include Makefile.reports +endif It does not yet scan for the defined report, but that can be added quite easily. > > Those tags are used by event.wml and past_event.wml. If you don't yet > > know how to treat them compared to a non-defined tag, check the SPI > > minutes.wml file. You don't have to define guests, absents etc. > > Thanks for the hint to the minutes.wml, but I was more thinking of how > to include it in the <ul> at the end as an item. I can't come up with if defined, add the code <a href="<report>"><gettext>Report</gettext></a> to the header that contains When, Where and More Info at the moment. > an idea of how to do this other than having the report link being > included somewhere else on the events page. No idea how to make it Ah... yes, I'd place it to the header in that case. :-) > still show up in the related links section if it defines a tag on its > own in the header. If we would have to include it by hand in the list > at the end anyway I don't see any gain defining the tag in the file > itself, too. If you want to have it in the <ul> at the end, that's a little bit more tricky, but doable as well. :-) First find out if there is a <ul> already. If there isn't, just create one. If there is, modify the <ul> to write "<ul>\n<li>..." when the source file contains the string "<ul>". You'll just have to redefine <ul> and refer to <ul*> for the original. Regards, Joey -- Whenever you meet yourself you're in a time loop or in front of a mirror.
Description: Perl program