Newer
Older
twander / makefile
@tundra tundra on 11 Jan 2005 1 KB First full working version
# Build a release of twander using 'make'
# $Id: makefile,v 1.101 2005/01/11 10:24:36 tundra Exp $

# Syntax is: make target VER=version-number

PROGNAME=twander


COLOR=
#COLOR=--color

DIR=twander-${VER}
PROGFILES=${PROGNAME}.py 
BASEFILES=${PROGNAME}.1
SUPPFILES=Makefile ${PROGNAME}-license.txt .${PROGNAME} READ-1ST.txt WHATSNEW.txt
DOCFILES=CHANGELOG.txt ${PROGNAME}.html ${PROGNAME}.pdf ${PROGNAME}.ps ${PROGNAME}.py.ps ${PROGNAME}.txt ${PROGNAME}.1.gz


# Clean Up

clean:
	@rm -f ${PROGFILES} ${BASEFILES} ${SUPPFILES} ${DOCFILES}

# Checkout The Required Files

${PROGFILES}:
	@co -r${VER} $*

${BASEFILES} ${SUPPFILES}:
	@co $*

# Pretty Print The Source Code

${PROGNAME}.py.ps: ${PROGNAME}.py
	@enscript -Epython -fCourier8 -i2 -L77 -C --mark-wrapped-lines=arrow ${COLOR}  -p${PROGNAME}.py.ps ${PROGNAME}.py


# Build Documentation

CHANGELOG.txt:
	@rlog ${PROGNAME}.py >CHANGELOG.txt

${PROGNAME}.html: ${PROGNAME}.1
	@manserver ${PROGNAME}.1 >${PROGNAME}.html

${PROGNAME}.ps: ${PROGNAME}.1
	@groff -man -Tps ${PROGNAME}.1 >${PROGNAME}.ps

${PROGNAME}.txt: ${PROGNAME}.1
	@groff -man -Tascii ${PROGNAME}.1 | col -xb >${PROGNAME}.txt

${PROGNAME}.1.gz: ${PROGNAME}.1
	@gzip ${PROGNAME}.1

${PROGNAME}.pdf: ${PROGNAME}.ps
	@gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=${PROGNAME}.pdf ${PROGNAME}.ps

docs: ${SUPPFILES} ${DOCFILES} 
	@chmod 644 ${DOCFILES} ${SUPPFILES}
	@chmod 644 *.gz *.txt
	@flip -u *txt



# Package A Release

release: docs
	@mkdir ${DIR}
	@chmod 755 ${PROGFILES}
	@mv ${PROGFILES} ${SUPPFILES} ${DOCFILES} ${DIR}
	@tar -czvf ${DIR}.tar.gz ${DIR}
	@rm -rf ${DIR}
	@mv ${DIR}.tar.gz Releases