]> git.pond.sub.org Git - empserver/commitdiff
Pass subjects instead of subject filenames to info/mktop.pl
authorMarkus Armbruster <armbru@pond.sub.org>
Sat, 27 Apr 2013 15:03:34 +0000 (17:03 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Wed, 8 May 2013 04:57:57 +0000 (06:57 +0200)
mktop.pl doesn't actually use the files, so this is simpler and
clearer.

Make.mk
info/mktop.pl

diff --git a/Make.mk b/Make.mk
index 656c81f57d5e50ae9a006a801549c4dd264cc3eb..6b14d04e250b98758ee2b992d691597833e2c27d 100644 (file)
--- 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))
        >$@
index 9378b029aa413f1fad395666be11edd16151a0cf..a4e0c5e3c3d73db57f9e774f98e60e19c4f2fbe3 100644 (file)
 #
 #   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: $!";