source: trunk/packs/build/finish/Makefile @ 16596

Revision 16596, 1.9 KB checked in by ghudson, 23 years ago (diff)
Use [ ! foo ] || bar instead of [ foo ] && bar, since the latter fails when foo isn't true.
Line 
1# $Id: Makefile,v 1.13 2001-08-22 16:41:56 ghudson Exp $
2
3SHELL=/bin/sh
4ATHETCDIR=/usr/athena/etc
5ATHLIBDIR=/usr/athena/lib
6UPDATE=${ATHLIBDIR}/update
7CFLAGS=-g
8
9all: fix_owners rvdinfo
10        cd os/${OS} && ${MAKE} $@
11
12fix_owners: fix_owners.o
13        ${CC} -o $@ fix_owners.o
14
15rvdinfo:
16        version="$$ATHENA_MAJOR_VERSION.$$ATHENA_MINOR_VERSION"; \
17        version="$$version.$$ATHENA_PATCH_VERSION"; \
18        echo "Athena RVD ($$ATHENA_HOSTTYPE) Version $$version `date`" > $@
19
20check:
21        cd os/${OS} && ${MAKE} $@
22
23# We generate FILES at install time, which is a violation of the normal
24# build system rules.  It needs to wait until after everything is put
25# in place on the packs, including the other things we install.
26install:
27        @if [ -r ${DESTDIR}/.rvdinfo ]; then \
28                dvers=`sed -e 's/^.* \([0-9]*\.[0-9]*\)\..*/\1/' \
29                        ${DESTDIR}/.rvdinfo`; \
30                vers=$$ATHENA_MAJOR_VERSION.$$ATHENA_MINOR_VERSION; \
31                if [ "$$dvers" != "$$vers" ]; then \
32                        echo "Error: major or minor version mismatch."; \
33                        exit 1; \
34                fi; \
35        fi
36        cd os/${OS} && ${MAKE} $@
37        mkdir -p ${DESTDIR}${ATHLIBDIR}/stats
38        rm -f ${DESTDIR}/patch
39        vers="$$ATHENA_MAJOR_VERSION.$$ATHENA_MINOR_VERSION"; \
40                ln -s /afs/athena.mit.edu/system/patch-$$vers/${ATHENA_SYS} \
41                 ${DESTDIR}/patch
42        install -c -m 444 rvdinfo ${DESTDIR}/.rvdinfo
43        ./fix_owners ${DESTDIR}
44        chmod go-w ${DESTDIR}
45        ${DESTDIR}${ATHETCDIR}/track -w -F${DESTDIR} -W${DESTDIR}${ATHLIBDIR} \
46                -s stats/sys_rvd slists/sys_rvd
47        [ ! -r ${DESTDIR}${ATHLIBDIR}/slists/sys_rvd.big ] || \
48                ${DESTDIR}${ATHETCDIR}/track -w -F${DESTDIR} \
49                -W${DESTDIR}${ATHLIBDIR} \
50                -s stats/sys_rvd.big slists/sys_rvd.big
51        chown 0 ${DESTDIR}${ATHLIBDIR}/stats/*
52        chgrp 0 ${DESTDIR}${ATHLIBDIR}/stats/*
53        (cd ${DESTDIR} && find . -print | sort) > FILES
54        install -c -m 444 -o 0 -g 0 FILES ${DESTDIR}${UPDATE}/FILES
55
56clean:
57        rm -f fix_owners.o fix_owners rvdinfo FILES
58        cd os/${OS} && ${MAKE} $@
59
60distclean:
61        rm -f fix_owners.o fix_owners rvdinfo FILES
62        cd os/${OS} && ${MAKE} $@
Note: See TracBrowser for help on using the repository browser.