# Makefile for a web reference manual # H. Fenker, November 2000 # this contains all the commands used by Makefiles in the directories # under this one. # 7/11/05 hcf: explicitly defined LATEX2HTML to use v97.1 of latex2html #LATEX2HTML= /u/group/hallc/documents/ops_manuals/97.1/latex2html #LATEX2HTML = /apps/bin/latex2html LATEX2HTML = /usr/bin/latex2html all: $(DocName).tex $(MAKE) dvi $(MAKE) ps $(MAKE) pdf $(MAKE) html $(MAKE) publish $(MAKE) clean ${DocName}.dvi: $(DocName).tex $(MAKE) dvi ${DocName}.ps: $(DocName).dvi $(MAKE) ps html: $(DocName).tex #we need some environment definitions to make tex and latex2html work right ifneq ($(LATEX2HTML_SETUP_DONE),YES) @echo "***** Please 'source ../dosetup' first. *****" @exit 1 endif rm -rf $(DocName) $(LATEX2HTML) $(DocName) if [ -d ./gif ]; then \ @echo 'Found gif directory .. replicating for html.'; \ mkdir $(DocName)/gif; \ cp gif/* $(DocName)/gif; \ fi chown -Rf $(USER):$(OWNER_GROUP) $(DocName) chmod -Rf 664 $(DocName)/* chmod -f 775 $(DocName) if [ -f $(DocName)/gif ]; then chmod 775 $(DocName)/gif; fi dvi: $(DocName).tex #we need some environment definitions to make tex and latex2html work right ifneq ($(LATEX2HTML_SETUP_DONE),YES) @echo "***** Please 'source ../dosetup' first. *****" @exit 1 endif #Note that we intentionally run latex twice in case it needs intermediate files latex $(DocName) latex $(DocName) @if grep -i warning $(DocName).log; then \ echo '*****************************************************'; \ echo '***************Some latex warnings. UhOh!. **********'; \ echo '*****************************************************'; \ fi chown -f $(USER):$(OWNER_GROUP) $(DocName).* chmod -f 664 $(DocName).* ps: $(DocName).tex $(DocName).dvi rm -f $(DocName).ps dvips $(DocName).dvi -o $(DocName).ps chown -f $(USER):$(OWNER_GROUP) $(DocName).* chmod -f 664 $(DocName).* pdf: $(DocName).ps $(DocName).dvi $(DocName).tex ps2pdf $(DocName).ps chown -f $(USER):$(OWNER_GROUP) $(DocName).* chmod -f 664 $(DocName).* publish: rm -rf /group/hallc/www/hallcweb/html/document/$(DocName) mkdir /group/hallc/www/hallcweb/html/document/$(DocName) tar cf - $(DocName) |(cd /group/hallc/www/hallcweb/html/document; tar vxf -) cp $(DocName).ps /group/hallc/www/hallcweb/html/document/$(DocName) cp $(DocName).pdf /group/hallc/www/hallcweb/html/document/$(DocName) chown -Rf $(USER):$(OWNER_GROUP) /group/hallc/www/hallcweb/html/document/$(DocName) chmod -f 775 /group/hallc/www/hallcweb/html/document/$(DocName) #----The presence of an .htaccess file here means we are to protect the published directory. if [ -f ./.htaccess ]; then \ cp .htaccess /group/hallc/www/hallcweb/html/document/$(DocName); \ fi clean: rm -rf $(DocName) rm -f $(DocName).dvi rm -f $(DocName).ps rm -f $(DocName).pdf rm -f $(DocName).aux rm -f $(DocName).toc rm -f $(DocName).lof rm -f $(DocName).lot rm -f $(DocName).log