add new macOS target 'bundle'

This creates a new target 'bundle' for make on macOS, when using
sys/hints/macOS.370.

The 'bundle' recipe:
    - creates a subdirectory of src called 'bundle', and creates
      a bundle (nethack.app/ etc) below that.
    - the executable that is placed inside the bundle
      (bundle/nethack.app/Contents/MacOS/nethack) will find resources
      within the bundle, including the sounds, so a manual placement
      of the sounds into your '~/Library/Sounds' is no longer
      required when using the executable that's inside the bundle.
    - the sounds are included in the bundle if a soundlib option is
      chose at build time (for example 'make WANT_MACSOUND=1'), such
      that the bundled executable supports sounds.
    - the executable inside the bundle seems to find the resources
      it needs, even if invoked through a symlink elsewhere that points
      to the executable that's inside the bundle (only limited testing of that
      has been done).
    - at some point, its probably appropriate to add a
      'mv bundle/nethack.app <proper location>', possibly under
      a subsequent 'make install' step.
    - right now, the bundle step has a dependency on 'update'. I don't
      know if that's the right ordering or not, yet.

make WANT_MACSOUND=1 update
make WANT_MACSOUND=1 bundle

or, you can probably get away with:

make WANT_MACSOUND=1 bundle

if the nethack bundle is the goal anyway.

make clean
will clear the bundle subdirectory and everything below it.
This commit is contained in:
nhmall
2023-02-08 17:17:43 -05:00
parent ab00de45d1
commit aad0586239
3 changed files with 139 additions and 29 deletions

View File

@@ -461,8 +461,9 @@ AT = $(AT_V$(QUIETCC))
# verbosity-adjacent; these will already have 'real' values if hints have
# set up cross-compiling, in which case these assignments will be no-ops
PREGAME=@true
CLEANMORE=@true
PACKAGE=@true
# Other hints add to this without an override, so don't completely overwrite it
CLEANMORE+= true;
MAKEDEFS = ../util/makedefs