File: Makefile

package info (click to toggle)
phplib 1%3A7.3dev-3.1
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,752 kB
  • ctags: 247
  • sloc: php: 6,659; perl: 323; pascal: 157; makefile: 102; sh: 7
file content (54 lines) | stat: -rw-r--r-- 1,647 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# 
# PHPLIB MAKEFILE
#
# $Id: Makefile,v 1.10 1999/07/16 22:29:57 kk Exp $
# 
# Release early, release often - `make dist` will create for you
# four different archives for the current revision with only one command
#
# Copyright (c) 1998,1999 Sascha Schumann <sascha@schumann.cx>
#
# some other goodies (written up, because I tend to forget them...)
# 
# cvs export -D now -d dist php-lib
# (will export (without CVS directories) the module php-lib at its
# current state into directory dist)
#
# cvs rtag -D now PHPLIB-X.XX php-lib
# (assign the current revisions a special tag)
#

REVISION=$(shell cat VERSION)

DISTDIR=phplib-${REVISION}

BSF=phplib-${REVISION}

all:
	@echo ""
	@echo "You have not read the documentation."
	@echo "Please read the documentation in the doc/ directory."
	@echo ""
	@echo "Thank you for using PHPLIB"
	@echo ""

dist:
	@if [ -d ${DISTDIR} ] ; then echo "DISTDIR exists already"; exit 1; fi
	@if [ -e ".filelist" ] ; then echo "stalled .filelist?"; exit 1; fi
	ls > .filelist
	mkdir ${DISTDIR}
	chmod 755 ${DISTDIR}
	cp -Raf `cat .filelist` ${DISTDIR}
	sed -e 's/= "kk";/= "example_user";/' -e 's/= "test";/= "example_database";/' < php/local.inc > ${DISTDIR}/php/local.inc
	echo "RELEASE ${REVISION}" > ${DISTDIR}/VERSION
	rm .filelist
	find ${DISTDIR} -name CVS -type d | xargs rm -rf 
	find ${DISTDIR} -name \*~ -type f | xargs rm -rf 
	${MAKE} -C ${DISTDIR}/doc doc
	tar cvf ${BSF}.tar ${DISTDIR} > /dev/null
	gzip -c9 ${BSF}.tar > ${BSF}.tar.gz
	bzip2 -c9 ${BSF}.tar > ${BSF}.tar.bz2
	zip -r9 ${BSF}.zip ${DISTDIR} &> /dev/null
	shar -z ${DISTDIR} > ${BSF}.shar 2>/dev/null
	rm ${BSF}.tar
	rm -rf ${DISTDIR}