[16596] | 1 | # $Id: Makefile,v 1.13 2001-08-22 16:41:56 ghudson Exp $ |
---|
[8946] | 2 | |
---|
| 3 | SHELL=/bin/sh |
---|
| 4 | ATHETCDIR=/usr/athena/etc |
---|
| 5 | ATHLIBDIR=/usr/athena/lib |
---|
| 6 | UPDATE=${ATHLIBDIR}/update |
---|
[9465] | 7 | CFLAGS=-g |
---|
[8946] | 8 | |
---|
| 9 | all: fix_owners rvdinfo |
---|
[12274] | 10 | cd os/${OS} && ${MAKE} $@ |
---|
[8946] | 11 | |
---|
| 12 | fix_owners: fix_owners.o |
---|
| 13 | ${CC} -o $@ fix_owners.o |
---|
| 14 | |
---|
[15881] | 15 | rvdinfo: |
---|
[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 | |
---|
| 20 | check: |
---|
[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. |
---|
| 26 | install: |
---|
[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 | |
---|
| 56 | clean: |
---|
[9465] | 57 | rm -f fix_owners.o fix_owners rvdinfo FILES |
---|
[12274] | 58 | cd os/${OS} && ${MAKE} $@ |
---|
[8946] | 59 | |
---|
| 60 | distclean: |
---|
[9465] | 61 | rm -f fix_owners.o fix_owners rvdinfo FILES |
---|
[12274] | 62 | cd os/${OS} && ${MAKE} $@ |
---|