Files
asterisk/doc/tex/Makefile
Richard Mudgett 367a302e09 Merged revisions 170794 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r170794 | rmudgett | 2009-01-23 17:10:34 -0600 (Fri, 23 Jan 2009) | 1 line
  
  Fix asterisk.pdf generation if branch name has an underscore in it.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@170831 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-23 23:53:03 +00:00

47 lines
1.8 KiB
Makefile

include ../../makeopts
pdf: asterisk.pdf
asterisk.pdf: $(wildcard *.tex)
ifeq ($(findstring rubber,$(RUBBER)),)
@echo "**********************************************"
@echo "** You must install the \"rubber\" tool ***"
@echo "** to generate the Asterisk reference PDF. ***"
@echo "**********************************************"
else
@echo "**********************************************"
@echo "** The Asterisk reference PDF will now be ***"
@echo "** generated. When complete, it will be ***"
@echo "** located at asterisk.pdf. ***"
@echo "**********************************************"
ifneq ($(findstring kpsewhich,$(KPATHSEA)),)
ifeq ($(findstring fncychap.sty,$(shell find `$(KPATHSEA) --expand-braces='$${TEXMF}'| tr -d \! | sed 's/:/ /g'` -name fncychap.sty -print)),)
@echo
@echo "WARNING: The fncychap.sty document was not found"
@echo "On Ubuntu, install the texlive-latex-extra package."
@echo
@exit
endif
endif
@cp asterisk.tex asterisk.tex.orig
@sed -e 's/ASTERISKVERSION/$(shell echo $(ASTERISKVERSION) | sed -e 's/\//\\\//g' | sed -e 's/_/\\\\_/g')/' asterisk.tex > asterisk_local.tex
@mv asterisk_local.tex asterisk.tex
@$(RUBBER) --pdf asterisk.tex
@mv asterisk.tex.orig asterisk.tex
endif
html:
@echo "**********************************************"
@echo "** The Asterisk reference HTML will now be ***"
@echo "** generated. When complete, it will be ***"
@echo "** located in the asterisk/ directory. ***"
@echo "** Note that the latex2html tool is ***"
@echo "** required for this to work. ***"
@echo "**********************************************"
@cp asterisk.tex asterisk.tex.orig
@sed -e 's/ASTERISKVERSION/$(ASTERISKVERSION)/' asterisk.tex > asterisk_local.tex
@mv asterisk_local.tex asterisk.tex
@latex2html asterisk.tex
@mv asterisk.tex.orig asterisk.tex