First pass at a hints-based build system to augment (not replace) the existing
build system. Anyone who wants to do a build from sys/unix and doesn't want to figure this out just needs to do: sh setup.sh hints/unix instead of: sh setup.sh and then continue on as usual. New files: sys/unix/NewInstall.unx - the new directions sys/unix/hints/* - the hints files. There will be more later. sys/unix/mkmkfile.sh - helper for setup.sh Summary of changes: see NewInstall.unx for info on the new build system introduction of various preprocessor symbols to turn options off that are defaulted on historically comment out nethackrc (and similar) entries that still use the old symbol syntax. commenting out of Makefile.* lines that now come from hints/unix GAMEDIR is replaced with HACKDIR so the Makefiles and the C source agree. Note that I have NOT changed the docs and/or Makefiles for be, msdos, os2, vms, or winnt. If port maintainers don't then I will, but I can't test those ports. nethack.sh now handles the font path automatically
This commit is contained in:
@@ -1,41 +1,24 @@
|
||||
#!/bin/sh
|
||||
# Copy files to their correct locations.
|
||||
# SCCS Id: @(#)macosx 3.5 2007/12/12
|
||||
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
#
|
||||
# If arguments are given, try symbolic link first. This is not the default
|
||||
# so that most people will have the distribution versions stay around so
|
||||
# subsequent patches can be applied. People who pay enough attention to
|
||||
# know there's a non-default behavior are assumed to pay enough attention
|
||||
# to keep distribution versions if they modify things.
|
||||
# Build and install makefiles.
|
||||
#
|
||||
# Argument is the hints file to use (or no argument for traditional setup).
|
||||
|
||||
# Were we started from the top level? Cope.
|
||||
if [ -f sys/unix/Makefile.top ]; then cd sys/unix; fi
|
||||
|
||||
if [ $# -gt 0 ] ; then
|
||||
# First, try to make a symbolic link.
|
||||
#
|
||||
ln -s Makefile.top Makefile >/dev/null 2>&1
|
||||
if [ $? -eq 0 ] ; then
|
||||
case "x$1" in
|
||||
x) hints=/dev/null
|
||||
;;
|
||||
*) hints=$1
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Lucky you! Symbolic links."
|
||||
rm -f Makefile
|
||||
|
||||
umask 0
|
||||
ln -s sys/unix/Makefile.top ../../Makefile
|
||||
ln -s ../sys/unix/Makefile.dat ../../dat/Makefile
|
||||
ln -s ../sys/unix/Makefile.doc ../../doc/Makefile
|
||||
ln -s ../sys/unix/Makefile.src ../../src/Makefile
|
||||
ln -s ../sys/unix/Makefile.utl ../../util/Makefile
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
#
|
||||
# Otherwise...
|
||||
|
||||
echo "Copying Makefiles."
|
||||
|
||||
cp Makefile.top ../../Makefile
|
||||
cp Makefile.dat ../../dat/Makefile
|
||||
cp Makefile.doc ../../doc/Makefile
|
||||
cp Makefile.src ../../src/Makefile
|
||||
cp Makefile.utl ../../util/Makefile
|
||||
/bin/sh ./mkmkfile.sh Makefile.top ../../Makefile $hints
|
||||
/bin/sh ./mkmkfile.sh Makefile.dat ../../dat/Makefile $hints
|
||||
/bin/sh ./mkmkfile.sh Makefile.doc ../../doc/Makefile $hints
|
||||
/bin/sh ./mkmkfile.sh Makefile.src ../../src/Makefile $hints
|
||||
/bin/sh ./mkmkfile.sh Makefile.utl ../../util/Makefile $hints
|
||||
|
||||
Reference in New Issue
Block a user