Source

wxPython / contrib / gizmos / wxCode / src / gizmos / makedocs.vc

Full commit
#
# File:         makefile.vc
WXDIR=$(WXWIN)

NAME=gizmos
WAITFLAG=/WAIT
DOCSOURCEDIR=$(WXDIR)\contrib\docs\latex\$(NAME)
DOCDIR=$(WXDIR)\docs
THISDIR = $(WXDIR)\contrib\src\$(NAME)
DOCSOURCES=$(DOCSOURCEDIR)\manual.tex \
 $(DOCSOURCEDIR)\classes.tex $(DOCSOURCEDIR)\topics.tex

alldocs: mkdirs html htmlhelp htb hlp pdfrtf
html: touchmanual $(DOCDIR)\html\$(NAME)\$(NAME).htm
htmlhelp: touchmanual $(DOCDIR)\htmlhelp\$(NAME).chm
htb:	$(DOCDIR)\htb\$(NAME).htb
hlp: touchmanual $(DOCDIR)\winhelp\$(NAME).hlp
pdfrtf: $(DOCDIR)\pdf\$(NAME).rtf
ps: $(DOCDIR)\ps\$(NAME).ps

touchmanual:
	touch $(DOCSOURCEDIR)\manual.tex

$(DOCDIR)\winhelp\$(NAME).hlp:         $(DOCSOURCEDIR)\$(NAME).rtf $(DOCSOURCEDIR)\$(NAME).hpj
        cd $(DOCSOURCEDIR)
        -erase $(NAME).ph
        hcw /c /e $(NAME)
        move $(NAME).hlp $(DOCDIR)\winhelp\$(NAME).hlp
        move $(NAME).cnt $(DOCDIR)\winhelp\$(NAME).cnt
        cd $(THISDIR)

$(DOCSOURCEDIR)\$(NAME).hpj:
	echo [OPTIONS] > $(DOCSOURCEDIR)\$(NAME).hpj
	echo BMROOT=$(WXDIR)\contrib\docs\latex\$(NAME) >> $(DOCSOURCEDIR)\$(NAME).hpj
	echo TITLE=OGL Manual >> $(DOCSOURCEDIR)\$(NAME).hpj
	echo CONTENTS=Contents >> $(DOCSOURCEDIR)\$(NAME).hpj
	echo COMPRESS=HIGH >> $(DOCSOURCEDIR)\$(NAME).hpj
	echo "" >> $(DOCSOURCEDIR)\$(NAME).hpj
	echo [FILES] >> $(DOCSOURCEDIR)\$(NAME).hpj
	echo $(NAME).rtf >> $(DOCSOURCEDIR)\$(NAME).hpj
	echo "" >> $(DOCSOURCEDIR)\$(NAME).hpj
	echo [CONFIG] >> $(DOCSOURCEDIR)\$(NAME).hpj
	echo CreateButton("Up", "&Up", "JumpId(`$(NAME).hlp', `Contents')") >> $(DOCSOURCEDIR)\$(NAME).hpj
	echo BrowseButtons() >> $(DOCSOURCEDIR)\$(NAME).hpj
	echo "" >> $(DOCSOURCEDIR)\$(NAME).hpj
	echo [MAP] >> $(DOCSOURCEDIR)\$(NAME).hpj
	echo "" >> $(DOCSOURCEDIR)\$(NAME).hpj
	echo [BITMAPS] >> $(DOCSOURCEDIR)\$(NAME).hpj

$(DOCSOURCEDIR)\$(NAME).rtf: $(DOCSOURCES)
        cd $(DOCSOURCEDIR)
        -start $(WAITFLAG) tex2rtf $(DOCSOURCEDIR)\manual.tex $(DOCSOURCEDIR)\$(NAME).rtf -twice -winhelp
        cd $(THISDIR)

$(DOCDIR)\pdf\$(NAME).rtf: $(DOCSOURCES)
        cd $(DOCSOURCEDIR)
        -copy *.bmp $(DOCDIR)\pdf
        -start $(WAITFLAG) tex2rtf $(DOCSOURCEDIR)\manual.tex $(DOCDIR)\pdf\$(NAME).rtf -twice -rtf
        cd $(THISDIR)

$(DOCDIR)\html\$(NAME)\$(NAME).htm:         $(DOCSOURCES)
        cd $(DOCSOURCEDIR)
        -mkdir $(DOCDIR)\html\$(NAME)
        copy *.gif $(DOCDIR)\html\$(NAME)
        -start $(WAITFLAG) tex2rtf $(DOCSOURCEDIR)\manual.tex $(DOCDIR)\html\$(NAME)\$(NAME) -html -twice 
        -erase $(DOCDIR)\html\$(NAME)\*.con
        -erase *.con
        -erase $(DOCDIR)\html\$(NAME)\*.ref
        cd $(THISDIR)

$(DOCDIR)\htmlhelp\$(NAME).chm: $(DOCDIR)\html\$(NAME)\$(NAME).htm $(DOCDIR)\html\$(NAME)\$(NAME).hhp
	cd $(DOCDIR)\html\$(NAME)
	-hhc $(NAME).hhp
    -erase $(DOCDIR)\htmlhelp\$(NAME).chm
    move $(NAME).chm $(DOCDIR)\htmlhelp\$(NAME).chm
	cd $(THISDIR)

# An htb file is a zip file containing the .htm, .gif, .hhp, .hhc and .hhk
# files, renamed to htb.
# This can then be used with e.g. helpview.
# Optionally, a cached version of the .hhp file can be generated with hhp2cached.
$(DOCDIR)\htb\$(NAME).htb: $(DOCDIR)\html\$(NAME)\$(NAME).htm
	cd $(DOCDIR)\html\$(NAME)
    -erase $(NAME).zip $(NAME).htb
    zip $(NAME).zip *.htm *.gif *.hhp *.hhc *.hhk
    -mkdir $(DOCDIR)\htb
    -erase $(DOCDIR)\htb\$(NAME).htb
    -erase $(DOCDIR)\htb\$(NAME).htb
    move $(NAME).zip $(DOCDIR)\htb\$(NAME).htb
    cd $(THISDIR)

$(DOCSOURCEDIR)\$(NAME).dvi:	$(DOCSOURCES)
	cd $(DOCSOURCEDIR)
        -latex $(NAME)
        -latex $(NAME)
        -makeindx $(NAME)
        -bibtex $(NAME)
        -latex $(NAME)
        -latex $(NAME)
        cd $(THISDIR)

$(WXDIR)\docs\ps\$(NAME).ps:	$(DOCSOURCEDIR)\$(NAME).dvi
	cd $(DOCSOURCEDIR)
        -dvips32 -o $(NAME).ps $(NAME)
        move $(NAME).ps $(WXDIR)\docs\ps\$(NAME).ps
        cd $(THISDIR)