$FreeBSD$ --- Makefile.orig +++ Makefile @@ -10,6 +10,13 @@ TEXS = $(DOCS:.ndoc=.tex) PDFS = $(DOCS:.ndoc=.pdf) +CD = cd +ERLDOC = txt2tags +MKDIR = mkdir +MV = mv -vf +RM = rm -vf +SED = sed + ### Dependecy Search Paths VPATH = src:include:ebin:doc @@ -35,7 +42,11 @@ @$(RM) -R doc/man @$(RM) -R doc/pdf -doc: man html pdf +doc: dirs man html + +dirs: + @$(MKDIR) doc/man + @$(MKDIR) doc/html man: $(MANS) @$(MV) doc/man/$(APPNAME)_overview.3 doc/man/$(APPNAME).1 @@ -49,14 +60,14 @@ %.3: %.ndoc @$(CD) doc; $(SED) "s|%MODULES%|`echo $(MODS)`|g" ../$^ | \ $(SED) "s|%VSN%|$(VSN)|g" | $(SED) "s|%APPLICATION%|$(APPNAME)|g" | \ - $(ERLDOC) -i - -t man --no-toc --erl -o man/$@; $(CD) .. + $(ERLDOC) -i - -t man --no-toc -o man/$@; $(CD) .. %.html: %.ndoc @$(CD) doc; $(SED) "s|%MODULES%|`echo $(MODS)`|g" ../$^ | \ $(SED) "s|%VSN%|$(VSN)|g" | $(SED) "s|%APPLICATION%|$(APPNAME)|g" | \ - $(ERLDOC) -i - -t xhtml --erl -o html/$@; $(CD) .. + $(ERLDOC) -i - -t xhtml -o html/$@; $(CD) .. %.pdf: %.ndoc @$(CD) doc; $(SED) "s|%MODULES%|`echo $(MODS)`|g" ../$^ | \ $(SED) "s|%VSN%|$(VSN)|g" | $(SED) "s|%APPLICATION%|$(APPNAME)|g" | \ - $(ERLDOC) -i - -t pdf --no-toc --erl -o pdf/$@; $(CD) .. + $(ERLDOC) -i - -t pdf --no-toc -o pdf/$@; $(CD) ..