General Makefile Generator

A.J.Hurst

Version 1.3.3

20101213:091644

Table of Contents

1 Introduction
1.1 Files generated by this document
2 Global Definitions and Configuration
3 The Makefiles
3.1 The Web Makefiles
3.1.1 MakeWeb
3.1.2 MakeWebRail
4 Variable Definitions
5 Machine Definitions
5.1 CSSE Machine
5.2 HOME Machine
5.3 HURST Machine
5.4 WORK Machine
5.5 LOCAL Machine
6 File Definitions
7 Debug Definitions
8 Basic Rules
8.1 Making School Server Files
8.2 Making Home Server Files
8.3 Making Hurst Server Files
8.4 Making Work Server Files
8.5 Making Local Server Files
8.6 Making Clean
9 Indices


1. Introduction

This document describes the construction of a number of makefiles. Some of these makefiles are independent, some are dependent upon each other. In order to maintain consistency between these makefiles, they are all assembled here, and are dcumented and maintained in this one place.

1.1 Files generated by this document

makefile
The basic makefile. I think this is now obsolete.
MakeXLP
The XML Literate Programming Makefile. It knows how to make tex, dvi, pdf and html files from a literate program xlp file, as well as tangling the program files.
MakeWeb
Build all general web pages. The main task of this makefile is in uploading files to the various servers.
MakeWebRail
Build all railway web pages. The main task of this makefile is in uploading files to the various servers.

2. Global Definitions and Configuration

These makefiles depend upon a number of global parameters to the scripts. These parameters are defined here.

FILES
A list of files in the current directory that are to be made.
RELCWD
The relative path to the current directory. This path must begin with a slash (if it is non-empty), and NOT end with a slash.
TMP-CSSE

Define the directory to be used to build files for transmission to the remote (school/csse) site.

XMLS
A list of xml files for transmission to the remote site.
XSLS
A list of xsl files for transmission to the remote site.

3. The Makefiles

"makefile" 3.1 =
<machine definitions 5.1> <file definitions 6.1> <basic variable definitions 4.3> <make-tangle 8.1> <make-html 8.3> <make-tex 8.4> <make-dvi 8.5> <make-pdf 8.6> <make-webdoc 8.2>
"MakeXLP" 3.2 =
<basic variable definitions 4.3> <make-tangle 8.1> <make-html 8.3> <make-tex 8.4> <make-dvi 8.5> <make-pdf 8.6>

3.1 The Web Makefiles

MakeWeb is the basic makefile for all web pages, except those in the Railway subtree. These are made by the makefile MakeWebRail.

3.1.1 MakeWeb

Make files associated with my general web pages (all except railway pages, see <MakeWebRail 3.4> below). The main task in this makefile is to upload files to the various servers, denoted as csse (the ex-School of Computer Science and Software Engineering), home (my home server, aka www.ajhurst.org), and work (my desktop machine at work).

These uploads are performed in the code fragments <make all csse 8.8>, <make all home 8.26>, and <make all work 8.48> respectively. The remaining code fragments provide definitions to setup the appropriate environment.

"MakeWeb" 3.3 =
<define variables 4.4,4.5> <rsync definitions 4.1> <machine definitions 5.1> <issue variable warnings 4.2> <make all 8.7> <make all csse 8.8> <make all home 8.26> <make all hurst 8.37> <make all work 8.48> <make all local 8.59> <make all clean 8.70> <make debug 7.1>

3.1.2 MakeWebRail

Similar remarks to <MakeWeb 3.3> apply here. The main differences are due to the fact that additional file types must be handled, which is done in the code fragments with suffix "rail", and by passing a non-empty parameter into the "make all ..." fragments. These parameters define the further (pseudo)files to be made.

"MakeWebRail" 3.4 =
<define rail variables 4.6> <machine definitions 5.1> <rsync definitions 4.1> <issue variable warnings 4.2> <make all 8.7> <make all csse 8.8>(additionalmakes='.csse.images .csse.thumbs') <make csse rail 8.18> <make all home 8.26>(additionalmakes='.home.images .home.thumbs') <make home rail 8.35> <make all work 8.48>(additionalmakes='.work.images .work.thumbs') <make work rail 8.57> <make all hurst 8.37>(additionalmakes='.hurst.images .hurst.thumbs') <make hurst rail 8.46> <make all local 8.59>(additionalmakes='.local.images .local.thumbs') <make local rail 8.68> clean: rm -rf $(TMP-CSSE) include ~/etc/MakeInc .SUFFIXES: <make debug 7.1>

4. Variable Definitions

We define first some definitions to expedite the specification of the rsync stages of making. The variable RSYNC defines the full path of the rsync program, at both ends of the transfer. The parameter to the program --rsync-path is the remote site path for the program.

DATE generates the date in ISO format ``YYYYMMDDTHHMMSS''.

RS-FILTR defines a sed filter that strips off rsync verbiage, leaving only statements of explicit file transfers.

<rsync definitions 4.1> =
# the rsync path needs to change depending upon the target machine DATE = $(shell /bin/date +%Y%m%dT%H%M%S) RS-FILTR = | sed -e '/^$$/d' | sed -e 's/^/$(DATE) $@ => /' | \ sed -e '/building file/d' \ -e '/bytes.sec$$/d' \ -e '/total size/d' \ -e '/.\/$$/d'
Chunk referenced in 3.3 3.4

The output from the rsync looks like this:

    building file list ... done
    index.xml
    
    sent 140 bytes  received 82 bytes  49.33 bytes/sec
    total size is 4375  speedup is 19.71

and the filter massages that to this:

    20061219T101133 .hurst.locals => index.xml

That is to say, all lines are date-time stamped, the first line and the last three lines are stripped, and the list of files remaining (the files actually synchronized) is annotated to show where they were synchronized to.

<issue variable warnings 4.2> =
ifndef RELCWD $(warning variable RELCWD is not defined in $(PWD)) ERROR = 1 endif ifndef DIRS $(warning variable DIRS is not defined in $(PWD)) endif ifdef ERROR $(error missing definitions, cannot proceed) endif
Chunk referenced in 3.3 3.4
<basic variable definitions 4.3> =
XSLLIB = $(HOME)/lib/xsl
Chunk referenced in 3.1 3.2
<define variables 4.4> =
ifndef MAKELOCALS MAKELOCALS = $(EMPTY) endif ifndef EXTRAS EXTRAS = $(EMPTY) endif ifndef DIRINDENT export DIRINDENT="+--" endif
Chunk referenced in 3.3
Chunk defined in 4.4,4.5

The variable DIRINDENT defines the nesting indentation applied when the make script recurses into sub-directories.

<define variables 4.5> =
<define common variables 4.7>
Chunk referenced in 3.3
Chunk defined in 4.4,4.5
<define rail variables 4.6> =
ifndef MAKELOCALS MAKELOCALS = .csse.images .csse.thumbs endif IMAGES = $(wildcard *.jpg) THUMBS = $(wildcard thumb/*.gif) ifndef EXTRAS EXTRAS = $(IMAGES) endif ifndef INTROS INTROS = intro.xml endif ifndef SHUNTS SHUNTS = ../Central.xml endif ifndef INDEXNEEDS INDEXNEEDS = $(wildcard *.xml) $(SHUNTS) $(INTROS) endif <define common variables 4.7>
Chunk referenced in 3.4
<define common variables 4.7> =
ifndef XMLS XMLS = $(wildcard *.xml) endif ifndef XSLS XSLS = $(wildcard *.xsl) endif ifndef CGIS CGIS = $(wildcard *.py) endif
Chunk referenced in 4.5 4.6

5. Machine Definitions

<machine definitions 5.1> =
<csse machine definitions 5.2> <home machine definitions 5.3> <hurst machine definitions 5.4> <work machine definitions 5.5> <local machine definitions 5.6>
Chunk referenced in 3.1 3.3 3.4

5.1 CSSE Machine

<csse machine definitions 5.2> =
NEXUS = nexus.infotech.monash.edu.au TMP-CSSE = .tmpcsse CSSE-DOMAIN = $(NEXUS) ifndef CSSE-SERVER CSSE-SERVER = $(CSSE-DOMAIN):web$(RELCWD) endif CSSE-HTMLS = $(HTMLS) CSSE-XSLS = $(patsubst %,$(TMP-CSSE)/%,$(XSLS)) CSSE-XMLS = $(patsubst %,$(TMP-CSSE)/%,$(XMLS)) CSSE-CGIS = $(patsubst %,$(TMP-CSSE)/%,$(CGIS)) CSSE-FILES = $(FILES) $(CSSE-HTMLS) $(CSSE-XMLS) $(CSSE-XSLS) $(EXTRAS) CSSE-RSYNC = /usr/bin/rsync --rsync-path=/usr/local/bin/rsync
Chunk referenced in 5.1

5.2 HOME Machine

<home machine definitions 5.3> =
DIMBOOLA = dimboola.ajh.id.au HOME-DOMAIN = $(DIMBOOLA) ifndef HOME-SERVER HOME-SERVER = $(HOME-DOMAIN):www$(RELCWD) endif HOME-HTMLS = $(HTMLS) HOME-XSLS = $(XSLS) HOME-XMLS = $(XMLS) HOME-CGIS = $(CGIS) HOME-FILES = $(FILES) $(HOME-HTMLS) $(HOME-XMLS) $(HOME-XSLS) $(HOME-CGIS) $(EXTRAS) HOME-RSYNC = /usr/bin/rsync --rsync-path=/usr/bin/rsync
Chunk referenced in 5.1

5.3 HURST Machine

<hurst machine definitions 5.4> =
HURST = eregnans.ajhurst.org HURST-DOMAIN = $(HURST) ifndef HURST-SERVER HURST-SERVER = $(HURST-DOMAIN):www$(RELCWD) endif HURST-HTMLS = $(HTMLS) HURST-XSLS = $(XSLS) HURST-XMLS = $(XMLS) HURST-CGIS = $(CGIS) HURST-FILES = $(FILES) $(HURST-HTMLS) $(HURST-XMLS) $(HURST-XSLS) $(HURST-CGIS) $(EXTRAS) HURST-RSYNC = /usr/bin/rsync --rsync-path=/usr/bin/rsync
Chunk referenced in 5.1

5.4 WORK Machine

<work machine definitions 5.5> =
MURTOA = murtoa.infotech.monash.edu.au WORK-DOMAIN = $(MURTOA) ifndef WORK-SERVER WORK-SERVER = $(WORK-DOMAIN):www$(RELCWD) endif WORK-HTMLS = $(HTMLS) WORK-XSLS = $(XSLS) WORK-XMLS = $(XMLS) WORK-CGIS = $(CGIS) WORK-FILES = $(FILES) $(WORK-HTMLS) $(WORK-XMLS) $(WORK-XSLS) $(WORK-CGIS) $(EXTRAS) WORK-RSYNC = /usr/bin/rsync --rsync-path=/usr/bin/rsync
Chunk referenced in 5.1

5.5 LOCAL Machine

<local machine definitions 5.6> =
ifndef LOCAL-SERVER LOCAL-SERVER = /home/ajh/www$(RELCWD) endif LOCAL-HTMLS = $(HTMLS) LOCAL-XSLS = $(XSLS) LOCAL-XMLS = $(XMLS) LOCAL-CGIS = $(CGIS) LOCAL-FILES = $(FILES) $(LOCAL-HTMLS) $(LOCAL-XMLS) $(LOCAL-XSLS) $(LOCAL-CGIS) $(EXTRAS) LOCAL-RSYNC = /usr/local/bin/rsync --rsync-path=/usr/local/bin/rsync
Chunk referenced in 5.1

6. File Definitions

<file definitions 6.1> =
Chunk referenced in 3.1

7. Debug Definitions

<make debug 7.1> =
<make csse debug 8.25> <make home debug 8.36> <make hurst debug 8.47> <make work debug 8.58> <make local debug 8.69>
Chunk referenced in 3.3 3.4

8. Basic Rules

<make-tangle 8.1> =
%.tangle: %.xlp xsltproc $(XSLLIB)/litprog.xsl $*.xlp >$*.xml touch $*.tangle
Chunk referenced in 3.1 3.2
<make-webdoc 8.2> =
%.html: %.xml $(XSLS) $(XSLTFILE) xsltproc --xinclude \ --param xmltime \"`fmod $*.xml`\" \ --param htmltime \"`fmod -`\" \ --param filename \"$*\" \ --param relcwd \"$(RELCWD)\" \ $(XSLTFILE) \ $*.xml >$*.html
Chunk referenced in 3.1
<make-html 8.3> =
%.html: %.tangle xsltproc $(XSLLIB)/lit2html.xsl $*.xml >$*.html
Chunk referenced in 3.1 3.2
<make-tex 8.4> =
%.tex: %.tangle xsltproc $(XSLLIB)/lit2tex.xsl $*.xml | expand >$*.tex
Chunk referenced in 3.1 3.2
<make-dvi 8.5> =
%.dvi: %.tex tex $*.tex
Chunk referenced in 3.1 3.2
<make-pdf 8.6> =
%.pdf: %.tex pdftex $*.tex
Chunk referenced in 3.1 3.2

8.1 Making School Server Files

The approach taken to making files that end up on a remote site with different machine environment is to build a `remote' subdirectory with all the remote files, suitably modified, within it. This directory can then be rsync-ed to the remote site to complete the make. By convention, the name of the subdirectory starts with the prefix .tmp with the nickname of the remote site following.

Files for the remote site are grouped into two basic categories - those that will require modification, and those that don't. Clearly the latter can be rsync-ed directly, and do not need to be built within the subdirectory `.tmpcsse'. Files that do need modification are processed by sed scripts using the local file as source, and the remote build file in .tmpcsse as destination. These modifications are performed by the make tmp csse ... scripts.

The remote copy process (rsync) is performed by the corresponding make csse ... chunks. A set of phony makefiles are built to indicate that the transfer has been performed, to avoid the overheads of re-rsync-ing them.

<make all 8.7> =
all: all.dirs all.locals all.dirs: @if [ -n "$(DIRS)" ] ; then \ for d in $(DIRS) ; do \ export DIRINDENT=" $(DIRINDENT)" ; \ if [ `expr $$d : '\/'` -eq 0 ] ; then echo =$(RELCWD)/$$d ; \ else echo "$(DIRINDENT)$$d" ; fi ; \ (cd $$d ; make all) ; \ done ; \ fi all.locals: csse.locals work.locals home.locals hurst.locals local.locals all.clean: clean @if [ -n "$(DIRS)" ] ; then \ for d in $(DIRS) ; do \ if [ `expr $$d : '\/'` -eq 0 ] ; then echo =$(RELCWD)/$$d ; \ else echo $$d ; fi ; \ (cd $$d ; make all.clean) ; \ done ; \ fi
Chunk referenced in 3.3 3.4
<make all csse 8.8> =
<make csse 8.10> <make csse locals 8.11>(additionalmakes='additionalmakes') <make csse files 8.12> <make csse htmls 8.13> <make csse xmls 8.14> <make csse xsls 8.15> <make csse cgis 8.16> <make csse dirs 8.17> <make tmp csse directory 8.9> <make tmp csse htmls 8.19> <make tmp csse xmls 8.20> <make tmp csse dtds 8.21> <make tmp csse xsls 8.22> <make tmp csse cgis 8.23> $(TMP-CSSE)/%: % $(TMP-CSSE) @sed -e 's@BASE="/home/ajh/www"@BASE="/u/web/homes/ajh"@' \ -e 's@#!/usr/bin/python@#!/usr/monash/bin/python2.3@' \ -e 's@XSLTPROC="/usr/bin/xsltproc"@XSLTPROC="/usr/monash/bin/xsltproc"@' \ <$< >$@
Chunk referenced in 3.3 3.4
<make tmp csse directory 8.9> =
tmp-csse: $(TMP-CSSE) $(TMP-CSSE): @if [ ! -d $(TMP-CSSE) ] ; then \ mkdir $(TMP-CSSE) ; \ fi
Chunk referenced in 8.8
<make csse 8.10> =
csse: csse.dirs csse.locals
Chunk referenced in 8.8
<make csse locals 8.11> =
csse.locals: .csse.locals .csse.cgis additionalmakes $(MAKELOCALS) .csse.locals: $(TMP-CSSE) $(CSSE-FILES) $(MAKELOCALS) @if [ -n "$(FILES)$(HTMLS)$(XMLS)$(XSLS)" ] ; then \ $(CSSE-RSYNC) -av $(CSSE-FILES) $(CSSE-SERVER)/ $(RS-FILTR) ; \ fi @echo "$(DATE) rsync'ed csse locals" @touch .csse.locals
Chunk referenced in 8.8

Synchronize any files that do not need transformation to remote site versions.

<make csse files 8.12> =
.csse.files: $(FILES) @if [ -n "$(FILES)" ] ; then \ $(CSSE-RSYNC) -av $(FILES) $(CSSE-SERVER)/ $(RS-FILTR) ; \ fi @echo "$(DATE) rsync'ed csse files" @touch .csse.files
Chunk referenced in 8.8

Synchronize any html files. It is assumed that these will not have any URLs that need modification - if they do, they should be included with the XML file definitions.

<make csse htmls 8.13> =
.csse.htmls: $(CSSE-HTMLS) @if [ -n "$(HTMLS)" ] ; then \ $(CSSE-RSYNC) -av $(CSSE-HTMLS) $(CSSE-SERVER)/ $(RS-FILTR) ; \ fi @echo "$(DATE) rsync'ed csse htmls" @touch .csse.htmls
Chunk referenced in 8.8
<make csse xmls 8.14> =
.csse.xmls: $(CSSE-XMLS) @if [ -n "$(XMLS)" ] ; then \ $(CSSE-RSYNC) -av $(CSSE-XMLS) $(CSSE-SERVER)/ $(RS-FILTR) ; \ fi @echo "$(DATE) rsync'ed csse xmls" @touch .csse.xmls
Chunk referenced in 8.8
<make csse xsls 8.15> =
.csse.xsls: $(CSSE-XSLS) @if [ -n "$(XSLS)" ] ; then \ $(CSSE-RSYNC) -av $(CSSE-XSLS) $(CSSE-SERVER)/ $(RS-FILTR) ; \ fi @echo "$(DATE) rsync'ed csse xsls" @touch .csse.xsls
Chunk referenced in 8.8
<make csse cgis 8.16> =
.csse.cgis: $(CSSE-CGIS) @if [ -n "$(CGIS)" ] ; then \ $(CSSE-RSYNC) -av $(CSSE-CGIS) $(CSSE-DOMAIN):cgi/ $(RS-FILTR) ; \ fi @echo "$(DATE) rsync'ed csse cgis" @touch .csse.cgis
Chunk referenced in 8.8
<make csse dirs 8.17> =
csse.dirs: @if [ -n "$(DIRS)" ] ; then \ for d in $(DIRS) ; do \ export DIRINDENT=" $(DIRINDENT)" ; \ if [ `expr $$d : '\/'` -eq 0 ] ; then echo =$(RELCWD)/$$d ; \ else echo "$(DIRINDENT)$$d" ; fi ; \ (cd $$d ; make csse) ; \ done ; \ fi
Chunk referenced in 8.8
<make csse rail 8.18> =
.csse.images: $(IMAGES) @if [ -n "$(IMAGES)" ] ;then \ $(CSSE-RSYNC) -auv $(IMAGES) $(CSSE-SERVER)/ $(RS-FILTR) ; \ fi @echo "$(DATE) rsync'ed csse images" @touch .csse.images .csse.thumbs: $(THUMBS) @$(CSSE-RSYNC) -auv thumb/ $(CSSE-SERVER)/thumb/ $(RS-FILTR) @echo "$(DATE) rsync'ed csse thumbs" @touch .csse.thumbs
Chunk referenced in 3.4
<make tmp csse htmls 8.19> =
$(TMP-CSSE)/%.html: %.html @echo "Converting $*.html ..." @sed -e 's@file:///home/ajh/www@file:///u/web/homes/ajh@' \ -e 's@file:///home/ajh/lib/dtd@file:///u/web/homes/ajh/lib/dtd@' \ -e 's@file:///home/ajh/lib/xsl@file:///u/web/homes/ajh/lib/xsl@' \ -e 's@http://localhost/~ajh/cgi-bin@http://www.csse.monash.edu.au/~ajh/cgi-bin@' \ -e 's@http://localhost/cgi-bin/ajh@http://www.csse.monash.edu.au/~ajh/cgi-bin@' \ <$*.html >$@
Chunk referenced in 8.8
<make tmp csse xmls 8.20> =
$(TMP-CSSE)/%.xml: %.xml @echo "Converting .xml files $< ..." @sed -e 's@file:///home/ajh/www@file:///u/web/homes/ajh@' \ -e 's@file:///home/ajh/lib/dtd@file:///u/web/homes/ajh/lib/dtd@' \ -e 's@file:///home/ajh/lib/xsl@file:///u/web/homes/ajh/lib/xsl@' \ -e 's@http://localhost/~ajh/@http://www.csse.monash.edu.au/~ajh/@' \ -e 's@http://localhost/cgi-bin/ajh@http://www.csse.monash.edu.au/~ajh/cgi-bin@' \ <$*.xml >$@
Chunk referenced in 8.8
<make tmp csse dtds 8.21> =
$(TMP-CSSE)/%.dtd: %.dtd @echo "Converting $*.dtd ..." @sed -e 's@file:///home/ajh/www@file:///u/web/homes/ajh@' \ -e 's@file:///home/ajh/lib/dtd@file:///u/web/homes/ajh/lib/dtd@' \ -e 's@file:///home/ajh/lib/xsl@file:///u/web/homes/ajh/lib/xsl@' \ -e 's@http://localhost/~ajh/cgi-bin@http://www.csse.monash.edu.au/~ajh/cgi-bin@' \ -e 's@http://localhost/cgi-bin/ajh@http://www.csse.monash.edu.au/~ajh/cgi-bin@' \ <$*.dtd >$@
Chunk referenced in 8.8
<make tmp csse xsls 8.22> =
$(TMP-CSSE)/%.xsl: %.xsl $(TMP-CSSE) @echo "Converting .xsl files $< ..." @sed -e 's@file:///home/ajh/www@file:///u/web/homes/ajh@' \ -e 's@file:///home/ajh/local@file:///u/web/homes/ajh/local@' \ -e 's@file:///home/ajh/lib/dtd@file:///u/web/homes/ajh/lib/dtd@' \ -e 's@file:///home/ajh/lib/xsl@file:///u/web/homes/ajh/lib/xsl@' \ -e 's@file:///Library/WebServer/Documents/ajh@file:///u/web/homes/ajh@' \ -e 's@http://localhost/cgi-bin/ajh@http://www.csse.monash.edu.au/~ajh/cgi-bin@' \ -e 's@http://localhost/~ajh/@http://www.csse.monash.edu.au/~ajh/@' \ <$< >$@
Chunk referenced in 8.8
<make tmp csse cgis 8.23> =
$(TMP-CSSE)/%.py: %.py $(TMP-CSSE) <convert a cgi 8.24> $(TMP-CSSE)/%.cgi: %.cgi $(TMP-CSSE) <convert a cgi 8.24>
Chunk referenced in 8.8
<convert a cgi 8.24> =
@echo "converting .cgi files $< ..." @if [ -f $@ ] ; then chmod 755 $@ ; fi @sed -e 's@#!/usr/bin/python@#!/usr/monash/bin/python@' \ -e 's@/home/ajh/www@/u/web/homes/ajh@' \ -e 's@file:///home/ajh/lib/dtd@file:///u/web/homes/ajh/lib/dtd@' \ -e 's@file:///home/ajh/lib/xsl@file:///u/web/homes/ajh/lib/xsl@' \ -e 's@/Library/WebServer/Documents/ajh@/u/web/homes/ajh@' \ -e 's@http://localhost/cgi-bin/ajh@http://www.csse.monash.edu.au/~ajh/cgi-bin@' \ -e 's@http://localhost/~ajh@http://www.csse.monash.edu.au/~ajh@' \ -e 's@system=MacOSX@system=Solaris@' \ <$< >$@ @chmod 555 $@
Chunk referenced in 8.23
<make csse debug 8.25> =
csse.debug: @echo "CGIS = $(CGIS)" @echo "CSSE-CGIS = $(CSSE-CGIS)" @echo "CSSE-FILES = $(CSSE-FILES)" @echo "CSSE-RSYNC = $(CSSE-RSYNC)" @echo "CSSE-XMLS = $(CSSE-XMLS)" @echo "CSSE-XSLS = $(CSSE-XSLS)" @echo "DIRS = $(DIRS)" @echo "EXTRAS = $(EXTRAS)" @echo "FILES = $(FILES)" @echo "IMAGES = $(IMAGES)" @echo "INDEXNEEDS = $(INDEXNEEDS)" @echo "INTROS = $(INTROS)" @echo "MAKELOCALS = $(MAKELOCALS)" @echo "RELCWD = $(RELCWD)" @echo "SHUNTS = $(SHUNTS)" @echo "XMLS = $(XMLS)" @echo "XSLS = $(XSLS)"
Chunk referenced in 7.1

8.2 Making Home Server Files

<make all home 8.26> =
<make home 8.27> <make home locals 8.28>(additionalmakes='additionalmakes') <make home files 8.29> <make home htmls 8.30> <make home xmls 8.31> <make home xsls 8.32> <make home cgis 8.33> <make home dirs 8.34>
Chunk referenced in 3.3 3.4
<make home 8.27> =
home: home.dirs home.locals
Chunk referenced in 8.26
<make home locals 8.28> =
home.locals: .home.locals additionalmakes $(MAKELOCALS) .home.locals: $(HOME-FILES) $(MAKELOCALS) @if [ -n "$(FILES)$(HTMLS)$(XMLS)$(XSLS)$(CGIS)" ] ; then \ $(HOME-RSYNC) -av $(HOME-FILES) $(HOME-SERVER)/ $(RS-FILTR) ; \ fi @echo "$(DATE) rsync'ed home locals" @touch .home.locals
Chunk referenced in 8.26
<make home files 8.29> =
.home.files: $(FILES) @if [ -n "$(FILES)" ] ; then \ $(HOME-RSYNC) -av $(FILES) $(HOME-SERVER)/ $(RS-FILTR) ; \ fi @echo "$(DATE) rsync'ed home files" @touch .home.files
Chunk referenced in 8.26
<make home htmls 8.30> =
.home.htmls: $(HOME-HTMLS) @if [ -n "$(HTMLS)" ] ; then \ $(HOME-RSYNC) -av $(HOME-HTMLS) $(HOME-SERVER)/ $(RS-FILTR) ; \ fi @echo "$(DATE) rsync'ed home htmls" @touch .home.htmls
Chunk referenced in 8.26
<make home xmls 8.31> =
.home.xmls: $(HOME-XMLS) @if [ -n "$(XMLS)" ] ; then \ $(HOME-RSYNC) -av $(HOME-XMLS) $(HOME-SERVER)/ $(RS-FILTR) ; \ fi @echo "$(DATE) rsync'ed home xmls" @touch .home.xmls
Chunk referenced in 8.26
<make home xsls 8.32> =
.home.xsls: $(HOME-XSLS) @if [ -n "$(XSLS)" ] ; then \ $(HOME-RSYNC) -av $(HOME-XSLS) $(HOME-SERVER)/ $(RS-FILTR) ; \ fi @echo "$(DATE) rsync'ed home xsls" @touch .home.xsls
Chunk referenced in 8.26
<make home cgis 8.33> =
.home.cgis: $(HOME-CGIS) @if [ -n "$(CGIS)" ] ; then \ $(HOME-RSYNC) -av $(HOME-CGIS) $(HOME-SERVER)/ $(RS-FILTR) ; \ fi @echo "$(DATE) rsync'ed home cgis" @touch .home.cgis
Chunk referenced in 8.26
<make home dirs 8.34> =
home.dirs: @if [ -n "$(DIRS)" ] ; then \ for d in $(DIRS) ; do \ export DIRINDENT=" $(DIRINDENT)" ; \ if [ `expr $$d : '\/'` -eq 0 ] ; then echo =$(RELCWD)/$$d ; \ else echo "$(DIRINDENT)$$d" ; fi ; \ (cd $$d ; make home) ; \ done ; \ fi
Chunk referenced in 8.26
<make home rail 8.35> =
.home.images: $(IMAGES) @if [ -n "$(IMAGES)" ] ;then \ $(HOME-RSYNC) -auv $(IMAGES) $(HOME-SERVER)/ $(RS-FILTR) ; \ fi @echo "$(DATE) rsync'ed home images" @touch .home.images .home.thumbs: $(THUMBS) @$(HOME-RSYNC) -auv thumb/ $(HOME-SERVER)/thumb/ $(RS-FILTR) @echo "$(DATE) rsync'ed home thumbs" @touch .home.thumbs
Chunk referenced in 3.4
<make home debug 8.36> =
home.debug: @echo "CGIS = $(CGIS)" @echo "DIRS = $(DIRS)" @echo "EXTRAS = $(EXTRAS)" @echo "FILES = $(FILES)" @echo "HOME-CGIS = $(HOME-CGIS)" @echo "HOME-FILES = $(HOME-FILES)" @echo "HOME-SERVER = $(HOME-SERVER)" @echo "HOME-RSYNC = $(HOME-RSYNC)" @echo "HOME-XMLS = $(HOME-XMLS)" @echo "HOME-XSLS = $(HOME-XSLS)" @echo "IMAGES = $(IMAGES)" @echo "INDEXNEEDS = $(INDEXNEEDS)" @echo "INTROS = $(INTROS)" @echo "RELCWD = $(RELCWD)" @echo "SHUNTS = $(SHUNTS)" @echo "XMLS = $(XMLS)" @echo "XSLS = $(XSLS)"
Chunk referenced in 7.1

8.3 Making Hurst Server Files

<make all hurst 8.37> =
<make hurst 8.38> <make hurst locals 8.39>(additionalmakes='additionalmakes') <make hurst files 8.40> <make hurst htmls 8.41> <make hurst xmls 8.42> <make hurst xsls 8.43> <make hurst cgis 8.44> <make hurst dirs 8.45>
Chunk referenced in 3.3 3.4
<make hurst 8.38> =
hurst: hurst.dirs hurst.locals
Chunk referenced in 8.37
<make hurst locals 8.39> =
hurst.locals: .hurst.locals additionalmakes $(MAKELOCALS) .hurst.locals: $(HURST-FILES) $(MAKELOCALS) @if [ -n "$(FILES)$(HTMLS)$(XMLS)$(XSLS)$(CGIS)" ] ; then \ $(HURST-RSYNC) -av $(HURST-FILES) $(HURST-SERVER)/ $(RS-FILTR) ; \ fi @echo "$(DATE) rsync'ed hurst locals" @touch .hurst.locals
Chunk referenced in 8.37
<make hurst files 8.40> =
.hurst.files: $(FILES) @if [ -n "$(FILES)" ] ; then \ $(HURST-RSYNC) -av $(FILES) $(HURST-SERVER)/ $(RS-FILTR) ; \ fi @echo "$(DATE) rsync'ed hurst files" @touch .hurst.files
Chunk referenced in 8.37
<make hurst htmls 8.41> =
.hurst.htmls: $(HURST-HTMLS) @if [ -n "$(HTMLS)" ] ; then \ $(HURST-RSYNC) -av $(HURST-HTMLS) $(HURST-SERVER)/ $(RS-FILTR) ; \ fi @echo "$(DATE) rsync'ed hurst htmls" @touch .hurst.htmls
Chunk referenced in 8.37
<make hurst xmls 8.42> =
.hurst.xmls: $(HURST-XMLS) @if [ -n "$(XMLS)" ] ; then \ $(HURST-RSYNC) -av $(HURST-XMLS) $(HURST-SERVER)/ $(RS-FILTR) ; \ fi @echo "$(DATE) rsync'ed hurst xmls" @touch .hurst.xmls
Chunk referenced in 8.37
<make hurst xsls 8.43> =
.hurst.xsls: $(HURST-XSLS) @if [ -n "$(XSLS)" ] ; then \ $(HURST-RSYNC) -av $(HURST-XSLS) $(HURST-SERVER)/ $(RS-FILTR) ; \ fi @echo "$(DATE) rsync'ed hurst xsls" @touch .hurst.xsls
Chunk referenced in 8.37
<make hurst cgis 8.44> =
.hurst.cgis: $(HURST-CGIS) @if [ -n "$(CGIS)" ] ; then \ $(HURST-RSYNC) -av $(HURST-CGIS) $(HURST-SERVER)/ $(RS-FILTR) ; \ fi @echo "$(DATE) rsync'ed hurst cgis" @touch .hurst.cgis
Chunk referenced in 8.37
<make hurst dirs 8.45> =
hurst.dirs: @if [ -n "$(DIRS)" ] ; then \ for d in $(DIRS) ; do \ export DIRINDENT=" $(DIRINDENT)" ; \ if [ `expr $$d : '\/'` -eq 0 ] ; then echo =$(RELCWD)/$$d ; \ else echo "$(DIRINDENT)$$d" ; fi ; \ (cd $$d ; make hurst) ; \ done ; \ fi
Chunk referenced in 8.37
<make hurst rail 8.46> =
.hurst.images: $(IMAGES) @if [ -n "$(IMAGES)" ] ;then \ $(HURST-RSYNC) -auv $(IMAGES) $(HURST-SERVER)/ $(RS-FILTR) ; \ fi @echo "$(DATE) rsync'ed hurst images" @touch .hurst.images .hurst.thumbs: $(THUMBS) @$(HURST-RSYNC) -auv thumb/ $(HURST-SERVER)/thumb/ $(RS-FILTR) @echo "$(DATE) rsync'ed hurst thumbs" @touch .hurst.thumbs
Chunk referenced in 3.4
<make hurst debug 8.47> =
hurst.debug: @echo "CGIS = $(CGIS)" @echo "DIRS = $(DIRS)" @echo "EXTRAS = $(EXTRAS)" @echo "FILES = $(FILES)" @echo "HURST-CGIS = $(HURST-CGIS)" @echo "HURST-FILES = $(HURST-FILES)" @echo "HURST-RSYNC = $(HURST-RSYNC)" @echo "HURST-XMLS = $(HURST-XMLS)" @echo "HURST-XSLS = $(HURST-XSLS)" @echo "IMAGES = $(IMAGES)" @echo "INDEXNEEDS = $(INDEXNEEDS)" @echo "INTROS = $(INTROS)" @echo "RELCWD = $(RELCWD)" @echo "SHUNTS = $(SHUNTS)" @echo "XMLS = $(XMLS)" @echo "XSLS = $(XSLS)"
Chunk referenced in 7.1

8.4 Making Work Server Files

<make all work 8.48> =
<make work 8.49> <make work locals 8.50>(additionalmakes='additionalmakes') <make work files 8.51> <make work htmls 8.52> <make work xmls 8.53> <make work xsls 8.54> <make work cgis 8.55> <make work dirs 8.56>
Chunk referenced in 3.3 3.4
<make work 8.49> =
work: work.dirs work.locals
Chunk referenced in 8.48
<make work locals 8.50> =
work.locals: .work.locals additionalmakes $(MAKELOCALS) .work.locals: $(WORK-FILES) $(MAKELOCALS) @if [ `hostname` != $(MURTOA) ] ; then \ if [ -n "$(FILES)$(HTMLS)$(XMLS)$(XSLS)$(CGIS)" ] ; then \ $(WORK-RSYNC) -av $(WORK-FILES) $(WORK-SERVER)/ $(RS-FILTR) ; \ fi ; \ fi @echo "$(DATE) rsync'ed work locals" @touch .work.locals
Chunk referenced in 8.48
<make work files 8.51> =
.work.files: $(FILES) @if [ `hostname` != $(MURTOA) ] ; then \ if [ -n "$(FILES)" ] ; then \ $(WORK-RSYNC) -av $(FILES) $(WORK-SERVER)/ $(RS-FILTR) ; \ fi ; \ fi @echo "$(DATE) rsync'ed work files" @touch .work.files
Chunk referenced in 8.48
<make work htmls 8.52> =
.work.htmls: $(WORK-HTMLS) @if [ `hostname` != $(MURTOA) ] ; then \ if [ -n "$(HTMLS)" ] ; then \ $(WORK-RSYNC) -av $(WORK-HTMLS) $(WORK-SERVER)/ $(RS-FILTR) ; \ fi ; \ fi @echo "$(DATE) rsync'ed work htmls" @touch .work.htmls
Chunk referenced in 8.48
<make work xmls 8.53> =
.work.xmls: $(WORK-XMLS) @if [ `hostname` != $(MURTOA) ] ; then \ if [ -n "$(XMLS)" ] ; then \ $(WORK-RSYNC) -av $(WORK-XMLS) $(WORK-SERVER)/ $(RS-FILTR) ; \ fi ; \ fi @echo "$(DATE) rsync'ed work xmls" @touch .work.xmls
Chunk referenced in 8.48
<make work xsls 8.54> =
.work.xsls: $(WORK-XSLS) @if [ `hostname` != $(MURTOA) ] ; then \ if [ -n "$(XSLS)" ] ; then \ $(WORK-RSYNC) -av $(WORK-XSLS) $(WORK-SERVER)/ $(RS-FILTR) ; \ fi ; \ fi @echo "$(DATE) rsync'ed work xsls" @touch .work.xsls
Chunk referenced in 8.48
<make work cgis 8.55> =
.work.cgis: $(WORK-CGIS) @if [ `hostname` != $(MURTOA) ] ; then \ if [ -n "$(CGIS)" ] ; then \ $(WORK-RSYNC) -av $(WORK-CGIS) $(WORK-SERVER)/ $(RS-FILTR) ; \ fi ; \ fi @echo "$(DATE) rsync'ed work cgis" @touch .work.cgis
Chunk referenced in 8.48
<make work dirs 8.56> =
work.dirs: @if [ `hostname` != $(MURTOA) ] ; then \ if [ -n "$(DIRS)" ] ; then \ for d in $(DIRS) ; do \ export DIRINDENT=" $(DIRINDENT)" ; \ if [ `expr $$d : '\/'` -eq 0 ] ; then echo =$(RELCWD)/$$d ; \ else echo "$(DIRINDENT)$$d" ; fi ; \ (cd $$d ; make work) ; \ done ; \ fi ; \ fi
Chunk referenced in 8.48
<make work rail 8.57> =
.work.images: $(IMAGES) @if [ `hostname` != $(MURTOA) ] ; then \ if [ -n "$(IMAGES)" ] ;then \ $(WORK-RSYNC) -auv $(IMAGES) $(WORK-SERVER)/ $(RS-FILTR) ; \ fi ; \ fi @echo "$(DATE) rsync'ed work images" @touch .work.images .work.thumbs: $(THUMBS) @$(WORK-RSYNC) -auv thumb/ $(WORK-SERVER)/thumb/ $(RS-FILTR) @echo "$(DATE) rsync'ed work thumbs" @touch .work.thumbs
Chunk referenced in 3.4
<make work debug 8.58> =
work.debug: @echo "CGIS = $(CGIS)" @echo "DIRS = $(DIRS)" @echo "EXTRAS = $(EXTRAS)" @echo "FILES = $(FILES)" @echo "IMAGES = $(IMAGES)" @echo "INDEXNEEDS = $(INDEXNEEDS)" @echo "INTROS = $(INTROS)" @echo "RELCWD = $(RELCWD)" @echo "SHUNTS = $(SHUNTS)" @echo "WORK-CGIS = $(WORK-CGIS)" @echo "WORK-FILES = $(WORK-FILES)" @echo "WORK-RSYNC = $(WORK-RSYNC)" @echo "WORK-XMLS = $(WORK-XMLS)" @echo "WORK-XSLS = $(WORK-XSLS)" @echo "XMLS = $(XMLS)" @echo "XSLS = $(XSLS)"
Chunk referenced in 7.1

8.5 Making Local Server Files

<make all local 8.59> =
<make local 8.60> <make local locals 8.61>(additionalmakes='additionalmakes') <make local files 8.62> <make local htmls 8.63> <make local xmls 8.64> <make local xsls 8.65> <make local cgis 8.66> <make local dirs 8.67>
Chunk referenced in 3.3 3.4
<make local 8.60> =
local: local.dirs local.locals
Chunk referenced in 8.59
<make local locals 8.61> =
local.locals: .local.locals additionalmakes $(MAKELOCALS) .local.locals: $(LOCAL-FILES) $(MAKELOCALS) @if [ -n "$(FILES)$(HTMLS)$(XMLS)$(XSLS)$(CGIS)" ] ; then \ $(LOCAL-RSYNC) -av $(LOCAL-FILES) $(LOCAL-SERVER)/ $(RS-FILTR) ; \ fi @echo "$(DATE) rsync'ed local locals" @touch .local.locals
Chunk referenced in 8.59
<make local files 8.62> =
.local.files: $(FILES) @if [ -n "$(FILES)" ] ; then \ $(LOCAL-RSYNC) -av $(FILES) $(LOCAL-SERVER)/ $(RS-FILTR) ; \ fi @echo "$(DATE) rsync'ed local files" @touch .local.files
Chunk referenced in 8.59
<make local htmls 8.63> =
.local.htmls: $(LOCAL-HTMLS) @if [ -n "$(HTMLS)" ] ; then \ $(LOCAL-RSYNC) -av $(LOCAL-HTMLS) $(LOCAL-SERVER)/ $(RS-FILTR) ; \ fi @echo "$(DATE) rsync'ed local htmls" @touch .local.htmls
Chunk referenced in 8.59
<make local xmls 8.64> =
.local.xmls: $(LOCAL-XMLS) @if [ -n "$(XMLS)" ] ; then \ $(LOCAL-RSYNC) -av $(LOCAL-XMLS) $(LOCAL-SERVER)/ $(RS-FILTR) ; \ fi @echo "$(DATE) rsync'ed local xmls" @touch .local.xmls
Chunk referenced in 8.59
<make local xsls 8.65> =
.local.xsls: $(LOCAL-XSLS) @if [ -n "$(XSLS)" ] ; then \ $(LOCAL-RSYNC) -av $(LOCAL-XSLS) $(LOCAL-SERVER)/ $(RS-FILTR) ; \ fi @echo "$(DATE) rsync'ed local xsls" @touch .local.xsls
Chunk referenced in 8.59
<make local cgis 8.66> =
.local.cgis: $(LOCAL-CGIS) @if [ -n "$(CGIS)" ] ; then \ $(LOCAL-RSYNC) -av $(LOCAL-CGIS) $(LOCAL-SERVER)/ $(RS-FILTR) ; \ fi @echo "$(DATE) rsync'ed local cgis" @touch .local.cgis
Chunk referenced in 8.59
<make local dirs 8.67> =
local.dirs: @if [ -n "$(DIRS)" ] ; then \ for d in $(DIRS) ; do \ export DIRINDENT=" $(DIRINDENT)" ; \ if [ `expr $$d : '\/'` -eq 0 ] ; then echo =$(RELCWD)/$$d ; \ else echo "$(DIRINDENT)$$d" ; fi ; \ (cd $$d ; make local) ; \ done ; \ fi
Chunk referenced in 8.59
<make local rail 8.68> =
.local.images: $(IMAGES) @if [ -n "$(IMAGES)" ] ;then \ $(LOCAL-RSYNC) -auv $(IMAGES) $(LOCAL-SERVER)/ $(RS-FILTR) ; \ fi @echo "$(DATE) rsync'ed local images" @touch .local.images .local.thumbs: $(THUMBS) @$(LOCAL-RSYNC) -auv thumb/ $(LOCAL-SERVER)/thumb/ $(RS-FILTR) @echo "$(DATE) rsync'ed local thumbs" @touch .local.thumbs
Chunk referenced in 3.4
<make local debug 8.69> =
local.debug: @echo "CGIS = $(CGIS)" @echo "DIRS = $(DIRS)" @echo "EXTRAS = $(EXTRAS)" @echo "FILES = $(FILES)" @echo "IMAGES = $(IMAGES)" @echo "INDEXNEEDS = $(INDEXNEEDS)" @echo "INTROS = $(INTROS)" @echo "LOCAL-CGIS = $(LOCAL-CGIS)" @echo "LOCAL-FILES = $(LOCAL-FILES)" @echo "LOCAL-XMLS = $(LOCAL-XMLS)" @echo "LOCAL-XSLS = $(LOCAL-XSLS)" @echo "RELCWD = $(RELCWD)" @echo "SHUNTS = $(SHUNTS)" @echo "XMLS = $(XMLS)" @echo "XSLS = $(XSLS)"
Chunk referenced in 7.1

8.6 Making Clean

<make all clean 8.70> =
clean: -rm -rf $(TMP-CSSE) -rm .csse* virgin.all: find . \( -name .csse\* -or \ -name .work\* -or \ -name .home\* -or \ -name .hurst\* -or \ -name .local\* \) -exec rm {} \; virgin.local: find . -name .local\* -exec rm {} \;
Chunk referenced in 3.3

9. Indices

File Name Defined in
MakeWeb 3.3
MakeWebRail 3.4
MakeXLP 3.2
makefile 3.1
Chunk Name Defined in Used in
Current Version 10.1
Date 10.2
basic variable definitions 4.3 3.1, 3.2
convert a cgi 8.24 8.23, 8.23
csse machine definitions 5.2 5.1
define common variables 4.7 4.5, 4.6
define rail variables 4.6 3.4
define variables 4.4, 4.5 3.3
file definitions 6.1 3.1
home machine definitions 5.3 5.1
hurst machine definitions 5.4 5.1
issue variable warnings 4.2 3.3, 3.4
local machine definitions 5.6 5.1
machine definitions 5.1 3.1, 3.3, 3.4
make all 8.7 3.3, 3.4
make all clean 8.70 3.3
make all csse 8.8 3.3, 3.4
make all home 8.26 3.3, 3.4
make all hurst 8.37 3.3, 3.4
make all local 8.59 3.3, 3.4
make all work 8.48 3.3, 3.4
make csse 8.10 8.8
make csse cgis 8.16 8.8
make csse debug 8.25 7.1
make csse dirs 8.17 8.8
make csse files 8.12 8.8
make csse htmls 8.13 8.8
make csse locals 8.11 8.8
make csse rail 8.18 3.4
make csse xmls 8.14 8.8
make csse xsls 8.15 8.8
make debug 7.1 3.3, 3.4
make home 8.27 8.26
make home cgis 8.33 8.26
make home debug 8.36 7.1
make home dirs 8.34 8.26
make home files 8.29 8.26
make home htmls 8.30 8.26
make home locals 8.28 8.26
make home rail 8.35 3.4
make home xmls 8.31 8.26
make home xsls 8.32 8.26
make hurst 8.38 8.37
make hurst cgis 8.44 8.37
make hurst debug 8.47 7.1
make hurst dirs 8.45 8.37
make hurst files 8.40 8.37
make hurst htmls 8.41 8.37
make hurst locals 8.39 8.37
make hurst rail 8.46 3.4
make hurst xmls 8.42 8.37
make hurst xsls 8.43 8.37
make local 8.60 8.59
make local cgis 8.66 8.59
make local debug 8.69 7.1
make local dirs 8.67 8.59
make local files 8.62 8.59
make local htmls 8.63 8.59
make local locals 8.61 8.59
make local rail 8.68 3.4
make local xmls 8.64 8.59
make local xsls 8.65 8.59
make tmp csse cgis 8.23 8.8
make tmp csse directory 8.9 8.8
make tmp csse dtds 8.21 8.8
make tmp csse htmls 8.19 8.8
make tmp csse xmls 8.20 8.8
make tmp csse xsls 8.22 8.8
make work 8.49 8.48
make work cgis 8.55 8.48
make work debug 8.58 7.1
make work dirs 8.56 8.48
make work files 8.51 8.48
make work htmls 8.52 8.48
make work locals 8.50 8.48
make work rail 8.57 3.4
make work xmls 8.53 8.48
make work xsls 8.54 8.48
make-dvi 8.5 3.1, 3.2
make-html 8.3 3.1, 3.2
make-pdf 8.6 3.1, 3.2
make-tangle 8.1 3.1, 3.2
make-tex 8.4 3.1, 3.2
make-webdoc 8.2 3.1
rsync definitions 4.1 3.3, 3.4
work machine definitions 5.5 5.1
Identifier Defined in Used in
DIRINDENT 4.4 4.4, 8.7, 8.7, 8.7, 8.17, 8.17, 8.17, 8.34, 8.34, 8.34, 8.45, 8.45, 8.45, 8.56, 8.56, 8.56, 8.67, 8.67, 8.67
HOME-SERVER 5.3 5.3, 8.28, 8.29, 8.30, 8.31, 8.32, 8.33, 8.35, 8.35
HURST-SERVER 5.4 5.4, 8.39, 8.40, 8.41, 8.42, 8.43, 8.44, 8.46, 8.46
LOCAL-SERVER 5.6 5.6, 8.61, 8.62, 8.63, 8.64, 8.65, 8.66, 8.68, 8.68
MAKELOCALS 4.6 4.6
WORK-SERVER 5.5 5.5, 8.50, 8.51, 8.52, 8.53, 8.54, 8.55, 8.57, 8.57

Document History

20080824:153616 ajh 1.3.0 fixed bug in passing through formal parameters
20100210:142246 ajh 1.3.1 added fix to avoid syncing work from work
20100703:180009 ajh 1.3.2 updated RSYNC variables to make local to each destination machine
20101213:091644 ajh 1.3.3 moved work computer from dimboola to murtoa
<Current Version 10.1> = 1.3.3
<Date 10.2> = 20101213:091644