#! /usr/bin/make -k -f # $Id: Makefile,v 1.22 2003/09/05 21:35:59 mca1001 Exp $ HOME=/home/mca1001 CW=$(HOME)/cvswork CVSQ:=-Q # really want -q for non-silent makes export PATH=/usr/local/bin:/usr/bin:/bin:$(HOME)/bin PERL5LIB=$(HOME)/.perl5lib:$(CW)/perl5lib # Don't put a space on the end of the path! makes for a hard-to-find # error 8-( PAPERS=papers TARGETS=todo.o2h.html Photos WebMagick-Icons bucket .cvsignore pgp.asc T8OSITE=/var/www/t8o.org KEYS=5892A5C6 F8B6FDF5 DD989286 #-- Internal gubbins -------------------------------------------------------- PAPERS_LYX=$(wildcard $(PAPERS)/*.lyx) LYX_TARGETS=$(PAPERS_LYX:.lyx=.ps) $(PAPERS_LYX:.lyx=.pdf) # nb. needs lyx, gs-common, tetex-bin and tetex-extra (for SIunits.sty) # Also need to rerun /etc/cron.daily/tetex-bin , and run lyx under X # to create the ~/.lyx directory to make the PDF generation work. .PHONY: all all: $(TARGETS) $(LYX_TARGETS) permissions # recurse for stuff cd julianet && make permissions: mkdir -p cgi-bin chmod -R g-ws cgi-bin* update: cvs $(CVSQ) up -d make all # temporary hideousness until I get /var/www vs. www.house.internal sorted ( cd /var/www && cvs $(CVSQ) up ) ( cd /home/toy/public_html && cvs $(CVSQ) up ) # more for the top websites directory too cp /etc/apache/httpd.conf $(CW)/websites clean: rm -vf $(TARGETS) rm -vf *~ # the bucket is never cleaned %.ps: %.lyx lyx -e ps $< %.pdf: %.lyx lyx -e pdf $< #-- Actual stuff to build --------------------------------------------------- .cvsignore: .cvsignore.main Makefile cat $< > $@.new echo $(TARGETS) | tr ' ' '\n' >> $@.new mv $@.new $@ # Could/should/wouldn't depend on outline2html's module(s) todo.o2h.html: $(CW)/matthew-files/todo.txt $(CW)/bin/outline2html outline2html $< > $@.new mv $@.new $@ #-- Random external stuff --------------------------------------------------- Photos: WebMagick-Icons ln -s ~/synced/toy-relapse/linkdir/relapse-Photos $@ WebMagick-Icons: ln -s ~/synced/toy-relapse/linkdir/WebMagick-Icons $@ bucket: mkdir $@ pgp.asc: ~/.gnupg/pubring.gpg Makefile gpg -a --export $(KEYS) > $@ CPD=$(CW)/cvspublish~ cvspublish: rm -rf $(CPD) cvspublish.pl -d $(CPD) --autopub="" chmod -R g-s $(CPD) rm -rf $(T8OSITE)/cvs{publish,pods,history}~ mv $(CPD)/website/cvspublish $(T8OSITE)/cvspublish+ mv $(CPD)/website/cvshistory $(T8OSITE)/cvshistory+ mv $(CPD)/website/cvspods $(T8OSITE)/cvspods+ mv $(T8OSITE)/cvspublish{,~} mv $(T8OSITE)/cvspublish{+,} mv $(T8OSITE)/cvshistory{,~} mv $(T8OSITE)/cvshistory{+,} mv $(T8OSITE)/cvspods{,~} mv $(T8OSITE)/cvspods{+,} rm -rf $(T8OSITE)/cvs{publish,history,pods}~ # well that's pretty isn't it?