aboutsummaryrefslogtreecommitdiffstats
path: root/docbook
diff options
context:
space:
mode:
authorUlf Lamping <ulf.lamping@web.de>2006-09-07 20:01:07 +0000
committerUlf Lamping <ulf.lamping@web.de>2006-09-07 20:01:07 +0000
commit13a3dd5a1c0d4801f76e202b8dbbf843f0530b8b (patch)
tree94eaa1a8acccdbebc4bccd8dd97247551b135cd0 /docbook
parentc704e3414f5fd5e1cc8c1a403f94c2417728b246 (diff)
fix bug #842: "make" now won't try to rebuild again if nothing changed since the last make call.
Other minor dependency fixes. I didn't found a way to implement the SVN version check using make, so using a new shell script instead ... svn path=/trunk/; revision=19173
Diffstat (limited to 'docbook')
-rw-r--r--docbook/Makefile45
-rw-r--r--docbook/check_svn_version.sh38
2 files changed, 67 insertions, 16 deletions
diff --git a/docbook/Makefile b/docbook/Makefile
index 364b17e26c..91ae30fbe2 100644
--- a/docbook/Makefile
+++ b/docbook/Makefile
@@ -67,7 +67,8 @@ WSUG_FILES = \
wsug_src/WSUG_chapter_use.xml \
wsug_src/WSUG_chapter_work.xml \
wsug_src/WSUG_meta_info.xml \
- wsug_src/WSUG_preface.xml
+ wsug_src/WSUG_preface.xml \
+ ws.css
WSUG_GRAPHICS = \
wsug_graphics/ws-analyze-menu.png \
@@ -187,7 +188,8 @@ WSDG_FILES = \
wsdg_src/WSDG_chapter_userinterface.xml \
wsdg_src/WSDG_chapter_works.xml \
wsdg_src/WSDG_meta_info.xml \
- wsdg_src/WSDG_preface.xml
+ wsdg_src/WSDG_preface.xml \
+ ws.css
WSDG_GRAPHICS = \
wsdg_graphics/ws-capture-sync.dia \
@@ -205,6 +207,7 @@ WSDG_GRAPHICS = \
WSUG_SOURCE = \
user-guide.xml \
svn_version.xml \
+ Makefile \
$(WSUG_FILES) \
$(WSUG_GRAPHICS)
@@ -212,12 +215,14 @@ WSUG_SOURCE = \
WSDG_SOURCE = \
developer-guide.xml \
svn_version.xml \
+ Makefile \
$(WSDG_FILES) \
$(WSDG_GRAPHICS)
RELEASE_NOTES_SOURCE = \
release-notes.xml \
- svn_version.xml
+ svn_version.xml \
+ Makefile
CLEANFILES = \
*.chm \
@@ -243,7 +248,7 @@ CLEANFILES = \
svn_version.xml \
-all: wsug.validated wsdg.validated release_notes.validated wsug wsdg release_notes
+all: svn_version_check wsug.validated wsdg.validated release_notes.validated wsug wsdg release_notes
clean:
rm -rf $(CLEANFILES)
@@ -256,10 +261,10 @@ clean:
# FORCE is the portable version of .PHONY
FORCE:
-svn_version.xml: FORCE
- echo -n '<!ENTITY SvnVersion "' > svn_version.xml
- svnversion -n . >> svn_version.xml
- echo '">' >> svn_version.xml
+svn_version_check: FORCE
+ @ check_svn_version.sh
+
+svn_version.xml: svn_version_check
wsug: wsug_html_chunked user-guide.html user-guide-a4.pdf user-guide-us.pdf user-guide.chm
@@ -271,17 +276,21 @@ wsug.validated: $(WSUG_SOURCE)
touch $@
# create html single page file
-user-guide.html: $(WSUG_SOURCE)
+user-guide.html: wsug_html/user-guide.html
+
+wsug_html/user-guide.html: $(WSUG_SOURCE)
@ echo --- WSUG - HTML SINGLE PAGE ---
mkdir -p wsug_html/wsug_graphics/toolbar
cp wsug_graphics/*.* wsug_html/wsug_graphics
cp wsug_graphics/toolbar/* wsug_html/wsug_graphics/toolbar
cp ws.css wsug_html
- $(XSLTPROC) --stringparam base.dir wsug_html/ --stringparam use.id.as.filename 1 --stringparam admon.graphics 1 --stringparam admon.graphics.path wsug_graphics/ --stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 --stringparam html.stylesheet ws.css --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< > wsug_html/$@
+ $(XSLTPROC) --stringparam base.dir wsug_html/ --stringparam use.id.as.filename 1 --stringparam admon.graphics 1 --stringparam admon.graphics.path wsug_graphics/ --stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 --stringparam html.stylesheet ws.css --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< > $@
-chmod -R og+rX wsug_html
-
+
# create html chunked page files
-wsug_html_chunked: $(WSUG_SOURCE)
+wsug_html_chunked: wsug_html_chunked/index.html
+
+wsug_html_chunked/index.html: $(WSUG_SOURCE)
@ echo --- WSUG - HTML CHUNKED ---
mkdir -p wsug_html_chunked/wsug_graphics/toolbar
cp wsug_graphics/*.* wsug_html_chunked/wsug_graphics
@@ -330,16 +339,20 @@ wsdg.validated: $(WSDG_SOURCE)
touch $@
# create html single page file
-developer-guide.html: $(WSDG_SOURCE)
+developer-guide.html: wsdg_html/developer-guide.html
+
+wsdg_html/developer-guide.html: $(WSDG_SOURCE)
@ echo --- WSDG - HTML SINGLE PAGE ---
mkdir -p wsdg_html/wsdg_graphics
cp wsdg_graphics/* wsdg_html/wsdg_graphics
cp ws.css wsdg_html
- $(XSLTPROC) --stringparam base.dir wsdg_html/ --stringparam use.id.as.filename 1 --stringparam admon.graphics 1 --stringparam admon.graphics.path wsdg_graphics/ --stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 --stringparam html.stylesheet ws.css --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< > wsdg_html/$@
+ $(XSLTPROC) --stringparam base.dir wsdg_html/ --stringparam use.id.as.filename 1 --stringparam admon.graphics 1 --stringparam admon.graphics.path wsdg_graphics/ --stringparam section.autolabel 1 --stringparam section.label.includes.component.label 1 --stringparam html.stylesheet ws.css --nonet http://docbook.sourceforge.net/release/xsl/current/html/docbook.xsl $< > $@
-chmod -R og+rX wsdg_html
-
+
# create html chunked page files
-wsdg_html_chunked: $(WSDG_SOURCE)
+wsdg_html_chunked: wsdg_html_chunked/index.html
+
+wsdg_html_chunked/index.html: $(WSDG_SOURCE)
@ echo --- WSDG - HTML CHUNKED ---
mkdir -p wsdg_html_chunked
mkdir -p wsdg_html_chunked/wsdg_graphics
diff --git a/docbook/check_svn_version.sh b/docbook/check_svn_version.sh
new file mode 100644
index 0000000000..1c7648e4ea
--- /dev/null
+++ b/docbook/check_svn_version.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+#
+# Check for SVN version
+#
+# $Id$
+#
+# Wireshark - Network traffic analyzer
+# By Gerald Combs <gerald@wireshark.org>
+# Copyright 2005 Ulf Lamping
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+
+echo -n '<!ENTITY SvnVersion "' > svn_version_tmp.xml
+svnversion -n . >> svn_version_tmp.xml
+echo '">' >> svn_version_tmp.xml
+
+# /dev/null buries the output of the "cmp" command.
+diff svn_version.xml svn_version_tmp.xml &> /dev/null
+
+if [ $? -ne 0 ]
+then
+ cp svn_version_tmp.xml svn_version.xml
+fi
+
+rm svn_version_tmp.xml