Commit Graph

53 Commits

Author SHA1 Message Date
PatR
ddb830911e more Unix gitinfo
When make uses 'makedefs -v' to create date.h, force it to create
gitinfo.txt all the time instead of just when that doesn't already
exist.  Use 'make GITINFO=0' to get the previous behavior.

To skip it entirely, you need to do that and also make sure that
some file by that name already exists.  'touch dat/gitinfo.txt' or
perhaps 'echo "#no git" > dat/gitinfo.txt' would suffice.
2018-03-10 12:32:52 -08:00
PatR
4d35ca86f3 gitinfo.txt on Unix
Hide the scary perl command during 'make all' feedback in src/.
I'm not a shell programmer but this works fine for me when skipping
NHgithook::NHversioning because dat/gitinfo.txt is already present,
when creating dat/gitinfo.txt successfully, and when creation fails
because perl can't find NHgithook.pm.  It hasn't been tested when
perl itself is absent.
2018-03-04 14:17:13 -08:00
keni
cd96394ccd Update docs, man page.
Add last chance attempt to build dat/gitinfo.txt
2018-02-23 19:50:28 -05:00
Pasi Kallinen
1af921274e More Makefile verbosity 2017-10-15 18:00:56 +03:00
Pasi Kallinen
1ff4dfee85 Reduce *nix Makefile verbosity
Instead of showing all the CFLAGS and whatnot, just show "[CC] allmain.c"
or whatever. The verbose output can be switched back on with VERBOSEMAKE=1
2017-10-14 15:56:03 +03:00
Pasi Kallinen
ed335dd0a7 Add Qt4 windowport
Originally by Ray Chason for 3.4.3, based on the Qt windowport by
Warwick Allison. The look and feel is mostly the same.

Some improvements over the Qt 3 interface are:

* Panes are resizable
* Full support for IBMgraphics, and walls and corridors are drawn with
  graphical primitives for a continuous appearance no matter what the font
  says
* Lots of irritating glitches fixed
* Menus support proportional fonts correctly

Adding this because the old Qt windowport cannot be compiled on Qt4,
even with Qt3 compatibility stuff.

TODO:
 - background map glyphs
 - status hilites
 - menucolors
2017-10-08 01:15:02 +03:00
PatR
d63ff7700d fix #H4287 - inconsistent handling of CPPFLAGS
[Subject should mention Unix, but would exceed 50 characters.]

Explicit build rules ignore $(CPPFLAGS), but the implicit C rule
(at least in GNU make) specifies it.  If user has a value for this
in the environment, that value would apply to building some source
files but not others.  This patch gives it an explicit empty value,
so building via implicit rule should expand it to nothing and match
the fact that it's omitted from explicit rules.

There was one C++ file which relied on the implicit C++ rule.  I've
added it to the files processed by 'make depend' and re-run that.
It now will get built via an explicit rule.

Also, a small amount of reformatting for HACKCSRC.
2016-04-01 16:49:49 -07:00
PatR
105fd0a9a2 fix #H4286 - race condition during Unix build
Update sys/unix/Makefile.src to force it to build monst.o and
objects.o before attempting to build makedefs, so that building
the latter doesn't use the rules for those two object files in
Makefile.utl.  Prior to this, if 'make' was building multiple
targets in parallel monst.o and/or objects.o might be clobbered
when a process using util/Makefile tries to build them while its
parent is also building them via src/Makefile.

This includes a bit of reformatting which wasn't present in
yesterday's email attachment.
2016-03-27 16:50:38 -07:00
PatR
ef2a6e6f1b make depend
dungeon.o depending on lev.h is the only change found by 'make depend'.
(I'm a bit suspicious about that.)

I haven't attempted to reconcile the vms Makefiles with the Unix ones,
just put in this one new dependency.  I know vms/Makefile.src lacks
handling for sys/share/*regex.c and vms/Makefile.top and install.com
both lack handling for 'sysconf'.
2015-11-11 23:46:19 -08:00
PatR
1547e676f3 finish implementing pmatchregex
I started out cleaning up a bit of lint in the recent run-time options
handling and discovered that pmatchregex wasn't finished.  Finish it and
also deal with the version lint.  Argument declarations for function
definitions in pmatchregex.c have been switched to K&R style.  (The ones
in posixregex.c have been left in ANSI style.)

There wasn't any build rule for pmatchregex.o; now there is (for Unix).
posixregex.o is still the default.

There isn't any build rule for cppregex.o (again, for Unix); the change
to cppregex.cpp is untested.
2015-06-16 02:29:22 -07:00
Sean Hunt
1c081b1647 Remove stale version control lines. 2015-05-25 09:21:31 +09:00
karnov
2a907f894e Version number increment 2015-05-06 22:04:27 -04:00
PatR
39fcd6459c couple bits omitted from lint.h patch
* list lint.h in Files
* add dependency to win/X11/dialogs.o since dialogs.c includes lint.h
  directly rather than via hack.h
2015-05-06 17:33:48 -07:00
PatR
e72246f1d1 new file: include/lint.h
modified files: include/hack.h, src/decl.c, sys/unix/Makefile.src

Groundwork for cleaning up the X11 sources, where gcc with the option
settings specified in the OSX hints file currently generates close to
400 warnings for win/X11/*.c.

lint.h is included by hack.h, and I've moved the debugpline stuff from
the latter to the former to hide it better.  (By rights it belongs in
debug.h or something of the sort, but I didn't want to go that far.)
Makefile and project dependencies need to catch up.

nhStr() hides a cast to char *, and is intended to by used on string
literals where it isn't feasible to maintain the 'const' attribute.
(A pernicious problem with X11 code, where the include situation can
become very convoluted, and many, MANY string literals are hidden
behind macros to look like keyword-type tokens.)

nhUse() can be used to force a fake usage on something which triggers
an unused parameter warning.  There are a 6 or 8 or 10 places in the
core code where that applies, but so far I have't touched any of them.
There's a tradeoff since it will result in some worthless code being
generated and executed, but is much simpler than tacking on compiler-
specific workarounds like '#pragma unused' or gcc's __attribute__ hack.
2015-05-06 00:38:16 -07:00
Sean Hunt
c7578b7c34 Add POSIX implementation of regex.
This also includes documentation of the regex engine in posixregex.c,
because I couldn't think of anywhere better to put it.
2015-04-12 11:46:56 -04:00
keni
03140969ee Bulk recovery of file CVS headers and addition of NHDT- headers. 2015-02-26 09:19:03 -05:00
nethack.rankin
7db7b8de73 date.h/patchlevel.h dependencies (trunk only)
Remove date.h and patchlevel.h from win/tty/wintty.c, win/X11/winX.c,
and sys/share/pcmain.c (caveat: the latter two are untested) so that they
don't get recompiled every time any other source file changes and triggers
creation of a new date.h.  Only version.c needs to be recompiled in that
situation.  Also, Makefile.src was missing a reference to botl.h.
2012-01-20 03:41:33 +00:00
nethack.rankin
09efc215a8 update Unix Makefile.src (trunk only)
Teach ``make depend'' about the new win/chain code so that the build
rules for that aren't blown away, and then run make depend to get things
up to date.  I think hack.h/$(HACK_H) missing botl.h and pcmain.o missing
date.h were the only things significant that turned up.

     The comment for CSOURCES says it should have all sources, but the
value had $(SYSSRC) rather than $(SYSCSRC).  I've taken the comment at its
word and inserted the missing 'C'; I wonder whether that'll break anything.
Does anybody use ``make tags'' these days?
2012-01-13 03:31:39 +00:00
keni
7f6ee2f759 WINCHAIN - a framework allowing multiple processors between core and winport
This is the code I built trying to figure out the large window size issue.
It completely compiles out if not needed (see -DWINCHAIN in hints/macos10.7)
and except for one call during setup has zero overhead if compiled in and
not used.  See window.doc for more info.

Defs for UNUSED parms.  I know this has been controversial, so use is isolated
to the chain code and windows.c (where it shouldn't be intrusive and saves about
50 warnings).

Hints file for 10.7, but the build process still needs to be migrated from
the branch.
2012-01-11 18:23:35 +00:00
keni
909ac45014 followup tid (trunk only)
Missing dependency.  Thanks Pat.
2011-10-11 23:55:38 +00:00
keni
4e5e720334 display version and build info at startup (trunk only)
Tested on the unix port; I've updated as many other ports as I can figure
out but they're not tested.  See window.doc for info on the changed banner
lines.  Also adds the ability to override the generic "Unix" port - used now to get
"MacOSX" into the version line instead of "Unix" (so we don't scare people who don't
know what's going on).
2011-10-11 02:37:31 +00:00
nethack.rankin
2ba506b385 version feedback (trunk only)
Show the 'v' output (full version number plus build date-time) as
the first line of '#version' output (build time configuration settings).
It isn't simple to do that when generating dat/options (there's some
port-specific tweaking going), so do it at run-time by processing that
file one line at a time instead of passing it through a pager routine.

     This also inserts an "About NetHack" entry as the first choice in
the menu for '?', the way that most Windows programs have interactive
help organized.  Picking that gives the same output as using #version.

'make depend' manually updated for Unix and VMS (add dlb.h to version.*).
2011-09-23 07:33:18 +00:00
keni
e8fe9b4505 make nethack.sh switchable from hints file
If SHELLDIR is null, don't install nethack.sh.  Also a tid in Porting
and add NHSROOT to the Makefiles which gives a path to the top of the
tree (so e.g. you can always find makedefs from a rule in a hints file).
2009-12-17 19:26:30 +00:00
keni
4036a6727c Add RCS version lines 2009-05-06 10:55:43 +00:00
keni
0b3e8bbd88 macosx hints file consolidation (trunk only)
get macosx down to one hints file (default tty, single user) for
 tty, x11, qt and single or multiple users
preliminary bits that might allow a macosx qt build
2008-04-08 23:17:39 +00:00
keni
6f0e178368 more SYSCF and related bits - cleanup and features
infrastructure for "system options" - things currently specified at build
 time that should be changeable at install time or run time but not really
 under user control
generalize contact info so it can be localized and it doesn't have to be
 an email address
move recently introduced WIZARDS into sysopt
drop bogus OPTIONS=wizards possibility
new function build_english_list() to comma-ize and add 'or' from a whitespace separated list: A.  A or B.  A, B, or C.
syscf file now handles: WIZARDS SUPPORT RECOVER
 SUPPORT specifies local support information
 RECOVER will eventually supply port-specific and/or localized info on how
  to run recover (or get it run for you).
Note: in sys/msdos I changed sys.o (generated from pcsys.c) to pcsys.o
Note: sys/msdos/Makefile.GCC has 2 rules for sys.o (now pcsys.o)
2008-01-31 00:56:59 +00:00
keni
59e64a1d40 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
2007-12-13 20:17:11 +00:00
nethack.allison
4169a3a308 Remove win32 mapi mail from distribution (trunk only) 2006-10-19 13:26:54 +00:00
nethack.allison
143790540b mextra follow up bit 3
More Makefile tweaks
2006-01-07 13:38:29 +00:00
nethack.allison
faa5458843 mextra-related port Makefile mods
This attempts to modify the various Makefiiles for the mextra changes.
Port teams should verify that the modifications are valid.
2006-01-06 05:52:48 +00:00
nethack.allison
ab1872b928 zlib support; also internal compression changes
o Add support for zlib compression via ZLIB_COMP in config.h (ZLIB_COMP
  and COMPRESS are mutually exclusive).
o rlecomp and zerocomp are run time options available if RLECOMP and
  ZEROCOMP are defined, but not turned on by default if either COMPRESS
  or ZLIB_COMP are defined.
o Add information to the save file about internal compression options
  used when writing the save file, particularly rlecomp and zerocomp
  support.
o Automatically adjust rlecomp and zerocomp (if support compiled in)
  when reading in an existing savefile that was saved with those options
  turned on.  Still allows writing out of savefile in preferred format.
o In order to support zlib and not conflict with compress and uncompress
  routines there, the NetHack internal functions were changed to
  nh_uncompress and nh_compress as done in the zlib contribution received
  in 1999 from <Someone>.

I tagged the sources NETHACK_3_5_0_PREZLIB prior to applying these
changes.
2005-01-22 15:28:15 +00:00
nethack.allison
e9b022d579 housekeeping: mark trunk sources 3.5 (misc) 2005-01-02 17:21:18 +00:00
cohrs
e145f93cb5 unix depend update
trunk needs a new dependency on context.h
2003-10-21 01:27:05 +00:00
cohrs
5d2d4d9b84 unix depend update
update the unix 'make depend' output in both branches.
2003-10-21 01:16:16 +00:00
cohrs
559be58c21 conflicting delayed killers
Introduce a new set of functions to manage delayed killers in the trunk, used
in addressing the various reports of delayed killer confusion.  Since existing
delayed killers are related to player properties, the delayed killers are
keyed by uprop indexes.  I did this to avoid adding yet another set of
similar identifiers.
- the new delayed_killer() is used for stoning, sliming, sickness, and
delayed self-genocide while polymorphed.  Some other timed events don't
use it (and didn't use the old delayed_killer variable) because they
use a fixed message when the timeout occurs.
- A new data structure, struct kinfo, is used to track both delayed and
immediate killers.  This encapsulates all the info involved with
identifying a killer.  The structure contains a buffer, which subsumes the
old killer_buf and several other buffers that didn't/couldn't use killer_buf.
- the killer list is saved and restored as part of the game state.
- the special case of usick_cause was removed and a delayed killer list
entry is now used in its place
- common code dealing with (un)sliming is moved to a new make_slimed function
- attempted to update all make dependencies for new end.c -> lev.h
dependency, sorry if I messed any up
2003-09-29 19:24:20 +00:00
cohrs
2d59f9d8db context build changes for Unix
- removed an extraneous space from Makefile.src that confused GNU make
- unixmain.c still had a couple uses of flags.move
2003-09-22 05:21:53 +00:00
nethack.allison
18e971e442 trunk only: preserving context (sys files)
Pat Rankin wrote:
> collect them all into some new struct and
> save that separately rather than jamming more non-option stuff
> into struct flags.

This patch:
- collects all context/tracking related fields from flags
  into a new structure called "context."
It also adds the following to the new structure:
- stethoscope turn support
- victual support
- tin support
2003-09-21 11:56:11 +00:00
jwalz
be7e8373f4 That one $(LD) needs to be an $(LD). $(CC) will link in the non-shared
C library and cause problems with address space for something NetHack's
size.
2003-05-28 17:33:54 +00:00
warwick
47bbe26073 Unify usage of $(CC) vs. $(LD) for linking to always $(LINK), set
to $(CC) by default.
Necessary for C++ builds where the C++ compiler driver must be used
to link, adding libraries that the C compiler driver does not know
about.
2003-05-28 05:36:57 +00:00
cohrs
1b017f6154 unix dependency update for 3.4.1
should now be up to date unless someone makes a material change to includes
2003-02-12 03:37:58 +00:00
nethack.rankin
a0067f97e2 luck artifact dependencies
Instead of adding a new artifact.h to pray.c, remove the existing
ones from attrib.c, invent.c, and mkobj.c.  This also updates the Unix
and VMS editions of Makefile.src; having stale dependencies in those
for other ports could cause unnecessary recompilation but can't break
anything in this case.
2002-10-09 07:06:08 +00:00
warwick
3c043bc008 Make problem of zero-sized .moc file less likely.
(<Someone> reported problem that was obscured by an empty .moc file
being created in a failed build)
2002-07-01 05:35:02 +00:00
cohrs
b1055ae7c1 Gnome updates (from <Someone> <Someone> Simon)
- fix destruction of primary game windows
- One, it makes the color of the cursor box dynamic (these are the gnmap.c
changes), based on hp/hpmax (continuous colors white -> yellow -> red ->
magenta rather than discrete like in Qt).
- Two, it adds a new window, NHW_WORN (all the other changes and new files
gnworn.[ch]), placed at the end of the first row, to the right of the status,
with tiles of all the items currently equiped.  I had to change the spacing of
the first row (no longer homogeneous) to accomodate this, but I think it still
looks okay.  It's mostly like the Qt version but the equiped items are in
slightly different places, and a bit more compactly (added quiver, ball/chain,
monster skin armor; see the definition in gnworn.c for the layout).
2002-04-21 17:09:34 +00:00
jwalz
545132999d <Someone>'s changes for the makefiles. 2002-03-20 03:30:45 +00:00
cohrs
48049de0ba Gnome basic functionality
- Makefile.src update for new dependency
2002-03-17 22:36:57 +00:00
cohrs
b6189efe2a X11 wide tilemap support
- support X11 tile files (with or without XPM) that are 40 tiles wide
- rearrange some X11 code to share more code between XPM & non-XPM options
- clean out some deprecated X11/winmap.c #ifdefs
- update Qt code minimally to handle such an XPM file
2002-03-17 20:02:47 +00:00
cohrs
a35ca5e744 parallel unix make bits
- Pat noticed that makedefs -z makes both vis_tab.[ch], but they could be
built by two makes via make -j, causing corruption
- make -j at top level failed for similar reasons, added several
dependencies to ensure a valid ordering
- these changes will cause extra things to be built if you "make"
individual targets at the top level, but have little effect it you're a
real power user and "make" the actual target in the right directory
2002-03-09 06:41:49 +00:00
jwalz
c7325ee019 Run 'make depend', after fixing up output. 2002-03-09 03:13:18 +00:00
nethack.rankin
1797be7026 Makefile.src bit
Make it easier to follow the directions about commenting out
extra copies of tile.o when multiple windowing interfaces contain it.
2002-03-03 04:52:06 +00:00
cohrs
d1d6455534 Linux build updates
- A few Makefile changes to reflect current(?) paths on Linux
- Linux mail reader is /bin/mail
2002-03-02 22:43:39 +00:00