Rename find-debuginfo.sh to find-debuginfo
authorMark Wielaard <mark@klomp.org>
Tue, 18 May 2021 17:03:31 +0000 (19:03 +0200)
committerMark Wielaard <mark@klomp.org>
Tue, 18 May 2021 17:11:34 +0000 (19:11 +0200)
Even though it is currently a bash script we install it as a normal
program. So simply install it without the .sh suffix. To get the VERSION
right in the script make it an AC_CONFIG_FILE (from find-debuginfo.in).
This also fixes the man page name and version.

* .gitignore: Remove find-debuginfo.sh.1.
Add scripts/find-debuginfo and find-debuginfo.1
* configure.ac (AC_CONFIG_FILES): Add scripts/find-debuginfo.
* Makefile.am (bin_SCRIPTS): Rename find-debuginfo.sh to
find-debuginfo.
(dist_man_MANS): Rename find-debuginfo.sh.1 to find-debuginfo.1.
(find-debuginfo.sh.1): Rename to ...
(find-debuginfo.1): ...this and update invocation.
(EXTRA_DIST): Rename scripts/find-debuginfo.sh to
scripts/find-debuginfo.
* scripts/find-debuginfo.sh: Rename to ...
* scripts/find-debuginfo.in: ...this.
Change all find-debuginfo.sh to find-debuginfo.
Use @VERSION@ for --version.

Signed-off-by: Mark Wielaard <mark@klomp.org>
.gitignore
Makefile.am
configure.ac
scripts/find-debuginfo.in [moved from scripts/find-debuginfo.sh with 98% similarity]

index 3e81e876d914f9be28e82a933a6aa36a9fa16cf2..ae33e64aad8129abe251dd4e9130096da7c65465 100644 (file)
@@ -31,7 +31,8 @@ debugedit.1
 sepdebugcrcfix
 sepdebugcrcfix.1
 
-find-debuginfo.sh.1
+scripts/find-debuginfo
+find-debuginfo.1
 
 atconfig
 atlocal
index 584e53244e6e903c9da7e8c263480076bb9e016d..645a502d3af2186d1eab579a742828181708aaaa 100644 (file)
@@ -24,8 +24,8 @@ AM_CFLAGS = -Wall
 # All our programs
 bin_PROGRAMS = debugedit sepdebugcrcfix
 
-# Install find-debuginfo.sh in $(bindir) and distribute it.
-bin_SCRIPTS = $(top_srcdir)/scripts/find-debuginfo.sh
+# Install find-debuginfo in $(bindir) and distribute it.
+bin_SCRIPTS = $(top_srcdir)/scripts/find-debuginfo
 
 debugedit_SOURCES = tools/debugedit.c \
                    tools/hashtab.c \
@@ -39,7 +39,7 @@ sepdebugcrcfix_CFLAGS = @LIBELF_CFLAGS@ $(AM_CFLAGS)
 sepdebugcrcfix_LDADD = @LIBELF_LIBS@
 
 # Manual pages are generated for dist
-dist_man_MANS = debugedit.1 sepdebugcrcfix.1 find-debuginfo.sh.1
+dist_man_MANS = debugedit.1 sepdebugcrcfix.1 find-debuginfo.1
 
 # The 'case' ensures the man pages are only generated if the corresponding
 # source script (the first prerequisite) or configure.ac (for the version)
@@ -64,14 +64,14 @@ sepdebugcrcfix.1: tools/sepdebugcrcfix.c configure.ac sepdebugcrcfix$(EXEEXT)
        esac
 
 # Since the script isn't generated this doesn't need any special casing.
-find-debuginfo.sh.1: $(top_srcdir)/scripts/find-debuginfo.sh
+find-debuginfo.1: $(top_srcdir)/scripts/find-debuginfo
        $(HELP2MAN) -N --output=$@ \
          --name='finds debuginfo and processes it' \
-         $(top_srcdir)/scripts/find-debuginfo.sh
+         $(top_srcdir)/scripts/find-debuginfo
 
 noinst_HEADERS= tools/ansidecl.h \
                tools/hashtab.h \
                tools/md5.h \
                tools/sha1.h
 
-EXTRA_DIST = README COPYING COPYING3 COPYING.LIB scripts/find-debuginfo.sh
+EXTRA_DIST = README COPYING COPYING3 COPYING.LIB scripts/find-debuginfo
index d11467e47577e2aebc9af1449f49ecce886e6e2b..d1d89691e893524795869ea93d10c4678be46cf4 100644 (file)
@@ -100,4 +100,5 @@ AC_SUBST([GZ_NONE_FLAG])
 
 # And generate the output files.
 AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([scripts/find-debuginfo], [chmod +x scripts/find-debuginfo])
 AC_OUTPUT
similarity index 98%
rename from scripts/find-debuginfo.sh
rename to scripts/find-debuginfo.in
index 4f7ebef64cddab242dc876e998c80eefeda4fa77..82fac2525993d74da2ec67ef686971e36f497efe 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/bash
-#find-debuginfo.sh - automagically generate debug info and file list
+#find-debuginfo - automagically generate debug info and file list
 #for inclusion in an rpm spec file.
 
 # Copyright (C) 2002-2021 rpm and debugedit contributors
@@ -20,7 +20,7 @@
 help()
 {
   cat <<'EOF'
-Usage: find-debuginfo.sh [OPTION]... [builddir]
+Usage: find-debuginfo [OPTION]... [builddir]
 automagically generates debug info and file lists
 
 Options:
@@ -70,7 +70,7 @@ the -l filelist file, or whose names match the -p pattern.
 The -p argument is an grep -E -style regexp matching the a file name,
 and must not use anchors (^ or $).
 
-The --run-dwz flag instructs find-debuginfo.sh to run the dwz utility
+The --run-dwz flag instructs find-debuginfo to run the dwz utility
 if available, and --dwz-low-mem-die-limit and --dwz-max-die-limit
 provide detailed limits.  See dwz(1) -l and -L option for details.
 Use --dwz-single-file-mode to disable multi-file mode, see dwz(1) -m
@@ -239,7 +239,7 @@ while [ $# -gt 0 ]; do
     shift
     ;;
   --version)
-    echo "debugedit find-debuginfo.sh"
+    echo "find-debuginfo @VERSION@"
     done=true;
     ;;
   --help)
This page took 0.069355 seconds and 5 git commands to generate.