public inbox for debugedit@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mark@klomp.org>
To: debugedit@sourceware.org
Cc: Mark Wielaard <mark@klomp.org>
Subject: [COMMITTED] Rename find-debuginfo.sh to find-debuginfo
Date: Tue, 18 May 2021 19:14:26 +0200	[thread overview]
Message-ID: <20210518171426.24743-1-mark@klomp.org> (raw)

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                                       |  3 ++-
 Makefile.am                                      | 12 ++++++------
 configure.ac                                     |  1 +
 scripts/{find-debuginfo.sh => find-debuginfo.in} |  8 ++++----
 4 files changed, 13 insertions(+), 11 deletions(-)
 rename scripts/{find-debuginfo.sh => find-debuginfo.in} (98%)

diff --git a/.gitignore b/.gitignore
index 3e81e87..ae33e64 100644
--- a/.gitignore
+++ b/.gitignore
@@ -31,7 +31,8 @@ debugedit.1
 sepdebugcrcfix
 sepdebugcrcfix.1
 
-find-debuginfo.sh.1
+scripts/find-debuginfo
+find-debuginfo.1
 
 atconfig
 atlocal
diff --git a/Makefile.am b/Makefile.am
index 584e532..645a502 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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
diff --git a/configure.ac b/configure.ac
index d11467e..d1d8969 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.in
similarity index 98%
rename from scripts/find-debuginfo.sh
rename to scripts/find-debuginfo.in
index 4f7ebef..82fac25 100755
--- a/scripts/find-debuginfo.sh
+++ b/scripts/find-debuginfo.in
@@ -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)
-- 
2.18.4


                 reply	other threads:[~2021-05-18 17:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210518171426.24743-1-mark@klomp.org \
    --to=mark@klomp.org \
    --cc=debugedit@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).