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 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
|
# $Id: Makefile,v 35000.22 1999/01/31 00:28:09 hawkeye Exp $
########################################################################
#
# TinyFugue - programmable mud client
# Copyright (C) 1994 - 1999 Ken Keys
#
# TinyFugue (aka "tf") is protected under the terms of the GNU
# General Public Licence. See the file "COPYING" for details.
#
# DO NOT EDIT THIS FILE. To change the default configuration,
# see "README" and edit "Config".
#
########################################################################
# unix Makefile.
# This is invoked from unixmake, so the working directory is the root.
SHELL = /bin/sh
default: install
# If the next rule were first, a few strange versions of make would try
# to make "install", "all", AND "files", instead of just "install".
install all files: src/Makefile src/config.h _log
cd ./src; $(MAKE) $@ 2>&1
reconfigure: unconfigure install
unconfigure:
rm -f src/Makefile src/config.h
config src/Makefile src/config.h: Makefile unix/Config unix/tfconfig unix/unix.mak
@rm -f ../src/Makefile ../src/config.h ../Build.log tfconfig.log
# Use tfconfig to create config files. If it fails, we don't exit
# now, we want to create Build.log first. Instead, we rm src/Makefile
# but not src/config.h; this lets 'install' continue on to '_log'.
# ('install' probably got here via the src/Makefile dependancy; if we
# rm'd src/config.h, then 'install' would come back here again for the
# src/config.h dependancy.) Then, '_log' will create Build.log and,
# if an error occured in this rule, '_log' will exit.
# Note: tee eats exit code of tfconfig, so we couldn't use it anyway.
# Note: some buggy versions of bash can't handle using descriptor 3 here.
-@cd unix; \
{ ./tfconfig $(TFVER) 2>&1 4>../src/config.h 5>vars.mak || \
rm -f ../src/Makefile; } | \
tee tfconfig.log
_log:
-@{ cat unix/tfconfig.log; echo; } > Build.log
# Exit now if there were errors in tfconfig.
@test -f src/Makefile && test -f src/config.h
# No errors. Save info in Build.log, and continue.
-@{ cat unix/vars.mak; echo; } >> Build.log
-@{ cat src/config.h; echo; } >> Build.log
clean:
cd ./src; rm -f *.o Makefile core* exitmsg config.h typescript*
cd ./unix; rm -f vars.mak *.log functest* libtest* test.c a.out
distclean: clean
rm -f Build.log
# cd ./tf-lib; rm -f tf-help.idx
cd ./src; rm -f tf makehelp tags
cd ./src; rm -f tf.pixie* tf.Addrs* tf.Counts*
spotless cleanest veryclean: distclean
cd ./src; rm -f tf.1.catman
uninstall:
cd ./src; $(MAKE) uninstall
srcdist:
cd ./src; $(MAKE) -f ../unix/unix.mak dist
help ./tf-lib/tf-help: _always_
if cd ./help; then \
echo "Making help file..."; \
$(MAKE) && mv tf-help ../tf-lib; \
else \
true; \
fi
tar ../tf-$(TFVER).tar: ./src/*.[ch] srcdist distclean
@-cd ./src; echo Possible garbage in src: \
`ls *in *out *err *foo* *bar* *.new *.old *.ok *.c.* *.tf *[0-9] \
2>/dev/null`
@-echo Possible garbage in top: \
`ls *.gz *.Z *.zip 2>/dev/null`
@wd=`pwd`; [ "`basename $$wd`" = "work" ] || \
echo 'WARNING: You are not in the "work" directory.'
@echo 'Press return to archive tf-$(TFVER).'
@read foo
rm -rf ../tf-$(TFVER)
-for dir in "/" /src/ /src/regexp/ /tf-lib/ /unix/ /os2/ /win32/; do \
mkdir ../tf-$(TFVER)$${dir}; \
cp .$${dir}* ../tf-$(TFVER)$${dir}; \
chmod ugo+r ../tf-$(TFVER)$${dir}*; \
done
chmod ugo+r ../tf-$(TFVER)
rm -f ../tf-$(TFVER)/src/dmalloc.c
cd ..; tar -cf tf-$(TFVER).tar tf-$(TFVER)
dist: ./tf-lib/tf-help ../tf-$(TFVER).tar ../tf-$(TFVER)-help.tar
cd ..; gzip tf-$(TFVER).tar
cd ..; zip -qlr tf-$(TFVER).zip tf-$(TFVER)
cd ..; chmod ugo+r tf-$(TFVER).tar.gz tf-$(TFVER).zip
cd ..; gzip tf-$(TFVER)-help.tar
@echo ""; echo "### Don't forget to assign a cvs tag."
gzdist: ./tf-lib/tf-help ../tf-$(TFVER).tar
cd ..; gzip tf-$(TFVER).tar
tarhelp ../tf-$(TFVER)-help.tar: help
@wd=`pwd`; [ "`basename $$wd`" = "work" ] || \
echo 'WARNING: You are not in the "work" directory.'
@echo 'Press return to archive tf-$(TFVER)-help.'
@read foo
rm -rf ../tf-$(TFVER)-help;
for dir in "/" /commands/ /topics/; do \
mkdir ../tf-$(TFVER)-help$${dir}; \
cp help/$${dir}*.html ../tf-$(TFVER)-help$${dir}; \
chmod ugo+r ../tf-$(TFVER)-help$${dir}*; \
done
chmod ugo+r ../tf-$(TFVER)-help
cd ..; tar -cf tf-$(TFVER)-help.tar tf-$(TFVER)-help
tcp.com:
cd ..; scp tf-$(TFVER).tar.gz tf-$(TFVER).zip tf-$(TFVER)-help.tar.gz \
tcp.com:
local:
TFDEV_TF='/usr/local/bin/tf-$(TFVER)' \
TFDEV_LIBDIR='/usr/local/lib/tf-$(TFVER)-lib' \
TFDEV_SYMLINK='/usr/local/bin/tf' ./unixmake config
devlocal:
CC=tfcc TFDEV_CCFLAGS='-g -DLOCALITY' TFDEV_STRIP=':' \
TFDEV_TF='/usr/local/bin/tf-$(TFVER)' \
TFDEV_LIBDIR='/usr/local/lib/tf-$(TFVER)-lib' \
TFDEV_SYMLINK='/usr/local/bin/tf' ./unixmake config
devhome:
CC=tfcc TFDEV_CCFLAGS='-g' TFDEV_TF="$$HOME/bin/tf-$(TFVER)" \
TFDEV_LIBDIR="$$HOME/lib/tf-$(TFVER)-lib" TFDEV_STRIP=':' \
TFDEV_SYMLINK="$$HOME/bin/tf" \
TFDEV_QUIET=yes TFDEV_DMALLOC=0 ./unixmake config
dev:
CC=tfcc TFDEV_CCFLAGS='-g' TFDEV_TF="$$HOME/bin/tf-$(TFVER)" \
TFDEV_LIBDIR="$$HOME/lib/tf-$(TFVER)-lib" TFDEV_STRIP=':' \
TFDEV_QUIET=yes TFDEV_DMALLOC=0 ./unixmake config
laurel: devhome files
cp CHANGES $$HOME/www/tf/
_always_:
# hack to get around a bug in BSDi (and FreeBSD?) make.
make:
|