dpkg-buildpackage
+Documentation:
+
+make README
+
+Regenerates the README for all the "default" modules (include_modules,
+ skip_modules a.s.o can be used to alter the module list).
+
+make man
+
+Generates a manpage for all the modules that support it (.xml file in the
+ module directory).
+
Install:
make prefix=/usr/local install
# 2007-03-29 install-modules changed to use make -C modpath install (andrei)
# 2007-05-04 "if ! foo" not supported in standard sh, switched to
# "if foo; then :; else ... ; fi" (andrei)
+# 2008-06-23 added 2 new targets: README and man (re-generate the README
+# or manpages for all the modules) (andrei)
auto_gen=lex.yy.c cfg.tab.c #lexx, yacc etc
auto_gen_others=cfg.tab.h # auto generated, non-c
fi ; \
done
+.PHONY: modules-readme
+modules-readme: README
+
+.PHONY: README
+README:
+ -@for r in $(modules) "" ; do \
+ if [ -n "$$r" ]; then \
+ echo "" ; \
+ echo "" ; \
+ if $(MAKE) -C $$r README || [ ${err_fail} != 1 ] ; then \
+ :; \
+ else \
+ exit 1; \
+ fi ; \
+ fi ; \
+ done; true
+
+.PHONY: modules-man
+modules-man: man
+
+.PHONY: man
+man:
+ -@for r in $(modules) "" ; do \
+ if [ -n "$$r" ]; then \
+ echo "" ; \
+ echo "" ; \
+ if $(MAKE) -C $$r man || [ ${err_fail} != 1 ] ; then \
+ :; \
+ else \
+ exit 1; \
+ fi ; \
+ fi ; \
+ done; true
+
.PHONY: install
install: install-bin install-modules install-cfg \
install-doc install-man install-utils
# 2007-03-29 if a module depends on SER_LIBS, it will be rebuilt on install
# with the proper rpath; libraries will be automatically
# installed if needed (andrei)
+# 2008-06-23 added the README & man targets (andrei)
#
MOD_NAME=$(NAME:.so=)
$(MAKE) -C "$${lib}" install-if-newer ;\
done
+# README build rules
+ifneq (,$(wildcard doc/Makefile))
+#doc/Makefile present => we can generate README
+
+README: doc/*.xml
+ $(MAKE) -C doc $(MOD_NAME).txt
+ cp doc/$(MOD_NAME).txt $@
+
+else
+# do nothing
+
+README:
+endif
+
+#man page build rules
+ifneq (,$(wildcard $(MOD_NAME).xml))
+
+$(MOD_NAME).7: $(MOD_NAME).xml
+ docbook2x-man -s ../../doc/stylesheets/serdoc2man.xsl $<
+
+man: $(MOD_NAME).7
+
+else
+
+man:
+
+endif