SBSPSS/build/mklevel.pl

36 lines
1.0 KiB
Perl
Raw Normal View History

2001-01-19 16:41:46 +01:00
$OutFile=shift(@ARGV);
$InStr=shift(@ARGV);
@Tmp=split('_',$InStr);
$Chapter=shift(@Tmp);
$Level=shift(@Tmp);
$LevelDir =$Chapter/\$Level;
# printf("I got\n0: $OutFile\n1: $InStrn\n");
# printf("Chapter = $Chapter\n");
# printf("Level = $Level\n");
# printf("LevelDir = $LevelDir\n");
$OutFile=">$OutFile";
open(OutFile) || die "Can't create makefile $OutFile; $!";
print OutFile <<eot
2001-04-19 01:04:03 +02:00
# print <<eot
2001-01-19 16:41:46 +01:00
.PHONY : make$Chapter\_$Level clean$Chapter\_$Level
make$Chapter\_$Level\:\t$Chapter\_$Level\_LVL\n
clean$Chapter\_$Level\:\tclean$Chapter\_$Level\_LVL
2001-04-19 01:04:03 +02:00
$Chapter\_$Level\_IN :=\t\$(LEVELS_IN_DIR)/$Chapter/$Level/$Level.mex
$Chapter\_$Level\_OUT :=\t\$(LEVELS_OUT_DIR)/$Chapter\_$Level.lvl
$Chapter\_$Level\_TEX :=\t\$(LEVELS_OUT_DIR)/$Chapter\_$Level.tex
2001-01-19 16:41:46 +01:00
clean$Chapter\_$Level\_LVL :\n\t\$(RM) -f \$($Chapter\_$Level\_OUT) \$($Chapter\_$Level\_TEX)
$Chapter\_$Level\_LVL :\t\$($Chapter\_$Level\_IN)
\$($Chapter\_$Level\_OUT) : \$($Chapter\_$Level\_IN)
2001-04-19 01:04:03 +02:00
\t\@\$(MKLEVEL) \$($Chapter\_$Level\_IN) -o:\$($Chapter\_$Level\_OUT) \$(LEVELS_OPTS)
2001-01-19 16:41:46 +01:00
eot
;
close(OutFile);