]> git.tue.mpg.de Git - paraslash.git/commitdiff
Remove man_util.bash.
authorAndre Noll <maan@tuebingen.mpg.de>
Sun, 26 Jun 2016 10:33:44 +0000 (12:33 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 26 Mar 2017 09:02:28 +0000 (11:02 +0200)
This script is no longer needed since all executables and all command
lists have been converted to the lopsub library.

This commit removes the script and the receipt in Makefile.real that
called it.

Makefile.real
man_util.bash [deleted file]

index 2e2af4839b29f32eb815144e9f5d6127fa3eeb9b..53607d62dccd4c0e2179ee1a93fef8cce64263dc 100644 (file)
@@ -190,22 +190,6 @@ $(man_dir)/para_%.1: $(lls_suite_dir)/%.lsg.man $(man_util_command_lists) \
        $(Q) cat $< $(man_util_command_lists) > $@
        $(Q) $(M4) -D COPYRIGHT_YEAR=$(COPYRIGHT_YEAR) $(lls_m4_dir)/copyright.m4 >> $@
 
-$(man_dir)/para_%.1: $(man_util_command_lists) \
-               $(ggo_dir)/%.ggo man_util.bash \
-               | $(man_dir) $(help2man_dir)
-       @[ -z "$(Q)" ] || echo 'MAN $<'
-       $(Q) \
-               COMMAND_LISTS="$(man_util_command_lists)" \
-               FILTERS="$(filters)" \
-               GENGETOPT=$(GENGETOPT) \
-               GGO_DIR=$(ggo_dir) \
-               HELP2MAN=$(HELP2MAN) \
-               HELP2MAN_DIR=$(help2man_dir) \
-               RECEIVERS="$(receivers)" \
-               VERSION="$(GIT_VERSION)" \
-               WRITERS="$(writers)" \
-               ./man_util.bash $@
-
 $(object_dir)/%.o: %.c | $(object_dir)
 
 $(object_dir)/opus%.o $(dep_dir)/opus%.d: CPPFLAGS += $(opus_cppflags)
diff --git a/man_util.bash b/man_util.bash
deleted file mode 100755 (executable)
index c988278..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/usr/bin/env bash
-
-# writers are called "modules" in this script
-print_modhelp()
-{
-       local ggo="$1"
-
-       $GENGETOPT --show-detailed-help \
-               --set-version "" \
-               --set-package "" \
-               < "$ggo" | awk 'BEGIN {
-                       have_purpose=0
-                       have_usage=0
-               } {
-                       if (!have_purpose) {
-                               if ($0 ~ /^ *$/)
-                                       next
-                               printf(" (%s):", $0)
-                               have_purpose=1
-                               next
-                       }
-                       if (!have_usage) {
-                               if ($0 ~ /^Usage: /) {
-                                       have_usage=1
-                               }
-                               next
-                       }
-                       print $0
-               }'
-}
-
-make_help()
-{
-       local target="$1" module ggo
-
-       ggo="$GGO_DIR/$1.ggo"
-       $GENGETOPT --show-detailed-help \
-               --set-version "$VERSION" \
-               --set-package "para_$1" \
-               < "$ggo"
-
-}
-
-set -u
-
-(($# != 1)) && exit 1
-
-# These must be set by the caller (make or help2man)
-export COMMAND_LISTS FILTERS GENGETOPT GGO_DIR HELP2MAN HELP2MAN_DIR \
-       RECEIVERS VERSION WRITERS
-
-# If either --version or --help-xxx was given, we are being called by help2man
-if [[ "$1" == "--version" ]]; then
-       echo "$VERSION"
-       exit $?
-fi
-if [[ "$1" =~ --help- ]]; then
-       make_help "${1#--help-}"
-       exit $?
-fi
-
-# Called by make, run help2man
-output_file="$1"
-target="${output_file##*/para_}"
-target="${target%.*}" # server, audiod, filter, ...
-link="$HELP2MAN_DIR/para_$target"
-
-cl_opts=
-tempfiles=
-for cl in $COMMAND_LISTS; do
-       tempfiles+=" $cl.man_util.$$"
-       sed -e '/^\.SH / s/$/]/1' -e '/^\.SH / s/^\.SH /[/1' "$cl" > "$cl.man_util.$$"
-       cl_opts+=" --include $cl.man_util.$$"
-done
-
-# Create a symlink para_$target, pointing to this script. This hack is
-# necessary because help2man always includes the name of the executable in its
-# output.
-ln -sf "$PWD/$0" "$link"
-
-# This will call us again twice, with either --help-$target or --version given.
-$HELP2MAN --no-info --help-option "--help-$target" $cl_opts \
-       "$link" > "$output_file"
-ret=$?
-rm -f $tempfiles
-if (($ret != 0)); then
-       rm -f "$output_file"
-       exit 1
-fi