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

release-notes: necessary changes/fixes to the build system



Hi.

I just tested the inclusion of the release notes into the Debian
websites for the sarge release. I discovered some problems in the
current build system and prepared a patch for that. (Unless otherwise
noted, I'm talking about the MAIN branch of the release notes).

The problems were:

1) Since the resulting files don't have arch specific names you have to
always do "make clean" before calling "make publish" (if nothing has
changed in the source). I solved this by letting the target "publish"
depend on "clean". One could also change the Makefile so that the
resulting files have arch specific names, but this one will do for now.
[this change should also be applied to the woody branch]

2) I removed all languages from the list that are currently not building
since they aren't updated to the sarge version yet.

3) The files should be installed into releases/<release>/ without an
additional /release-notes appended, I removed that from the install
path.
[this change should also be applied to the woody branch]

4) All the subdirectories contain an exact copy of the Makefile in the English
subdirectory. I moved that file to Makefile.common and included it from
the other ones.

Don't hesitate to ask if you have any questions.

Gruesse,
-- 
Frank Lichtenheld <djpig@debian.org>
www: http://www.djpig.de/
diff -Naur --exclude release-notes.patch /home/aba/for-djpig/ddp/manuals.sgml/release-notes/Makefile ./Makefile
--- /home/aba/for-djpig/ddp/manuals.sgml/release-notes/Makefile	Sun Oct 31 16:15:28 2004
+++ ./Makefile	Fri Nov 26 19:13:37 2004
@@ -12,7 +12,7 @@
   makedir	:= mkdir -p -m 0755
 endif
 
-LANGUAGES := ca cs da de en es fr it ja pt zh_TW nl
+LANGUAGES := en fr nl
 
 LANGUAGES-publish := $(addsuffix -publish,$(LANGUAGES))
 LANGUAGES-clean := $(addsuffix -clean,$(LANGUAGES))
@@ -25,21 +25,21 @@
 $(LANGUAGES):
 	$(MAKE) -C $@
 
-publish:
+publish: clean
 ifneq "$(PUBLISHDIR)" ""
 	set -ex; \
 	for arch in $(arches); do \
 	  $(MAKE) architecture=$$arch; \
-	  $(makedir) $(PUBLISHDIR)/release-notes/$$arch/release-notes; \
+	  $(makedir) $(PUBLISHDIR)/$$arch/release-notes; \
 	  for lang in $(LANGUAGES); do \
-            $(install_file) $$lang/release-notes.$$lang.html/* $(PUBLISHDIR)/release-notes/$$arch/release-notes/; \
-            $(install_file) $$lang/release-notes.$$lang.txt $(PUBLISHDIR)/release-notes/$$arch/; \
-            if [ "$$lang" != "ja" -a "$$lang" != "zh_TW" ]; then \
-              $(install_file) $$lang/release-notes.$$lang.pdf $(PUBLISHDIR)/release-notes/$$arch/; \
-              $(install_file) $$lang/release-notes.$$lang.ps $(PUBLISHDIR)/release-notes/$$arch/; \
+            $(install_file) $$lang/release-notes.$$lang.html/* $(PUBLISHDIR)/$$arch/release-notes/; \
+            $(install_file) $$lang/release-notes.$$lang.txt $(PUBLISHDIR)/$$arch/; \
+            if [ "$$lang" != "ja" ] && [ "$$lang" != "zh_TW" ]; then \
+              $(install_file) $$lang/release-notes.$$lang.pdf $(PUBLISHDIR)/$$arch/; \
+              $(install_file) $$lang/release-notes.$$lang.ps $(PUBLISHDIR)/$$arch/; \
             fi; \
 	  done; \
-          for i in $(PUBLISHDIR)/release-notes/$$arch/release-notes/*.en.html; do \
+          for i in $(PUBLISHDIR)/$$arch/release-notes/*.en.html; do \
             ln -sf $$i $${i%.en.html}.html; \
           done; \
 	done
diff -Naur --exclude release-notes.patch /home/aba/for-djpig/ddp/manuals.sgml/release-notes/Makefile.common ./Makefile.common
--- /home/aba/for-djpig/ddp/manuals.sgml/release-notes/Makefile.common	Wed Dec 31 17:00:00 1969
+++ ./Makefile.common	Sat Nov 27 03:22:28 2004
@@ -0,0 +1,69 @@
+#
+# Makefile for the release notes, language subdirectory
+#
+
+manual := release-notes
+release := sarge
+
+currentlang := $(notdir $(CURDIR))
+currentlangcn := $(subst _,-,$(shell echo $(currentlang) | tr A-Z a-z))
+
+# this can and will be overriden by a higher level makefile
+PUBLISHDIR := /org/www.debian.org/www/releases/$(release)
+
+sources := $(wildcard *.sgml) ../$(manual).ent ../dynamic.ent
+
+export LANG=C
+# stupid debiandoc stuff uses strings in another language otherwise
+
+all: html text ps pdf
+
+publish: all
+	test -d $(PUBLISHDIR)/$(manual) || install -d -m 755 $(PUBLISHDIR)/$(manual)
+	rm -f $(PUBLISHDIR)/$(manual)/*.$(currentlangcn).html
+	install -p -m 644 $(manual).$(currentlang).html/*.html $(PUBLISHDIR)/$(manual)
+	install -p -m 644 $(manual)*.txt $(manual)*.ps $(manual)*.pdf $(PUBLISHDIR)/$(manual)
+
+validate:
+	nsgmls -ges -wall $(manual).sgml
+
+html: $(manual).$(currentlang).html/index.$(currentlangcn).html
+$(manual).$(currentlang).html/index.$(currentlangcn).html: $(sources)
+	debiandoc2html -c -l $(currentlang) $<
+
+text: $(manual).$(currentlang).txt
+$(manual).$(currentlang).txt: $(sources)
+	debiandoc2text -l $(currentlang) $<
+
+$(manual).$(currentlang).info: $(sources)
+	debiandoc2info -l $(currentlang) $<
+# TODO: rename to .$(currentlang).info?
+
+$(manual).$(currentlang).ps $(manual).$(currentlang).dvi $(manual).$(currentlang).pdf: \
+  $(manual).$(currentlang).%: $(sources)
+	debiandoc2latex$* -l $(currentlang) $<
+
+ps dvi pdf info: %: $(manual).$(currentlang).%
+
+# generate entities which are dynamically defined by the settings of this
+# build run
+../dynamic_$(architecture).ent:
+ifeq "$(architecture)" ""
+	@echo architecture variable must be set
+	exit 1
+endif
+	: > $@			# clear the file
+	echo "<!entity architecture     \"$(architecture)\">" >> $@
+	echo "<!entity % $(architecture) \"INCLUDE\">" >> $@
+
+.PHONY: dynamic.ent
+../dynamic.ent: ../dynamic_$(architecture).ent
+	rm -f $@
+	ln -s $(notdir $<) $@
+
+clean distclean:
+	rm -rf $(manual)*.$(currentlang).html
+	rm -f $(manual)*.{txt,ps,dvi,pdf,info*,aux,log,man,tex,toc,sasp*,tpt}
+	rm -f *~ .*~ core tsa*
+
+.PHONY: all publish clean distclean validate
diff -Naur --exclude release-notes.patch /home/aba/for-djpig/ddp/manuals.sgml/release-notes/en/Makefile ./en/Makefile
--- /home/aba/for-djpig/ddp/manuals.sgml/release-notes/en/Makefile	Fri Jan  3 17:37:57 2003
+++ ./en/Makefile	Fri Nov 26 18:27:39 2004
@@ -1,68 +1 @@
-#
-# Makefile for the release notes, language subdirectory
-#
-
-manual := release-notes
-
-currentlang := $(notdir $(CURDIR))
-currentlangcn := $(subst _,-,$(shell echo $(currentlang) | tr A-Z a-z))
-
-# this can and will be overriden by a higher level makefile
-PUBLISHDIR := /org/www.debian.org/www/doc/manuals
-
-sources := $(wildcard *.sgml) ../$(manual).ent ../dynamic.ent
-
-export LANG=C
-# stupid debiandoc stuff uses strings in another language otherwise
-
-all: html text ps pdf
-
-publish: all
-	test -d $(PUBLISHDIR)/$(manual) || install -d -m 755 $(PUBLISHDIR)/$(manual)
-	rm -f $(PUBLISHDIR)/$(manual)/*.$(currentlangcn).html
-	install -p -m 644 $(manual).$(currentlang).html/*.html $(PUBLISHDIR)/$(manual)
-	install -p -m 644 $(manual)*.txt $(manual)*.ps $(manual)*.pdf $(PUBLISHDIR)/$(manual)
-
-validate:
-	nsgmls -ges -wall $(manual).sgml
-
-html: $(manual).$(currentlang).html/index.$(currentlangcn).html
-$(manual).$(currentlang).html/index.$(currentlangcn).html: $(sources)
-	debiandoc2html -c -l $(currentlang) $<
-
-text: $(manual).$(currentlang).txt
-$(manual).$(currentlang).txt: $(sources)
-	debiandoc2text -l $(currentlang) $<
-
-$(manual).$(currentlang).info: $(sources)
-	debiandoc2info -l $(currentlang) $<
-# TODO: rename to .$(currentlang).info?
-
-$(manual).$(currentlang).ps $(manual).$(currentlang).dvi $(manual).$(currentlang).pdf: \
-  $(manual).$(currentlang).%: $(sources)
-	debiandoc2latex$* -l $(currentlang) $<
-
-ps dvi pdf info: %: $(manual).$(currentlang).%
-
-# generate entities which are dynamically defined by the settings of this
-# build run
-../dynamic_$(architecture).ent:
-ifeq "$(architecture)" ""
-	@echo architecture variable must be set
-	exit 1
-endif
-	: > $@			# clear the file
-	echo "<!entity architecture     \"$(architecture)\">" >> $@
-	echo "<!entity % $(architecture) \"INCLUDE\">" >> $@
-
-.PHONY: dynamic.ent
-../dynamic.ent: ../dynamic_$(architecture).ent
-	rm -f $@
-	ln -s $(notdir $<) $@
-
-clean distclean:
-	rm -rf $(manual)*.$(currentlang).html
-	rm -f $(manual)*.{txt,ps,dvi,pdf,info*,aux,log,man,tex,toc,sasp*}
-	rm -f *~ .*~ core tsa*
-
-.PHONY: all publish clean distclean validate
+include $(CURDIR)/../Makefile.common
diff -Naur --exclude release-notes.patch /home/aba/for-djpig/ddp/manuals.sgml/release-notes/fr/Makefile ./fr/Makefile
--- /home/aba/for-djpig/ddp/manuals.sgml/release-notes/fr/Makefile	Fri Jan  3 17:37:57 2003
+++ ./fr/Makefile	Fri Nov 26 18:27:39 2004
@@ -1,68 +1 @@
-#
-# Makefile for the release notes, language subdirectory
-#
-
-manual := release-notes
-
-currentlang := $(notdir $(CURDIR))
-currentlangcn := $(subst _,-,$(shell echo $(currentlang) | tr A-Z a-z))
-
-# this can and will be overriden by a higher level makefile
-PUBLISHDIR := /org/www.debian.org/www/doc/manuals
-
-sources := $(wildcard *.sgml) ../$(manual).ent ../dynamic.ent
-
-export LANG=C
-# stupid debiandoc stuff uses strings in another language otherwise
-
-all: html text ps pdf
-
-publish: all
-	test -d $(PUBLISHDIR)/$(manual) || install -d -m 755 $(PUBLISHDIR)/$(manual)
-	rm -f $(PUBLISHDIR)/$(manual)/*.$(currentlangcn).html
-	install -p -m 644 $(manual).$(currentlang).html/*.html $(PUBLISHDIR)/$(manual)
-	install -p -m 644 $(manual)*.txt $(manual)*.ps $(manual)*.pdf $(PUBLISHDIR)/$(manual)
-
-validate:
-	nsgmls -ges -wall $(manual).sgml
-
-html: $(manual).$(currentlang).html/index.$(currentlangcn).html
-$(manual).$(currentlang).html/index.$(currentlangcn).html: $(sources)
-	debiandoc2html -c -l $(currentlang) $<
-
-text: $(manual).$(currentlang).txt
-$(manual).$(currentlang).txt: $(sources)
-	debiandoc2text -l $(currentlang) $<
-
-$(manual).$(currentlang).info: $(sources)
-	debiandoc2info -l $(currentlang) $<
-# TODO: rename to .$(currentlang).info?
-
-$(manual).$(currentlang).ps $(manual).$(currentlang).dvi $(manual).$(currentlang).pdf: \
-  $(manual).$(currentlang).%: $(sources)
-	debiandoc2latex$* -l $(currentlang) $<
-
-ps dvi pdf info: %: $(manual).$(currentlang).%
-
-# generate entities which are dynamically defined by the settings of this
-# build run
-../dynamic_$(architecture).ent:
-ifeq "$(architecture)" ""
-	@echo architecture variable must be set
-	exit 1
-endif
-	: > $@			# clear the file
-	echo "<!entity architecture     \"$(architecture)\">" >> $@
-	echo "<!entity % $(architecture) \"INCLUDE\">" >> $@
-
-.PHONY: dynamic.ent
-../dynamic.ent: ../dynamic_$(architecture).ent
-	rm -f $@
-	ln -s $(notdir $<) $@
-
-clean distclean:
-	rm -rf $(manual)*.$(currentlang).html
-	rm -f $(manual)*.{txt,ps,dvi,pdf,info*,aux,log,man,tex,toc,sasp*}
-	rm -f *~ .*~ core tsa*
-
-.PHONY: all publish clean distclean validate
+include $(CURDIR)/../Makefile.common
diff -Naur --exclude release-notes.patch /home/aba/for-djpig/ddp/manuals.sgml/release-notes/nl/Makefile ./nl/Makefile
--- /home/aba/for-djpig/ddp/manuals.sgml/release-notes/nl/Makefile	Sun Oct 31 16:15:29 2004
+++ ./nl/Makefile	Fri Nov 26 18:27:39 2004
@@ -1,68 +1 @@
-#
-# Makefile for the release notes, language subdirectory
-#
-
-manual := release-notes
-
-currentlang := $(notdir $(CURDIR))
-currentlangcn := $(subst _,-,$(shell echo $(currentlang) | tr A-Z a-z))
-
-# this can and will be overriden by a higher level makefile
-PUBLISHDIR := /org/www.debian.org/www/doc/manuals
-
-sources := $(wildcard *.sgml) ../$(manual).ent ../dynamic.ent
-
-export LANG=C
-# stupid debiandoc stuff uses strings in another language otherwise
-
-all: html text ps pdf
-
-publish: all
-	test -d $(PUBLISHDIR)/$(manual) || install -d -m 755 $(PUBLISHDIR)/$(manual)
-	rm -f $(PUBLISHDIR)/$(manual)/*.$(currentlangcn).html
-	install -p -m 644 $(manual).$(currentlang).html/*.html $(PUBLISHDIR)/$(manual)
-	install -p -m 644 $(manual)*.txt $(manual)*.ps $(manual)*.pdf $(PUBLISHDIR)/$(manual)
-
-validate:
-	nsgmls -ges -wall $(manual).sgml
-
-html: $(manual).$(currentlang).html/index.$(currentlangcn).html
-$(manual).$(currentlang).html/index.$(currentlangcn).html: $(sources)
-	debiandoc2html -c -l $(currentlang) $<
-
-text: $(manual).$(currentlang).txt
-$(manual).$(currentlang).txt: $(sources)
-	debiandoc2text -l $(currentlang) $<
-
-$(manual).$(currentlang).info: $(sources)
-	debiandoc2info -l $(currentlang) $<
-# TODO: rename to .$(currentlang).info?
-
-$(manual).$(currentlang).ps $(manual).$(currentlang).dvi $(manual).$(currentlang).pdf: \
-  $(manual).$(currentlang).%: $(sources)
-	debiandoc2latex$* -l $(currentlang) $<
-
-ps dvi pdf info: %: $(manual).$(currentlang).%
-
-# generate entities which are dynamically defined by the settings of this
-# build run
-../dynamic_$(architecture).ent:
-ifeq "$(architecture)" ""
-	@echo architecture variable must be set
-	exit 1
-endif
-	: > $@			# clear the file
-	echo "<!entity architecture     \"$(architecture)\">" >> $@
-	echo "<!entity % $(architecture) \"INCLUDE\">" >> $@
-
-.PHONY: dynamic.ent
-../dynamic.ent: ../dynamic_$(architecture).ent
-	rm -f $@
-	ln -s $(notdir $<) $@
-
-clean distclean:
-	rm -rf $(manual)*.$(currentlang).html
-	rm -f $(manual)*.{txt,ps,dvi,pdf,info*,aux,log,man,tex,toc,sasp*}
-	rm -f *~ .*~ core tsa*
-
-.PHONY: all publish clean distclean validate
+include $(CURDIR)/../Makefile.common

Reply to: