summaryrefslogtreecommitdiff
path: root/doc/Makefrag.am
blob: 490ebf5c96afc3c099e1853808f62d68bf0df30f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# Makefile fragment for the documentation.

# Copyright (C) 2006, 2007, 2008 Free Software Foundation, Inc.

# 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, 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.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

#
# The GNU Mach Reference Manual.
#

info_TEXINFOS += \
	doc/mach.texi
mach_TEXINFOS = \
	doc/fdl.texi doc/gpl.texi
EXTRA_DIST += \
	$(mach_TEXINFOS)

#
# Web pages of the GNU Mach Reference Manual.
#

web = doc/web

# Prepare a checkout in `$(web)/' of the web pages of the GNU Mach Reference
# Manual, using the same account that was used for the source code.  Then
# install the potentially updated files into `$(web)/'.
.PHONY: $(web)
$(web):
	if test -d $@/CVS; then :; else		\
	  mkdir -p $@ $@/CVS &&			\
	  sed -e s%cvsroot%web%			\
	    < $(top_srcdir)/CVS/Root		\
	    > $@/CVS/Root &&			\
	  echo hurd/gnumach-doc			\
	    > $@/CVS/Repository &&		\
	  : > $@/CVS/Entries;			\
	fi
	cd $@/ &&				\
	cvs update
	$(MAKE) $(AM_MAKEFLAGS)			\
	  html					\
	  ps					\
	  pdf

# Update the files, if such a checkout exists.
html-local:
	if test -d $(web); then						\
	  ( cd $(web)/ &&						\
	    for f in *.html; do						\
	      if test -f ../../$(HTMLS)/"$$f"; then :; else		\
		echo "\`$$f' isn't anymore.  Removing." &&		\
		rm "$$f" &&						\
		cvs remove "$$f";					\
	      fi;							\
	    done ) &&							\
	  cp $(HTMLS)/*.html $(web)/ &&					\
	  cd $(web)/ &&							\
	  { cvs add *.html || :; };					\
	fi
ps-local:
	if test -d $(web); then						\
	  ( cd $(web)/ &&						\
	    for f in *.ps; do						\
	      case \ $(PSS)\  in					\
		\ doc/"$$f"\ ) :;;					\
		*) echo "\`$$f' isn't anymore.  Removing." &&		\
		   rm -f "$$f" "$$f".ps &&				\
		   cvs remove "$$f" "$$f".ps ;;				\
	      esac;							\
	    done ) &&							\
	  cp $(PSS) $(web)/ &&						\
	  cd $(web)/ &&							\
	  for f in *.ps; do						\
	    gzip -9 < "$$f" > "$$f".gz;					\
	  done &&							\
	  { cvs add *.ps *.ps.gz || :; };				\
	fi
pdf-local:
	if test -d $(web); then						\
	  ( cd $(web)/ &&						\
	    for f in *.pdf; do						\
	      case \ $(PDFS)\  in					\
		\ doc/"$$f"\ ) :;;					\
		*) echo "\`$$f' isn't anymore.  Removing." &&		\
		   rm "$$f" &&						\
		   cvs remove "$$f";;					\
	      esac;							\
	    done ) &&							\
	  cp $(PDFS) $(web)/ &&						\
	  cd $(web)/ &&							\
	  { cvs add *.pdf || :; };					\
	fi
# TODO.  There doesn't seem to be a hook or `-local' target suitable for this.
$(srcdir)/doc/version.texi: $(srcdir)/doc/stamp-vti
	@if test -d $(web); then :;					\
	elif grep 2> /dev/null						\
	       -q :ext: $(top_srcdir)/CVS/Root 2> /dev/null &&		\
	     grep 2> /dev/null 						\
	       -q ^Tgnumach-1-branch$$ $(top_srcdir)/CVS/Tag;		\
	then								\
	  echo "*** As it seems that you'd be allowed to check in the"	\
	    "possible resulting fixes, you may consider running"	\
	    " \`make $(web)' to get a checkout of the web pages of the"	\
	    "GNU Mach manual and have possible changes installed into"	\
	    "\`$(web)/', ready for checking them in in there." &&	\
	  sleep 2;							\
	fi