Browse code

Added new target for makefile: modules-doc. Can be used together with include_modules and exclude_modules to create doc files in the supported format. Added new option to make: doc_format=format, where formats can be txt, html, xhtml, or pdf. Default format is html. Updated proper and clean targets to also include module doc dirs. Example: make exclude_modules="something" doc_format="txt" modules-doc

Greger V. Teigre authored on 29/09/2006 07:52:24
Showing 2 changed files
... ...
@@ -11,7 +11,7 @@
11 11
 #              created by andrei
12 12
 #  2003-02-24  make install no longer overwrites ser.cfg  - patch provided
13 13
 #               by Maxim Sobolev   <sobomax@FreeBSD.org> and 
14
-#                  Tomas Bj�rklund <tomas@webservices.se>
14
+#                  Tomas Björklund <tomas@webservices.se>
15 15
 #  2003-03-11  PREFIX & LOCALBASE must also be exported (andrei)
16 16
 #  2003-04-07  hacked to work with solaris install (andrei)
17 17
 #  2003-04-17  exclude modules overwritable from env. or cmd. line,
... ...
@@ -31,6 +31,7 @@
31 31
 #               referred in the man pages
32 32
 #  2006-02-14  added utils & install-utils (andrei)
33 33
 #  2006-03-15  added nodeb parameter for make tar (andrei)
34
+#  2006-09-29  added modules-doc as target and doc_format= as make option (greger)
34 35
 #
35 36
 
36 37
 auto_gen=lex.yy.c cfg.tab.c #lexx, yacc etc
... ...
@@ -47,6 +48,10 @@ skip_cfg_install?=
47 47
 #extra modules to exclude
48 48
 skip_modules?=
49 49
 
50
+# Set document format
51
+# Alternatives are txt, html, xhtml, and pdf (see Makefile.doc)
52
+doc_format?=html
53
+
50 54
 # if not set on the cmd. line or the env, exclude this modules:
51 55
 exclude_modules?= 			acc cpl ext extcmd radius_acc radius_auth vm\
52 56
 							group mangler auth_diameter \
... ...
@@ -188,7 +193,7 @@ utils:
188 188
 		fi ; \
189 189
 	done 
190 190
 
191
-	
191
+
192 192
 dbg: ser
193 193
 	gdb -command debug.gdb
194 194
 
... ...
@@ -261,6 +266,15 @@ sunpkg:
261 261
 	rm -rf tmp/ser
262 262
 	rm -rf tmp/ser_sun_pkg
263 263
 
264
+.PHONY: modules-doc
265
+modules-doc:
266
+	-@for r in $(modules) "" ; do \
267
+		if [ -n "$$r" ]; then \
268
+			echo  "" ; \
269
+			echo  "" ; \
270
+			$(MAKE) -C $$r/doc $(doc_format) ; \
271
+		fi ; \
272
+	done 
264 273
 
265 274
 .PHONY: install
266 275
 install: all mk-install-dirs install-cfg install-bin install-modules \
... ...
@@ -44,6 +44,7 @@ clean:
44 44
 		if [ -d "$$r" ]; then \
45 45
 			echo "module $$r" ; \
46 46
 			$(MAKE) -C $$r clean ; \
47
+		        $(MAKE) -C $$r/doc clean ; \
47 48
 		fi ; \
48 49
 	done 
49 50
 	@if [ -n "$(modules)" ]; then \
... ...
@@ -62,6 +63,7 @@ proper realclean distclean: clean
62 62
 	-@for r in $(modules) "" ; do \
63 63
 		if [ -d "$$r" ]; then \
64 64
 			 $(MAKE) -C $$r proper ; \
65
+		        $(MAKE) -C $$r/doc proper ; \
65 66
 		fi ; \
66 67
 	done 
67 68
 	@if [ -n "$(modules)" ]; then \