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.
RevLine 
[16596]1# $Id: Makefile,v 1.13 2001-08-22 16:41:56 ghudson Exp $
[8946]2
3SHELL=/bin/sh
4ATHETCDIR=/usr/athena/etc
5ATHLIBDIR=/usr/athena/lib
6UPDATE=${ATHLIBDIR}/update
[9465]7CFLAGS=-g
[8946]8
9all: fix_owners rvdinfo
[12274]10        cd os/${OS} && ${MAKE} $@
[8946]11
12fix_owners: fix_owners.o
13        ${CC} -o $@ fix_owners.o
14
[15881]15rvdinfo:
[15942]16        version="$$ATHENA_MAJOR_VERSION.$$ATHENA_MINOR_VERSION"; \
[15881]17        version="$$version.$$ATHENA_PATCH_VERSION"; \
[15942]18        echo "Athena RVD ($$ATHENA_HOSTTYPE) Version $$version `date`" > $@
[8946]19
20check:
[12274]21        cd os/${OS} && ${MAKE} $@
[8946]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:
[10647]27        @if [ -r ${DESTDIR}/.rvdinfo ]; then \
28                dvers=`sed -e 's/^.* \([0-9]*\.[0-9]*\)\..*/\1/' \
29                        ${DESTDIR}/.rvdinfo`; \
[15881]30                vers=$$ATHENA_MAJOR_VERSION.$$ATHENA_MINOR_VERSION; \
31                if [ "$$dvers" != "$$vers" ]; then \
[10647]32                        echo "Error: major or minor version mismatch."; \
33                        exit 1; \
34                fi; \
35        fi
[12274]36        cd os/${OS} && ${MAKE} $@
[12279]37        mkdir -p ${DESTDIR}${ATHLIBDIR}/stats
[8946]38        rm -f ${DESTDIR}/patch
[15881]39        vers="$$ATHENA_MAJOR_VERSION.$$ATHENA_MINOR_VERSION"; \
[8946]40                ln -s /afs/athena.mit.edu/system/patch-$$vers/${ATHENA_SYS} \
[15881]41                 ${DESTDIR}/patch
[8946]42        install -c -m 444 rvdinfo ${DESTDIR}/.rvdinfo
43        ./fix_owners ${DESTDIR}
[14092]44        chmod go-w ${DESTDIR}
[8946]45        ${DESTDIR}${ATHETCDIR}/track -w -F${DESTDIR} -W${DESTDIR}${ATHLIBDIR} \
46                -s stats/sys_rvd slists/sys_rvd
[16596]47        [ ! -r ${DESTDIR}${ATHLIBDIR}/slists/sys_rvd.big ] || \
[16560]48                ${DESTDIR}${ATHETCDIR}/track -w -F${DESTDIR} \
49                -W${DESTDIR}${ATHLIBDIR} \
50                -s stats/sys_rvd.big slists/sys_rvd.big
[8946]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:
[9465]57        rm -f fix_owners.o fix_owners rvdinfo FILES
[12274]58        cd os/${OS} && ${MAKE} $@
[8946]59
60distclean:
[9465]61        rm -f fix_owners.o fix_owners rvdinfo FILES
[12274]62        cd os/${OS} && ${MAKE} $@
Note: See TracBrowser for help on using the repository browser.