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
|
# Mark's MUd Client
############################################################
# Mmucl installs itself under BASE_DIR
BASE_DIR = $(DESTDIR)/usr
# The startup script, mmucl, is put in BIN_DIR
# Everything else is put in LIB_DIR
LIB_DIR = $(BASE_DIR)/share/mmucl
BIN_DIR = $(BASE_DIR)/games
# Need this for mmucl to build correctly
# (must be the run-time path)
MMUCL_LIB_DIR = /usr/share/mmucl
# Which tclsh to use.
TCLSH = /usr/bin/tclsh8.4
# Where info files are stored.
# INFO_DIR = $(BASE_DIR)/share/info
# Location of install-info
INSTALL_INFO = /usr/sbin/install-info
MAKEINFO = /usr/bin/makeinfo
# Location of install
INSTALL = install
###########################################################
# Don't edit anything beyond this point.
VERSION = 1.5.1
.PHONY: install all clean gzip dist rpm test
all: mmucl mmucl.tcl
install: mmucl
$(INSTALL) -d $(LIB_DIR)/lib $(LIB_DIR)/interface $(LIB_DIR)/images
$(INSTALL) -d $(LIB_DIR)/examples $(BIN_DIR) $(INFO_DIR)
$(INSTALL) -cm 0644 lib/*.tcl $(LIB_DIR)/lib
chmod 0755 $(LIB_DIR)/lib/ntkinfo.tcl
$(INSTALL) -cm 0644 images/*.gif $(LIB_DIR)/images
$(INSTALL) -cm 0644 interface/*.tcl $(LIB_DIR)/interface
$(INSTALL) -cm 0644 examples/mmucl.rc $(LIB_DIR)/examples
$(INSTALL) -cm 0755 mmucl $(BIN_DIR)
# Handled by debhelper
#$(INSTALL) -cm 0644 mmucl.info $(INFO_DIR)
#$(INSTALL_INFO) $(INFO_DIR)/mmucl.info --info-dir=$(INFO_DIR)
mmucl: Makefile init
echo "#! /bin/sh" > mmucl
echo "# restart with tclsh \\" >> mmucl
echo "exec $(TCLSH)" '"$$0" "$$@"' >> mmucl
echo "" >> mmucl
echo "array set config {" >> mmucl
echo "lib_dir {$(MMUCL_LIB_DIR)}" >> mmucl
echo "version {$(VERSION)}" >> mmucl
echo "}" >> mmucl
cat init >> mmucl
mmucl.tcl: Makefile init
echo "array set config {" > mmucl.tcl
echo "lib_dir ." >> mmucl.tcl
echo "version {$(VERSION)}" >> mmucl.tcl
echo "}" >> mmucl.tcl
cat init >> mmucl.tcl
mmucl.html: mmucl.texinfo
$(MAKEINFO) --html --no-split mmucl.texinfo
clean:
rm -f mmucl mmucl.html mmucl.tcl
gzip:
cd ..; tar cfvz mmucl-$(VERSION).tar.gz mmucl-$(VERSION) \
--exclude CVS --dereference
rpm: gzip
cp ../mmucl-$(VERSION).tar.gz /usr/src/redhat/SOURCES
rpm -bb mmucl.spec
test:
$(TCLSH) mmucl.tcl --exec "cd test; source test.tcl"
dist: clean mmucl.tcl mmucl.info mmucl.html rpm
|