(file) Return to Makefile CVS log (file) (dir) Up to [HallC] / Documents / Howtos

File: [HallC] / Documents / Howtos / Makefile (download)
Revision: 1.8.2.1, Thu May 12 13:13:11 2005 UTC (19 years, 4 months ago) by saw
Branch: hks05
Changes since 1.8: +10 -4 lines
Files not needed for HKS

#
# Makefile to build the whole Hall C howto collection
#
# $Log: Makefile,v $
# Revision 1.8.2.1  2005/05/12 14:13:11  saw
# Files not needed for HKS
#
# Revision 1.7.2.1  2005/05/11 13:08:37  saw
# Not used for HKS
#
# Revision 1.7  2003/04/11 14:30:55  saw
# Only rebuild new/changed documents unless "make rebuild" called first
#
# Revision 1.6  2003/04/04 14:28:38  saw
# Prohibit off site access to vendor manuals
#
# Revision 1.5  2003/03/31 18:30:13  saw
# Install howtolist.php
#
# Revision 1.4  2003/03/19 21:23:58  saw
# Change in chowto_scan.perl arguments
#
# Revision 1.3  2003/03/11 21:55:57  saw
# chowto_scan.pl generates howtolist.text and index.html
#
# Revision 1.2  2003/03/08 04:03:46  saw
# Build chowto.tgz, the set of files an author needs to prepare a howto.
#
# Revision 1.1  2003/03/06 20:20:57  saw
# Initial Checkin
#

HOWTOWEBROOT=http://hallcweb.jlab.org/document
HOWTOFSROOT=/group/hallc/www/hallcweb/html/document

#
# If experiment specific, append experiment name to paths
#
EXPERIMENT:=$(shell head -1 EXPERIMENT 2>/dev/null)
ifneq ($(EXPERIMENT),)
	HOWTOWEBROOT:=$(HOWTOWEBROOT)/$(EXPERIMENT)/howtos
	HOWTOFSROOT:=$(HOWTOFSROOT)/$(EXPERIMENT)/howtos
else
	HOWTOWEBROOT:=$(HOWTOWEBROOT)/howtos
	HOWTOFSROOT:=$(HOWTOFSROOT)/howtos
endif

TEXFILES := $(wildcard *.tex)

PSTARGETS := $(patsubst %.tex,%.ps,$(TEXFILES))
DVIFILES := $(patsubst %.tex,%.dvi,$(TEXFILES))
BBLFILES := $(patsubst %.tex,%.bbl,$(TEXFILES))
LATEXHTMLDIRS := $(patsubst %.tex,%,$(TEXFILES))
LATEXHTMLINDEXES := $(patsubst %.tex,%/index.html,$(TEXFILES))

.SECONDARY: $(DVIFILES) $(BBLFILES)

all: postscript html chowto.tgz index.html

clean: clean_texout clean_html rebuild

clean_texout:
	rm -f $(PSTARGETS) *.dvi *.blg *.bbl *.blg *.aux *.log

clean_html:
	rm -f index.html

rebuild:
	touch REBUILD

REBUILD:
	touch REBUILD

postscript: $(PSTARGETS)

html: $(LATEXHTMLINDEXES)

%.ps: %.dvi
	dvips -o $@ $*

# Remove straight tex to dvi
%.dvi: %.bbl
	latex $*
	latex $*

# 
#%.bbl: %.tex chowto.bib chowto-auto.bib REBUILD
%.bbl: %.tex REBUILD
	latex $*
	-bibtex $*

%/index.html: %.bbl chowto.perl
	latex2html -init_file latex2html-init $*

chowto-auto.bib howtolist.text index.html: chowto_scan.perl $(TEXFILES)
	./chowto_scan.perl $(HOWTOWEBROOT)

chowto.tgz: template.tex_tex howtohowto.tex chowto.cls chowto.bst chowto.bib chowto-auto.bib
	-mkdir tarfile
	cp template.tex_tex tarfile/template.tex
	cat chowto.bib chowto-auto.bib > tarfile/chowto.bib
	cp howtohowto.tex chowto.cls chowto.bst tarfile
	(cd tarfile ; tar -zcf ../chowto.tgz *)
	rm -fr tarfile

install:
	install --mode=664 index.html .htaccess $(HOWTOFSROOT)
	install --mode=664 howtolist.text howtolist.php $(HOWTOFSROOT)
	cat chowto.bib chowto-auto.bib > $(HOWTOFSROOT)/chowto.bib
	install --mode=664 chowto.tgz $(HOWTOFSROOT)
	for subdir in $(LATEXHTMLDIRS); do \
	   install --mode=775 -d $(HOWTOFSROOT)/$$subdir ; \
	   install --mode=664 $$subdir/* $(HOWTOFSROOT)/$$subdir ; \
	done
	for psfile in $(PSTARGETS); do \
	   install --mode=664 $$psfile $(HOWTOFSROOT) ; \
	done

Analyzer/Replay: Mark Jones, Documents: Stephen Wood
Powered by
ViewCVS 0.9.2-cvsgraph-1.4.0