update some hints mechanics for 2020
Allow sharing of common code between different hints files
through use of: #-INCLUDE
new folder created: sys/unix/hints/include
new hints include files:
sys/unix/hints/include/multiw-1.2020
sys/unix/hints/include/multiw-2.2020
structure the early parts of sys/unix/hints/linux.2020 and
sys/unix/hints/macOS.2020 consistently, and utilize #-INCLUDE multiw-1.2020
and #-INCLUDE multiw-2.2020 in them. That will allow the Makefile lines
that they contain to be maintained in a single place.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# NetHack 3.7 mkmkfile.sh $NHDT-Date: 1596498293 2020/08/03 23:44:53 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.14 $
|
||||
# NetHack 3.7 mkmkfile.sh $NHDT-Date: 1597332770 2020/08/13 15:32:50 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.15 $
|
||||
# Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
|
||||
# NetHack may be freely redistributed. See license for details.
|
||||
|
||||
@@ -23,7 +23,8 @@ echo "### Start $5 PRE" >> $3
|
||||
echo "###" >> $3
|
||||
awk '/^#-PRE/,/^#-POST/{ \
|
||||
if(index($0, "#-PRE") == 1) print "# (new segment at source line",NR,")"; \
|
||||
if(index($0, "#-P") != 1) print}' $4 >> $3
|
||||
if(index($0, "#-INCLUDE") == 1) system("cat hints/include/"$2); \
|
||||
else if(index($0, "#-P") != 1) print}' $4 >> $3
|
||||
echo "### End $5 PRE" >> $3
|
||||
echo "" >> $3
|
||||
|
||||
|
||||
Reference in New Issue
Block a user