2 # aNetHack 0.0.1 mkmkfile.sh $ANH-Date: 1432512788 2015/05/25 00:13:08 $ $ANH-Branch: master $:$ANH-Revision: 1.13 $
3 # Copyright (c) Kenneth Lorber, Kensington, Maryland, 2007.
4 # aNetHack may be freely redistributed. See license for details.
11 # $4 hints file (path)
12 # $5 hints file (as given by user)
15 echo "# This file is generated automatically. Do not edit." >> $3
16 echo "# Your changes will be lost. See sys/unix/NewInstall.unx." >> $3
17 echo "# Identify this file:" >> $3
18 echo "MAKEFILE_$2=1" >> $3
22 echo "### Start $5 PRE" >> $3
24 awk '/^#-PRE/,/^#-POST/{ \
25 if(index($0, "#-PRE") == 1) print "# (new segment at source line",NR,")"; \
26 if(index($0, "#-P") != 1) print}' $4 >> $3
27 echo "### End $5 PRE" >> $3
31 echo "### Start $1" >> $3
34 echo "### End $1" >> $3
38 echo "### Start $5 POST" >> $3
40 awk '/^#-POST/,/^#-PRE/{ \
41 if(index($0, "#-POST") == 1) print "# (new segment at source line",NR,")"; \
42 if(index($0, "#-P") != 1) print}' $4 >> $3
43 echo "### End $5 POST" >> $3