Răsfoiți Sursa

Add version number to documentation title (and let the release Makefile update it).

Christoph Berg 21 ani în urmă
părinte
comite
e8cb73661b
3 a modificat fișierele cu 16 adăugiri și 4 ștergeri
  1. 13 3
      Makefile
  2. 2 0
      docs/Changelog
  3. 1 1
      docs/pisg-doc.xml

+ 13 - 3
Makefile

@@ -1,7 +1,9 @@
 # Bloated Makefile to make new releases of pisg
 
+all: release
+
 # Ugly hack to get the version number from Pisg.pm
-VERSION = `grep "version =>" modules/Pisg.pm | sed 's/.*\"\(.*\)\".*/\1/'`
+VERSION = $(shell grep "version =>" modules/Pisg.pm | sed 's/.*\"\(.*\)\".*/\1/')
 
 DIRNAME = pisg-$(VERSION)
 
@@ -94,7 +96,13 @@ FORMAT_MODULES = $(MODULESDIR)/Pisg/Parser/Format/axur.pm \
 		 $(MODULESDIR)/Pisg/Parser/Format/winbot.pm \
 		 $(MODULESDIR)/Pisg/Parser/Format/zcbot.pm \
 
-release:
+doc-version:
+	perl -i -pe 's/(<title>pisg ).*(documentation<\/title>)/$${1}$(VERSION) $${2}/' docs/pisg-doc.xml
+
+docs:
+	$(MAKE) -C docs
+
+release: doc-version docs
 	mkdir -p newrelease
 
 	mkdir $(DIRNAME)
@@ -106,7 +114,6 @@ release:
 	mkdir $(DIRNAME)/gfx
 	cp $(GFX) $(DIRNAME)/gfx
 
-	cd docs && make
 	mkdir $(DIRNAME)/docs
 	cp -r $(DOCS) $(DIRNAME)/docs
 
@@ -133,7 +140,10 @@ release:
 	zip -r pisg $(DIRNAME)
 	mv pisg.zip newrelease/$(ZIPFILE)
 	mv $(DIRNAME) newrelease
+
 clean:
 	cd docs && make clean
 	rm -rf newrelease/
 	rm -rf $(DIRNAME)
+
+.PHONY: all release doc-version docs clean

+ 2 - 0
docs/Changelog

@@ -17,6 +17,8 @@ pisg (0.64) - ??
    * Make "most used words" case-insensitive.
    * Applied patch by Hanno Hecker to keep only the last 50 quotes for each
      nick while parsing. Saves memory and is probably saner anyway (thanks!).
+   * Add version number to documentation title (and let the release Makefile
+     update it).
 
 pisg (0.63) - Wed Jan, 12th 2005
    Morten:

+ 1 - 1
docs/pisg-doc.xml

@@ -5,7 +5,7 @@
 
 <book id="pisg-documentation">
   <bookinfo>
-    <title>pisg documentation</title>
+    <title>pisg 0.63 documentation</title>
     <subtitle>How to install and configure pisg</subtitle>
   </bookinfo>
   <toc></toc>