Просмотр исходного кода

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

Christoph Berg 21 лет назад
Родитель
Сommit
e8cb73661b
3 измененных файлов с 16 добавлено и 4 удалено
  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
 # Bloated Makefile to make new releases of pisg
 
 
+all: release
+
 # Ugly hack to get the version number from Pisg.pm
 # 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)
 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/winbot.pm \
 		 $(MODULESDIR)/Pisg/Parser/Format/zcbot.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 -p newrelease
 
 
 	mkdir $(DIRNAME)
 	mkdir $(DIRNAME)
@@ -106,7 +114,6 @@ release:
 	mkdir $(DIRNAME)/gfx
 	mkdir $(DIRNAME)/gfx
 	cp $(GFX) $(DIRNAME)/gfx
 	cp $(GFX) $(DIRNAME)/gfx
 
 
-	cd docs && make
 	mkdir $(DIRNAME)/docs
 	mkdir $(DIRNAME)/docs
 	cp -r $(DOCS) $(DIRNAME)/docs
 	cp -r $(DOCS) $(DIRNAME)/docs
 
 
@@ -133,7 +140,10 @@ release:
 	zip -r pisg $(DIRNAME)
 	zip -r pisg $(DIRNAME)
 	mv pisg.zip newrelease/$(ZIPFILE)
 	mv pisg.zip newrelease/$(ZIPFILE)
 	mv $(DIRNAME) newrelease
 	mv $(DIRNAME) newrelease
+
 clean:
 clean:
 	cd docs && make clean
 	cd docs && make clean
 	rm -rf newrelease/
 	rm -rf newrelease/
 	rm -rf $(DIRNAME)
 	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.
    * Make "most used words" case-insensitive.
    * Applied patch by Hanno Hecker to keep only the last 50 quotes for each
    * 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!).
      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
 pisg (0.63) - Wed Jan, 12th 2005
    Morten:
    Morten:

+ 1 - 1
docs/pisg-doc.xml

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