-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.in
94 lines (74 loc) · 2.88 KB
/
Makefile.in
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Top-level Makefile for Survivor
# Version: $Revision: 0.19 $
# Date: $Date: 2007/04/03 11:37:23 $
#
# Copyright (c) 2002 - 2006
# The Trustees of Columbia University in the City of New York
# Academic Information Systems
#
# License restrictions apply, see doc/license.html for details.
include Makefile.inc
INSTDIR=${DESTDIR}@prefix@
PKGVERSION=@PACKAGE_VERSION@
ALLDIRS=libdebug libparse822 libparsecgi libparsexml libsrv libcm libui \
modules/check modules/common modules/fix modules/format modules/report \
modules/transmit modules/transport modules/webauth doc remote cgi cli \
gateway scheduler
INSTCSUBDIRS=${INSTDIR}/sbin ${INSTDIR}/mod ${INSTDIR}/mod/check \
${INSTDIR}/mod/common ${INSTDIR}/mod/common/Survivor ${INSTDIR}/mod/fix
INSTSUBDIRS=${INSTDIR}/bin ${INSTCSUBDIRS} ${INSTDIR}/mod/format \
${INSTDIR}/mod/report ${INSTDIR}/mod/transmit ${INSTDIR}/mod/transport \
${INSTDIR}/mod/webauth ${INSTDIR}/html ${INSTDIR}/html/doc ${INSTDIR}/html/sw
## Build rules
##############
all:
for i in ${ALLDIRS} ; do (cd $$i && echo '>>' $$i && ${MAKE} all) ;\
done
distribution: veryclean
mkdir ../dist/survivor-${PKGVERSION}
/usr/bin/tar cfFX - tar.exc . | (cd ../dist/survivor-${PKGVERSION} ; /usr/bin/tar xfBp -)
./util/docbuilder.pl ./doc ../dist/survivor-${PKGVERSION}/doc ${PKGVERSION}
./util/logbuilder.sh . ../dist/survivor-${PKGVERSION}
(cd ../dist ; tar cf survivor-${PKGVERSION}.tar survivor-${PKGVERSION} ; \
gzip survivor-${PKGVERSION}.tar)
rm -fr ../dist/survivor-${PKGVERSION}
## Install rules
################
do-install:
for i in ${INSTDIR} ${INSTSUBDIRS} ;\
do ( [ -z "$$i" ] || [ -d $$i ] || mkdir $$i ; chown @INST_USER@ $$i ; chgrp @INST_GROUP@ $$i ; chmod 755 $$i ) ; done
for i in ${ALLDIRS} ; \
do (cd $$i && echo '>>' $$i && ${MAKE} install) ;\
done
do-install-remote:
for i in ${INSTDIR} ${INSTCSUBDIRS} ;\
do ( [ -z "$$i" ] || [ -d $$i ] || mkdir $$i ; chown @INST_USER@ $$i ; chgrp @INST_GROUP@ $$i ; chmod 755 $$i ) ; done
for i in ${ALLDIRS} ; \
do (cd $$i && echo '>>' $$i && ${MAKE} install-remote) ;\
done
instuser:
touch /tmp/.survivor.ownertest
chown @INST_USER@ /tmp/.survivor.ownertest
chgrp @INST_GROUP@ /tmp/.survivor.ownertest
rm -f /tmp/.survivor.ownertest
install: instuser do-install
install-remote: instuser do-install-remote
## Hygienic rules
#################
clean:
for i in ${ALLDIRS} ; do (cd $$i && echo '>>' $$i && ${MAKE} clean) ;\
done
veryclean:
rm -f *~
for i in ${ALLDIRS} ; do (cd $$i && echo '>>' $$i && ${MAKE} veryclean) ;\
done
find . -name \*~ -exec rm {} \;
## RCS rules
############
checkedin:
for i in `find . -name \*,v | sed 's/,v//' | sed 's/RCS\///'`; do if [ ! -f $$i ]; then echo $$i does not exist ; fi ; done
# These produce filenames twice, not sure why
checkedout:
find . -type f -exec rlog -L -R {} \; 2>/dev/null | sort | uniq
unregistered:
find . -type f -exec rlog -L -R {} \; 1>/dev/null | sort | uniq