#!/usr/bin/perl
# NetHack 3.6   GENFILES      $NHDT-Date: 1550799147 2019/02/22 01:32:27 $  $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.0 $
#       Copyright (c) 2018 by Kenneth Lorber
# NetHack may be freely redistributed.  See license for details.

# 2 sections:
#   *.lev entries are generated by reading *.des
#   hardcoded entries are in __DATA__

($dir = $0) =~ s!^(.*/)(.*)!$1!;

print "T (files generated by lev_comp at playground creation time)\n";

foreach $des (<$dir*.des>){
    open IN, "<", $des or warn("Can't open $des: $!");
    while(<IN>){
	m/^(MAZE|LEVEL):\s*"(.*?)"/ && do {
	    print "F $2.lev\n";
	};
    }
    close IN;
}
while(<DATA>){
    print;
}

__DATA__
T (tile files optionally generated for X ports at playground creation time)
F pet_mark.xbm
F rip.xpm
F x11tiles
T (files generated for Qt interface on Mac OS X)
F nethack.icns
F Info.plist
T (files generated for win32 at compile time)
F porthelp
F dlb.lst
T (files generated for win32 tty at compile time)
F ttyoptions
T (files generated for win32 gui at compile time)
F guioptions
T (files generated by makedefs at playground creation time)
F data
F dungeon.pdf
F options
F oracles
F quest.dat
F rumors
T (file generated by dgn_comp at playground creation time)
F dungeon
