r822 - trunk/scripts

lizardo at linuxfromscratch.org lizardo at linuxfromscratch.org
Sun Aug 8 19:37:33 PDT 2004


Author: lizardo
Date: 2004-08-08 20:37:32 -0600 (Sun, 08 Aug 2004)
New Revision: 822

Modified:
   trunk/scripts/update-website.mk
Log:
Changed svnlog target.


Modified: trunk/scripts/update-website.mk
===================================================================
--- trunk/scripts/update-website.mk	2004-08-08 23:49:37 UTC (rev 821)
+++ trunk/scripts/update-website.mk	2004-08-09 02:37:32 UTC (rev 822)
@@ -33,7 +33,7 @@
 	$(error You should run this script from $(TARGETDIR))
 endif
 
-update-website: backup svn-update news-archive website.html news-html news-rss \
+update-website: backup svn-update news-archive svnlog website.html news-html news-rss \
 	mirrors-list update-patches update-hints error-pages set-perms run-rsync
 
 news-archive: $(foreach y,$(YEARS),$(foreach i,$(PROJECTS),news/$(i)/$(y)))
@@ -76,13 +76,17 @@
 
 # Assemble news pages
 
-svnlog-%:
+svnlog:
 	mkdir -p logs
-	$(SVNLOG) $(SVN)/$* 2>/dev/null | $(SVN2HTML) --with-branchname > logs/$*.html.tmp
-	cmp -s logs/$*.html.tmp logs/$*.html || cp logs/$*.html.tmp logs/$*.html
-	rm logs/$*.html.tmp
+define gen_logs
+	$(SVNLOG) $(SVN)/$(1) 2>/dev/null | $(SVN2HTML) --with-branchname > logs/$(1).html.tmp
+	cmp -s logs/$(1).html.tmp logs/$(1).html || cp logs/$(1).html.tmp logs/$(1).html
+	rm logs/$(1).html.tmp
+endef
+$(foreach r,www patches LFS BLFS hints,$(eval $(call gen_logs,$(r))))
 
-logs/%.html: svnlog-%
+logs/%.html:
+	touch $@
 
 website.html: $(TEMPLATES)/website-*.html logs/www.html
 	cat $(TEMPLATES)/website-top.html \
@@ -95,16 +99,16 @@
 	$(TEMPLATES)/patches/news-bottom.html > patches/news.html
 
 lfs/news.html: $(TEMPLATES)/lfs/news-*.html news-$(YEAR).txt lfs/news-$(YEAR).txt logs/LFS.html
-	cp $(TEMPLATES)/lfs/news-top.html lfs/news.html; \
-	$(MANAGE_NEWS) -i lfs/news-$(YEAR).txt >> lfs/news.html; \
-	$(MANAGE_NEWS) -i news-$(YEAR).txt >> lfs/news.html; \
+	cat $(TEMPLATES)/lfs/news-top.html > lfs/news.html
+	$(MANAGE_NEWS) -i lfs/news-$(YEAR).txt >> lfs/news.html
+	$(MANAGE_NEWS) -i news-$(YEAR).txt >> lfs/news.html
 	cat logs/LFS.html \
 	$(TEMPLATES)/lfs/news-bottom.html >> lfs/news.html
 
 blfs/news.html: $(TEMPLATES)/blfs/news-*.html news-$(YEAR).txt blfs/news-$(YEAR).txt logs/BLFS.html
-	cp $(TEMPLATES)/blfs/news-top.html blfs/news.html; \
-	$(MANAGE_NEWS) -i blfs/news-$(YEAR).txt >> blfs/news.html; \
-	$(MANAGE_NEWS) -i news-$(YEAR).txt >> blfs/news.html; \
+	cat $(TEMPLATES)/blfs/news-top.html > blfs/news.html
+	$(MANAGE_NEWS) -i blfs/news-$(YEAR).txt >> blfs/news.html
+	$(MANAGE_NEWS) -i news-$(YEAR).txt >> blfs/news.html
 	cat logs/BLFS.html \
 	$(TEMPLATES)/blfs/news-bottom.html >> blfs/news.html
 
@@ -114,10 +118,10 @@
 	$(TEMPLATES)/hints/news-bottom.html > hints/news.html
 
 alfs/news.html: $(TEMPLATES)/alfs/news-*.html news-$(YEAR).txt alfs/news-$(YEAR).txt
-	cp $(TEMPLATES)/alfs/news-top.html alfs/news.html; \
-	$(MANAGE_NEWS) -i alfs/news-$(YEAR).txt >> alfs/news.html; \
-	$(MANAGE_NEWS) -i news-$(YEAR).txt >> alfs/news.html; \
-	$(SVN2HTML2) --project ALFS --with-branchname >> alfs/news.html; \
+	cat $(TEMPLATES)/alfs/news-top.html > alfs/news.html
+	$(MANAGE_NEWS) -i alfs/news-$(YEAR).txt >> alfs/news.html
+	$(MANAGE_NEWS) -i news-$(YEAR).txt >> alfs/news.html
+	$(SVN2HTML2) --project ALFS --with-branchname >> alfs/news.html
 	cat $(TEMPLATES)/alfs/news-bottom.html >> alfs/news.html
 
 # Generate RSS feeds




More information about the website mailing list