Add CMake for 5.0#1558
Draft
mark-z-r wants to merge 26 commits into
Draft
Conversation
libm math functions are used by lua and NetHack and Lua both need to link to libdl.a.
Updates to NetHack 3.7 CMakeLists.txt
Be able to carry out uplifts during minor release lifetimes. Document a way to be able to uplift struct content without incrementing EDITLEVEL and breaking existing savefiles. Use the mechanics outlined to uplift the contents instead, where it is feasible to do so. The uplift is currently one-way only. An uplifted savefile cannot be used with an earlier build of NetHack , one built with a lower SAVEFILE_REVISION_LEVEL, than the one which wrote the savefile. The final byte (byte 79) of the 80 critical bytes in the savefile, of which 10 are reserved for future expansion and not currently used, will now be used for holding the savefile revision level (SAVEFILE_REVISION_LEVEL in include/patchlevel.h) at the time the savefile was written. That leaves 9 of the bytes available for future use.
The directories and permissions portion of the linux.500 and macOS.500
hints files and their included files has been consolidated to
dirs-perms.500.
The builder can edit that one file now, to identify
the folders that will be utilised as part of the build.
Alternatively, you can set those folders and permissions in a
make.perms file in the top of the NetHack folder tree and
they should take precedence over the ones in dirs-perms.500
because dirs-perms.500 uses '?=' variable assignment, which
means "set the value of the variable if no value has been set."
* NOTE: BUILD CHANGE *
This also makes WANT_SOURCE_INSTALL=1 the default over
WANT_SHARED_INSTALL=1, if neither is explicitly set.
The new default is the safer and less-impacting default,
but it will change where things get installed over earlier
Makefile builds. You can be explicit with WANT_SHARED_INSTALL=1
in your make command to get that..
These are the differences between the two:
make WANT_SHARED_INSTALL=1 Place the results of the install/update portion
of the build into a shared area on a multiuser
system.
make WANT_SOURCE_INSTALL=1 Place the results of the install/update portion
of the build into a subfolder of the source
tree, rather than in a system-wide shared area.
Also note that the macOS hints file behaves slightly differntly depending
on whether WANT_SOURCE_INSTALL=1 was set versus letting it be the default.
That's not new, it behaved that way before.
It was using dupstr(), so strutil had to be added to the project.
There is no unintentional spelling mistake. Close NetHack#1523
and split out the options into a seperate file modified: CMakeLists.txt new file: CMakeOptions.txt
the resultant binary don't work though lots done, probably should have split this up into more commits... important to note is that I changed report.c to not output a backtrace if NO_BACKTRACE if defined. NO_BACKTRACE gets defined if `backtrace()` is not defined. still missing a lot of features that the makefiles have, but it is hard dechipering the current build system... modified: CMakeLists.txt modified: CMakeOptions.txt new file: src/CMakeLists.txt modified: src/report.c new file: sys/CMakeLists.txt modified: util/CMakeLists.txt new file: win/CMakeLists.txt new file: win/curses/CMakeLists.txt new file: win/tty/CMakeLists.txt
modified: CMakeOptions.txt modified: src/CMakeLists.txt modified: sys/CMakeLists.txt new file: sys/share/CMakeLists.txt
just that. added some info on finding config values for cmake too
also added a hackdir option
nethack can run now. requires manual setup of data dirs, but it runs! next steps: data files (makedefs) and installs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
commits from cmake 3.7 (scraped most, if not all, of the files from this)
My commits
I thought i would use the 3.7 attempt as a starting point, but so much has changed
since then that I decided to start over
What the PR plans to cover:
most of the options detailed in sys/unix/README.hints, some of them might be dummy(no longer planned)switches for now
I dont remeber why I decided to do this. (probably something to do with creating a chimera port)
I would like some confirmation that this pr will get accepted if it is up to snuff. or
in other words, I want to make sure that this PR will not get rejected just because CMake support
is unwanted