Files
nethack/.gitignore
T
nhmall 29951cccd1 add support for optional builder-created make.prefs
Set things up so that the Makefile build will look for 'make.prefs'
at the top of the NetHack source tree.

If 'make.prefs' is present, the Makefile build will include it
just ahead of the PRE section of a hints file specified to
sys/unix/setup.sh, or practically the first thing during a
Makefile build if no hints file was specified.

The advantage of using a 'make.prefs' is that instead of putting a
series of Makefile variable value assignments on the command line
each time, like this:
    make WANT_WIN_X11=1 WANT_WIN_TTY=1 WANT_WIN_CURSES=1 c2x=1 resp=1 update
you can, instead, put those preferences into make.prefs, like this:

# start of make.prefs
WANT_WIN_X11=1
WANT_WIN_TTY=1
WANT_WIN_CURSES=1
c2x=1
resp=1
# end of make.prefs

Now, my make command just needs to specify a target:
    make update

The syntax for checking whether make.prefs exists, and for including
it, is GNU make, or bsd make, specific, so sys/unix/mkmkfile.sh will
insert the correct syntax for the make that is in-use when
sys/unix/setup.sh is executed.

The 'make.prefs' file isn't limited to Makefile variable assignments, and
can contain any valid make syntax for the version of make on your system,
but adding make syntax beyond Makefile variable assignment will cause
your make.prefs file to become specific to that version of make. There
are syntactical differences between GNU make and bsd make, particularly
for directives and conditional tests.

The 'make.prefs' file can potentially eliminate much/all of the manual
editing of distributed repository Makefiles or hints files that you, as
a NetHack developer or builder, might routinely carry out.
You have the option of placing your preference changes in 'make.prefs'
instead.

Related reference for .500 hints file variables:

In the NetHack source tree:
sys/unix/README.hints

On GitHub:
https://github.com/NetHack/NetHack/blob/NetHack-5.0/sys/unix/README-hints

For example, on macOS, where GNU make is being used, and I typically
set things up using the macOS.500 hints file:
    sys/unix/setup.sh sys/unix/hints/macOS.500
I might have the following make.prefs in the root of my NetHack source tree:
#---- snip -------
$(info Attention - Using make.prefs)
WANT_MACSOUND=1
resp=1
#---- end-snip ---

For another example, on Linux, where GNU make is being used, and I
typically set things up using the linux.500 hints file:
    sys/unix/setup.sh sys/unix/hints/linux.500
I might have the following make.prefs file in the root of my NetHack
source tree:
#---- snip -------
$(info Using make.prefs)
WANT_WIN_X11=1
WANT_WIN_TTY=1
WANT_WIN_CURSES=1
c2x=1
resp=1
#---- end-snip ---
2026-05-18 13:03:31 -04:00

101 lines
1.4 KiB
Plaintext

# CVS default ignores begin
tags
TAGS
.make.state
.nse_depinfo
*~
\#*
.#*
,*
_$*
*$
*.old
*.bak
*.BAK
*.orig
*.rej
.del-*
*.a
*.olb
*.o
*.obj
*.so
*.exe
*.Z
*.elc
*.ln
core
# CVS default ignores end
.*.swp
# We generate makefiles by shell script
Makefile
# Win32-specific ignores
Debug/
Release/
binary/
package/*
vspackage/
vsbinary/
build/
ipch/
lib/*
Nethack.sln
Nethack.sdf
Nethack.opensdf
Makefile.bcc
Makefile.gcc
Makefile-orig
Makefile.bcc-orig
Makefile.gcc-orig
make.prefs
*.suo
*.pdb
*.ilk
# VS2013 extension to auto-whine about questionable code generates these
*.lastcodeanalysissucceeded
# VS 2017 caches data into the hidden directory .vs
.vs
win/win32/vs/obj/*
# Win32-specific ignores end
.DS_Store
# ms-dos
# resulting zip
NH*DOS.ZIP
# 8.3 versions
dat/data.bas
sys/share/posixreg.c
include/patchlev.h
doc/guidebk.txt
# folders compiler, target objs, binary results
djgpp/
src/msdos_o/
msdos-binary/
dat/NHTILES.BMP
dat/msdoshlp.txt
src/host_o/
util/djgpp-linux64-gcc550.tar.bz2
util/djgpp-osx-gcc550.tar.bz2
util/djgpp-mingw-gcc550-standalone.zip
util/dlb_main
util/thintile
util/til2bin2
util/tile2bin
win/share/monthin.txt
win/share/objthin.txt
win/share/oththin.txt
# end of ms-dos
#libnethack
targets/*
bundle/*
#test.js
#sys/lib/npm-package/build/nethack.js
#sys/lib/npm-package/build/nethack.wasm
*.user
util/*.lib
util/*.exp
submodules/CHKSUMS.tmp
sys/amiga/regex/