Browse Source

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 19 years ago
parent
commit
cbd93cf416
2 changed files with 18 additions and 2 deletions
  1. 16 2
      Makefile
  2. 2 0
      Makefile.rules

+ 16 - 2
Makefile

@@ -11,7 +11,7 @@
 #              created by andrei
 #  2003-02-24  make install no longer overwrites ser.cfg  - patch provided
 #               by Maxim Sobolev   <[email protected]> and 
-#                  Tomas Björklund <[email protected]>
+#                  Tomas Björklund <[email protected]>
 #  2003-03-11  PREFIX & LOCALBASE must also be exported (andrei)
 #  2003-04-07  hacked to work with solaris install (andrei)
 #  2003-04-17  exclude modules overwritable from env. or cmd. line,
@@ -31,6 +31,7 @@
 #               referred in the man pages
 #  2006-02-14  added utils & install-utils (andrei)
 #  2006-03-15  added nodeb parameter for make tar (andrei)
+#  2006-09-29  added modules-doc as target and doc_format= as make option (greger)
 #
 
 auto_gen=lex.yy.c cfg.tab.c #lexx, yacc etc
@@ -47,6 +48,10 @@ skip_cfg_install?=
 #extra modules to exclude
 skip_modules?=
 
+# Set document format
+# Alternatives are txt, html, xhtml, and pdf (see Makefile.doc)
+doc_format?=html
+
 # if not set on the cmd. line or the env, exclude this modules:
 exclude_modules?= 			acc cpl ext extcmd radius_acc radius_auth vm\
 							group mangler auth_diameter \
@@ -188,7 +193,7 @@ utils:
 		fi ; \
 	done 
 
-	
+
 dbg: ser
 	gdb -command debug.gdb
 
@@ -261,6 +266,15 @@ sunpkg:
 	rm -rf tmp/ser
 	rm -rf tmp/ser_sun_pkg
 
+.PHONY: modules-doc
+modules-doc:
+	-@for r in $(modules) "" ; do \
+		if [ -n "$$r" ]; then \
+			echo  "" ; \
+			echo  "" ; \
+			$(MAKE) -C $$r/doc $(doc_format) ; \
+		fi ; \
+	done 
 
 .PHONY: install
 install: all mk-install-dirs install-cfg install-bin install-modules \

+ 2 - 0
Makefile.rules

@@ -44,6 +44,7 @@ clean:
 		if [ -d "$$r" ]; then \
 			echo "module $$r" ; \
 			$(MAKE) -C $$r clean ; \
+		        $(MAKE) -C $$r/doc clean ; \
 		fi ; \
 	done 
 	@if [ -n "$(modules)" ]; then \
@@ -62,6 +63,7 @@ proper realclean distclean: clean
 	-@for r in $(modules) "" ; do \
 		if [ -d "$$r" ]; then \
 			 $(MAKE) -C $$r proper ; \
+		        $(MAKE) -C $$r/doc proper ; \
 		fi ; \
 	done 
 	@if [ -n "$(modules)" ]; then \