From a2338a1db43d75ce00642e7c466d0d8e4139d578 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 27 Apr 2013 17:03:34 +0200 Subject: [PATCH] Pass subjects instead of subject filenames to info/mktop.pl mktop.pl doesn't actually use the files, so this is simpler and clearer. --- Make.mk | 4 ++-- info/mktop.pl | 15 +++------------ 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/Make.mk b/Make.mk index 656c81f57..6b14d04e2 100644 --- a/Make.mk +++ b/Make.mk @@ -331,8 +331,8 @@ subjects.mk: info/findsubj.pl $(tsrc) $(tsubj): info/mksubj.pl perl $(srcdir)/info/mksubj.pl $@ $(filter %.t, $^) -$(ttop): $(tsubj) - perl $(srcdir)/info/mktop.pl $@ $(filter %.t, $^) +$(ttop): info/mktop.pl + $(call quiet-command,perl $(srcdir)/info/mktop.pl $@ $(subjects),GEN $@) info.nr/all: $(filter-out info.nr/all, $(info.nr)) >$@ diff --git a/info/mktop.pl b/info/mktop.pl index 9378b029a..a4e0c5e3c 100644 --- a/info/mktop.pl +++ b/info/mktop.pl @@ -29,22 +29,13 @@ # # Known contributors to this file: # Ken Stevens (when it was still info.pl) -# Markus Armbruster, 2006 +# Markus Armbruster, 2006-2013 # -# Usage: mktop.pl OUTFILE SUBJECT-INDEX-FILE... -# The SUBJECT-INDEX-FILE... contain all the subject indexes. Derive -# the subjects from the file names, write the index to OUTFILE. Only -# the file names are used, the files aren't accessed. +# Usage: mktop.pl OUTFILE SUBJECT... my $out = shift @ARGV; -my @subject = (); -for (@ARGV) { - /([^\/]*)\.t$/ - or die "Strange subject file name"; - push @subject, $1; -} -@subject = sort @subject; +my @subject = sort @ARGV; open(TOP, ">$out") or die "Can't open $out: $!"; -- 2.43.0