gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] gawk branch, master, updated. gawk-4.1.0-4657-gfb39babe


From: Arnold Robbins
Subject: [SCM] gawk branch, master, updated. gawk-4.1.0-4657-gfb39babe
Date: Sun, 27 Feb 2022 14:33:14 -0500 (EST)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".

The branch, master has been updated
       via  fb39babe890863fcdd6c290af8e19759387fe04b (commit)
      from  6083e965fac1b272f9ccb491902b24a24ea14122 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=fb39babe890863fcdd6c290af8e19759387fe04b

commit fb39babe890863fcdd6c290af8e19759387fe04b
Author: Arnold D. Robbins <arnold@skeeve.com>
Date:   Sun Feb 27 21:32:56 2022 +0200

    Add gawkbug script and man page.

diff --git a/.gitignore b/.gitignore
index 72445191..72308efe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,6 +13,7 @@ config.h
 config.log
 config.status
 gawk
+gawkbug
 stamp-h1
 
 test/fmtspcl.ok
diff --git a/ChangeLog b/ChangeLog
index 38418807..e36b9189 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2022-02-27         Arnold D. Robbins     <arnold@skeeve.com>
+
+       Add `gawkbug' reporting program.
+
+       * gawkbug.in: New file.
+       * Makefile.am (bin_SCRIPTS): New, for  gawkbug.
+       * configure.ac: Add gawkbug to AC_CONFIG_FILES list.
+       * NEWS: Updated.
+       * .gitignore: Updated.
+
 2022-02-27         Arnold D. Robbins     <arnold@skeeve.com>
 
        * awk.h (cant_happen): Change to allow a format string and arguments,
diff --git a/Makefile.am b/Makefile.am
index e48f61e9..5e38aac2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -70,10 +70,11 @@ SUBDIRS += extras doc awklib po test
 
 # what to make and install
 bin_PROGRAMS = gawk
+bin_SCRIPTS = gawkbug
 include_HEADERS = gawkapi.h
 BUILT_SOURCES = $(srcdir)/pc/Makefile.tst
 
-# sources for both gawk and dgawk
+# sources for gawk
 base_sources = \
        array.c \
        awk.h \
@@ -129,11 +130,14 @@ DEFLIBPATH="\"$(pkgextensiondir)\""
 DEFS= -DDEFPATH=$(DEFPATH) -DDEFLIBPATH=$(DEFLIBPATH) -DSHLIBEXT=$(SHLIBEXT) 
-DHAVE_CONFIG_H -DGAWK -DLOCALEDIR='"$(datadir)/locale"' -I"$(srcdir)/support"
 
 # Get rid of core files when cleaning
-CLEANFILES = core core.*
+CLEANFILES = core core.* $(bin_SCRIPTS)
 
 # We want hard links for install-exec-hook, below
 LN= ln
 
+# Make copies...
+CP= cp
+
 # For some make's, e.g. OpenBSD, that don't define this
 RM = rm -f
 
diff --git a/Makefile.in b/Makefile.in
index 40f2b043..5c77b9e8 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -38,6 +38,7 @@
 #
 
 
+
 VPATH = @srcdir@
 am__is_gnu_make = { \
   if test -z '$(MAKELEVEL)'; then \
@@ -139,9 +140,10 @@ am__CONFIG_DISTCLEAN_FILES = config.status config.cache 
config.log \
  configure.lineno config.status.lineno
 mkinstalldirs = $(install_sh) -d
 CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_FILES = gawkbug
 CONFIG_CLEAN_VPATH_FILES =
-am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)"
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" \
+       "$(DESTDIR)$(includedir)"
 PROGRAMS = $(bin_PROGRAMS)
 am__objects_1 = array.$(OBJEXT) awkgram.$(OBJEXT) builtin.$(OBJEXT) \
        cint_array.$(OBJEXT) command.$(OBJEXT) debug.$(OBJEXT) \
@@ -158,6 +160,34 @@ am__DEPENDENCIES_1 =
 gawk_DEPENDENCIES = support/libsupport.a $(am__DEPENDENCIES_1) \
        $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
        $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+  test -z "$$files" \
+    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+         $(am__cd) "$$dir" && rm -f $$files; }; \
+  }
+SCRIPTS = $(bin_SCRIPTS)
 AM_V_P = $(am__v_P_@AM_V@)
 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
 am__v_P_0 = false
@@ -220,33 +250,6 @@ am__can_run_installinfo = \
     n|no|NO) false;; \
     *) (install-info --version) >/dev/null 2>&1;; \
   esac
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__uninstall_files_from_dir = { \
-  test -z "$$files" \
-    || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
-    || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
-         $(am__cd) "$$dir" && rm -f $$files; }; \
-  }
 HEADERS = $(include_HEADERS)
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
   distclean-recursive maintainer-clean-recursive
@@ -276,7 +279,8 @@ am__define_uniq_tagged_files = \
   done | $(am__uniquify_input)`
 DIST_SUBDIRS = support . extension extras doc awklib po test
 am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/configh.in \
-       $(top_srcdir)/build-aux/ar-lib $(top_srcdir)/build-aux/compile \
+       $(srcdir)/gawkbug.in $(top_srcdir)/build-aux/ar-lib \
+       $(top_srcdir)/build-aux/compile \
        $(top_srcdir)/build-aux/config.guess \
        $(top_srcdir)/build-aux/config.rpath \
        $(top_srcdir)/build-aux/config.sub \
@@ -508,10 +512,11 @@ EXTRA_DIST = \
 # Build in awklib after in doc, since we want to extract
 # sample files if doc/gawk.texi changed.
 SUBDIRS = support . $(am__append_1) extras doc awklib po test
+bin_SCRIPTS = gawkbug
 include_HEADERS = gawkapi.h
 BUILT_SOURCES = $(srcdir)/pc/Makefile.tst
 
-# sources for both gawk and dgawk
+# sources for gawk
 base_sources = \
        array.c \
        awk.h \
@@ -563,11 +568,14 @@ SHLIBEXT = "\"$(GAWKLIBEXT)"\"
 DEFLIBPATH = "\"$(pkgextensiondir)\""
 
 # Get rid of core files when cleaning
-CLEANFILES = core core.*
+CLEANFILES = core core.* $(bin_SCRIPTS)
 
 # We want hard links for install-exec-hook, below
 LN = ln
 
+# Make copies...
+CP = cp
+
 # For some make's, e.g. OpenBSD, that don't define this
 RM = rm -f
 all: $(BUILT_SOURCES) config.h
@@ -623,6 +631,8 @@ $(srcdir)/configh.in:  $(am__configure_deps)
 
 distclean-hdr:
        -rm -f config.h stamp-h1
+gawkbug: $(top_builddir)/config.status $(srcdir)/gawkbug.in
+       cd $(top_builddir) && $(SHELL) ./config.status $@
 install-binPROGRAMS: $(bin_PROGRAMS)
        @$(NORMAL_INSTALL)
        @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
@@ -669,6 +679,41 @@ clean-binPROGRAMS:
 gawk$(EXEEXT): $(gawk_OBJECTS) $(gawk_DEPENDENCIES) $(EXTRA_gawk_DEPENDENCIES) 
        @rm -f gawk$(EXEEXT)
        $(AM_V_CCLD)$(LINK) $(gawk_OBJECTS) $(gawk_LDADD) $(LIBS)
+install-binSCRIPTS: $(bin_SCRIPTS)
+       @$(NORMAL_INSTALL)
+       @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+       fi; \
+       for p in $$list; do \
+         if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+         if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+       done | \
+       sed -e 'p;s,.*/,,;n' \
+           -e 'h;s|.*|.|' \
+           -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+       $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+         { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+           if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+             if (++n[d] == $(am__install_max)) { \
+               print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+           else { print "f", d "/" $$4, $$1 } } \
+         END { for (d in files) print "f", d, files[d] }' | \
+       while read type dir files; do \
+            if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+            test -z "$$files" || { \
+              echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+              $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit 
$$?; \
+            } \
+       ; done
+
+uninstall-binSCRIPTS:
+       @$(NORMAL_UNINSTALL)
+       @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+       files=`for p in $$list; do echo "$$p"; done | \
+              sed -e 's,.*/,,;$(transform)'`; \
+       dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -1054,10 +1099,10 @@ check-am: all-am
        $(MAKE) $(AM_MAKEFLAGS) check-local
 check: $(BUILT_SOURCES)
        $(MAKE) $(AM_MAKEFLAGS) check-recursive
-all-am: Makefile $(PROGRAMS) $(HEADERS) config.h
+all-am: Makefile $(PROGRAMS) $(SCRIPTS) $(HEADERS) config.h
 installdirs: installdirs-recursive
 installdirs-am:
-       for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(includedir)"; do \
+       for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" 
"$(DESTDIR)$(includedir)"; do \
          test -z "$$dir" || $(MKDIR_P) "$$dir"; \
        done
 install: $(BUILT_SOURCES)
@@ -1148,7 +1193,7 @@ install-dvi: install-dvi-recursive
 
 install-dvi-am:
 
-install-exec-am: install-binPROGRAMS
+install-exec-am: install-binPROGRAMS install-binSCRIPTS
        @$(NORMAL_INSTALL)
        $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
 install-html: install-html-recursive
@@ -1213,7 +1258,8 @@ ps: ps-recursive
 
 ps-am:
 
-uninstall-am: uninstall-binPROGRAMS uninstall-includeHEADERS
+uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS \
+       uninstall-includeHEADERS
 
 .MAKE: $(am__recursive_targets) all check check-am install install-am \
        install-exec install-exec-am install-strip
@@ -1227,15 +1273,16 @@ uninstall-am: uninstall-binPROGRAMS 
uninstall-includeHEADERS
        distclean-generic distclean-hdr distclean-local distclean-tags \
        distcleancheck distdir distuninstallcheck dvi dvi-am html \
        html-am info info-am install install-am install-binPROGRAMS \
-       install-data install-data-am install-dvi install-dvi-am \
-       install-exec install-exec-am install-exec-hook install-html \
-       install-html-am install-includeHEADERS install-info \
-       install-info-am install-man install-pdf install-pdf-am \
-       install-ps install-ps-am install-strip installcheck \
-       installcheck-am installdirs installdirs-am maintainer-clean \
-       maintainer-clean-generic mostlyclean mostlyclean-compile \
-       mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \
-       uninstall-am uninstall-binPROGRAMS uninstall-includeHEADERS
+       install-binSCRIPTS install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-exec-hook \
+       install-html install-html-am install-includeHEADERS \
+       install-info install-info-am install-man install-pdf \
+       install-pdf-am install-ps install-ps-am install-strip \
+       installcheck installcheck-am installdirs installdirs-am \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
+       tags tags-am uninstall uninstall-am uninstall-binPROGRAMS \
+       uninstall-binSCRIPTS uninstall-includeHEADERS
 
 .PRECIOUS: Makefile
 
diff --git a/NEWS b/NEWS
index f2e0e80e..e7af9926 100644
--- a/NEWS
+++ b/NEWS
@@ -31,6 +31,8 @@ remains, but it does nothing.
 6. The rwarray extension has two new functions, writeall() and readall(),
 for saving / restoring all of gawk's variables and arrays.
 
+7. The new `gawkbug' script should be used for reporting bugs.
+
 Changes from 5.1.1 to 5.1.2
 ---------------------------
 
diff --git a/configure b/configure
index eeef58c6..648eabd0 100755
--- a/configure
+++ b/configure
@@ -13682,6 +13682,8 @@ esac
 
 ac_config_files="$ac_config_files Makefile support/Makefile awklib/Makefile 
doc/Makefile extras/Makefile po/Makefile.in test/Makefile"
 
+ac_config_files="$ac_config_files gawkbug"
+
 if test "$enable_extensions" = "yes"
 then
 
@@ -14439,6 +14441,7 @@ do
     "extras/Makefile") CONFIG_FILES="$CONFIG_FILES extras/Makefile" ;;
     "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
     "test/Makefile") CONFIG_FILES="$CONFIG_FILES test/Makefile" ;;
+    "gawkbug") CONFIG_FILES="$CONFIG_FILES gawkbug" ;;
 
   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
@@ -15241,6 +15244,7 @@ See \`config.log' for more details" "$LINENO" 5; }
         ;;
       esac
     done ;;
+    "gawkbug":F) chmod +x gawkbug ;;
 
   esac
 done # for ac_tag
diff --git a/configure.ac b/configure.ac
index 31fdfff2..38197101 100644
--- a/configure.ac
+++ b/configure.ac
@@ -475,13 +475,14 @@ dylib)    GAWKLIBEXT=so ;;        # MacOS uses .dylib for 
shared libraries, but libtool us
 esac
 AC_SUBST(GAWKLIBEXT)
 
-AC_CONFIG_FILES(Makefile
+AC_CONFIG_FILES([Makefile
        support/Makefile
        awklib/Makefile
        doc/Makefile
        extras/Makefile
        po/Makefile.in
-       test/Makefile)
+       test/Makefile])
+AC_CONFIG_FILES([gawkbug], [chmod +x gawkbug])
 if test "$enable_extensions" = "yes"
 then
        AC_CONFIG_SUBDIRS(extension)
diff --git a/doc/ChangeLog b/doc/ChangeLog
index 5d8cc9af..26452dfa 100644
--- a/doc/ChangeLog
+++ b/doc/ChangeLog
@@ -1,3 +1,8 @@
+2022-02-27         Arnold D. Robbins     <arnold@skeeve.com>
+
+       * gawkbug.1, wordlist5: New files.
+       * Makefile.am: Adjust everything for additional man page.
+
 2022-02-27         Arnold D. Robbins     <arnold@skeeve.com>
 
        * gawktexi.in (Array Sorting Functions): Add a note to be careful
diff --git a/doc/Makefile.am b/doc/Makefile.am
index e5d6bf19..fd44ba53 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -27,7 +27,7 @@
 
 info_TEXINFOS = gawk.texi gawkinet.texi gawkworkflow.texi
 
-man_MANS = gawk.1
+man_MANS = gawk.1 gawkbug.1
 
 EXTRA_DIST = ChangeLog ChangeLog.0 ChangeLog.1 \
        README.card ad.block setter.outline \
@@ -54,7 +54,7 @@ EXTRA_DIST = ChangeLog ChangeLog.0 ChangeLog.1 \
        bc_notes
 
 # Get rid of generated files when cleaning
-CLEANFILES = *.ps *.html *.dvi *~ awkcard.nc awkcard.tr gawk.pdf gawkinet.pdf 
gawkworkflow.pdf awkcard.pdf gawk.1.pdf
+CLEANFILES = *.ps *.html *.dvi *~ awkcard.nc awkcard.tr gawk.pdf gawkinet.pdf 
gawkworkflow.pdf awkcard.pdf gawk.1.pdf gawkbug.1.pdf
 
 MAKEINFO = @MAKEINFO@ --no-split --force
 
@@ -80,9 +80,9 @@ AWKCARD = awkcard.ps
 gawk.texi: $(srcdir)/gawktexi.in $(srcdir)/sidebar.awk
        awk -f $(srcdir)/sidebar.awk < $(srcdir)/gawktexi.in > gawk.texi
 
-postscript: gawk.ps gawkinet.ps gawkworkflow.ps gawk.1.ps $(AWKCARD)
+postscript: gawk.ps gawkinet.ps gawkworkflow.ps gawk.1.ps gawkbug.1.ps 
$(AWKCARD)
 
-pdf-local: postscript gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf
+pdf-local: postscript gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf 
gawkbug.1.pdf
 
 gawk.ps: gawk.dvi
        TEXINPUTS=$(srcdir): dvips -o gawk.ps gawk.dvi
@@ -99,6 +99,12 @@ gawk.1.ps: gawk.1
 gawk.1.pdf: gawk.1.ps
        ps2pdf gawk.1.ps gawk.1.pdf
 
+gawkbug.1.ps: gawkbug.1
+       -groff -man $(srcdir)/gawkbug.1 > gawkbug.1.ps
+
+gawkbug.1.pdf: gawkbug.1.ps
+       ps2pdf gawkbug.1.ps gawkbug.1.pdf
+
 awkcard.tr: awkcard.in
        sed 's:SRCDIR:$(srcdir):' < $(srcdir)/awkcard.in > awkcard.tr
 
@@ -123,11 +129,18 @@ spellworkflow:
        export LC_ALL=C ; spell "$(srcdir)"/gawkworkflow.texi | \
        sort -u | comm -23 - "$(srcdir)"/wordlist2
 
-spellmanpage:
+spellmanpage: spellgawkmanpage spellgawkbugmanpage
+
+spellgawkmanpage:
        @echo ==== gawk.1 ====
        export LC_ALL=C ; spell "$(srcdir)"/gawk.1 | \
        sort -u | comm -23 - "$(srcdir)"/wordlist3
 
+spellgawkbugmanpage:
+       @echo ==== gawkbug.1 ====
+       export LC_ALL=C ; spell "$(srcdir)"/gawkbug.1 | \
+       sort -u | comm -23 - "$(srcdir)"/wordlist5
+
 spellinet:
        @echo ==== gawkinet.texi ====
        export LC_ALL=C ; spell "$(srcdir)"/gawkinet.texi | \
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 2984eb32..aa9f18e7 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -365,7 +365,7 @@ top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
 info_TEXINFOS = gawk.texi gawkinet.texi gawkworkflow.texi
-man_MANS = gawk.1
+man_MANS = gawk.1 gawkbug.1
 EXTRA_DIST = ChangeLog ChangeLog.0 ChangeLog.1 \
        README.card ad.block setter.outline \
        awkcard.in awkforai.txt texinfo.tex cardfonts \
@@ -392,7 +392,7 @@ EXTRA_DIST = ChangeLog ChangeLog.0 ChangeLog.1 \
 
 
 # Get rid of generated files when cleaning
-CLEANFILES = *.ps *.html *.dvi *~ awkcard.nc awkcard.tr gawk.pdf gawkinet.pdf 
gawkworkflow.pdf awkcard.pdf gawk.1.pdf
+CLEANFILES = *.ps *.html *.dvi *~ awkcard.nc awkcard.tr gawk.pdf gawkinet.pdf 
gawkworkflow.pdf awkcard.pdf gawk.1.pdf gawkbug.1.pdf
 TROFF = groff -t -Tps -U
 SEDME = sed -e "s/^level0 restore/level0 restore flashme 100 72 moveto 
(Copyright `date '+%m-%d-%y %T'`, FSF, Inc. (all)) show/" \
                -e "s/^\/level0 save def/\/level0 save def 30 -48 translate/"
@@ -905,9 +905,9 @@ uninstall-man: uninstall-man1
 gawk.texi: $(srcdir)/gawktexi.in $(srcdir)/sidebar.awk
        awk -f $(srcdir)/sidebar.awk < $(srcdir)/gawktexi.in > gawk.texi
 
-postscript: gawk.ps gawkinet.ps gawkworkflow.ps gawk.1.ps $(AWKCARD)
+postscript: gawk.ps gawkinet.ps gawkworkflow.ps gawk.1.ps gawkbug.1.ps 
$(AWKCARD)
 
-pdf-local: postscript gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf
+pdf-local: postscript gawk.pdf gawkinet.pdf awkcard.pdf gawk.1.pdf 
gawkbug.1.pdf
 
 gawk.ps: gawk.dvi
        TEXINPUTS=$(srcdir): dvips -o gawk.ps gawk.dvi
@@ -924,6 +924,12 @@ gawk.1.ps: gawk.1
 gawk.1.pdf: gawk.1.ps
        ps2pdf gawk.1.ps gawk.1.pdf
 
+gawkbug.1.ps: gawkbug.1
+       -groff -man $(srcdir)/gawkbug.1 > gawkbug.1.ps
+
+gawkbug.1.pdf: gawkbug.1.ps
+       ps2pdf gawkbug.1.ps gawkbug.1.pdf
+
 awkcard.tr: awkcard.in
        sed 's:SRCDIR:$(srcdir):' < $(srcdir)/awkcard.in > awkcard.tr
 
@@ -948,11 +954,18 @@ spellworkflow:
        export LC_ALL=C ; spell "$(srcdir)"/gawkworkflow.texi | \
        sort -u | comm -23 - "$(srcdir)"/wordlist2
 
-spellmanpage:
+spellmanpage: spellgawkmanpage spellgawkbugmanpage
+
+spellgawkmanpage:
        @echo ==== gawk.1 ====
        export LC_ALL=C ; spell "$(srcdir)"/gawk.1 | \
        sort -u | comm -23 - "$(srcdir)"/wordlist3
 
+spellgawkbugmanpage:
+       @echo ==== gawkbug.1 ====
+       export LC_ALL=C ; spell "$(srcdir)"/gawkbug.1 | \
+       sort -u | comm -23 - "$(srcdir)"/wordlist5
+
 spellinet:
        @echo ==== gawkinet.texi ====
        export LC_ALL=C ; spell "$(srcdir)"/gawkinet.texi | \
diff --git a/doc/gawkbug.1 b/doc/gawkbug.1
new file mode 100644
index 00000000..eb6889e7
--- /dev/null
+++ b/doc/gawkbug.1
@@ -0,0 +1,72 @@
+.\"
+.\" MAN PAGE COMMENTS to
+.\"
+.\"     Arnold Robbins
+.\"     bug-gawk@gnu.org
+.\"
+.\"     Last Change: Sat Feb 26 22:38:19 IST 2022
+.\"
+.TH GAWKBUG 1 "2022 Feb 26" "GNU Awk 5.2"
+.SH NAME
+gawkbug \- report a bug in gawk
+.SH SYNOPSIS
+\fBgawkbug\fP [\fI--version\fP] [\fI--help\fP] [\fIemail-address\fP]
+.SH DESCRIPTION
+.B gawkbug
+is a shell script to help the user compose and mail bug reports
+concerning gawk in a standard format.
+.B gawkbug
+invokes the editor specified by the environment variable
+.SM
+.B EDITOR
+on a temporary copy of the bug report format outline. The user must
+fill in the appropriate fields and exit the editor.
+.B gawkbug
+then mails the completed report to \fIbug-gawk@gnu.org\fP, or
+\fIemail-address\fP.  If the report cannot be mailed, it is saved in the
+file \fIdead.gawkbug\fP in the invoking user's home directory.
+.PP
+The bug report format outline consists of several sections.  The first
+section provides information about the machine, operating system, the
+gawk version, and the compilation environment.  The second section
+should be filled in with a description of the bug.  The third section
+should be a description of how to reproduce the bug.  The optional
+fourth section is for a proposed fix.  Fixes are encouraged.
+.SH ENVIRONMENT
+.B gawkbug
+will utilize the following environment variables if they exist:
+.TP
+.B EDITOR
+Specifies the preferred editor. If
+.SM
+.B EDITOR
+is not set,
+.B gawkbug
+attempts to locate a number of alternative editors, including
+.BR vim ,
+and if must,
+.BR emacs .
+If
+.B gawkbug
+cannot locate any of the alternative editors, it attempts to execute \fBvi\fP.
+.TP
+.B HOME
+Directory in which the failed bug report is saved if the mail fails.
+.TP
+.B TMPDIR
+Directory in which to create temporary files and directories.
+.SH "SEE ALSO"
+.TP
+\fIgawk\fP(1)
+.SH AUTHORS
+Brian Fox, Free Software Foundation
+.br
+bfox@gnu.org
+.PP
+Chet Ramey, Case Western Reserve University
+.br
+chet@po.cwru.edu
+.PP
+Arnold Robbins
+.br
+bug-gawk@gnu.org
diff --git a/doc/wordlist5 b/doc/wordlist5
new file mode 100644
index 00000000..63b99038
--- /dev/null
+++ b/doc/wordlist5
@@ -0,0 +1,13 @@
+Awk
+Chet
+GAWKBUG
+IST
+Ramey
+TMPDIR
+bfox
+chet
+cwru
+edu
+gawkbug
+org
+po
diff --git a/gawkbug.in b/gawkbug.in
new file mode 100644
index 00000000..7e13ec5e
--- /dev/null
+++ b/gawkbug.in
@@ -0,0 +1,277 @@
+#!/bin/sh -
+#
+# gawkbug - create a bug report and mail it to the bug address
+#
+# All mail defaults to bug-gawk@gnu.org. Unlike the original bashbug
+# script, we don't differentiate on the release status.
+#
+# Copyright (C) 1996-2022 Free Software Foundation, Inc.
+#
+#   This program is free software: you can redistribute it and/or modify
+#   it under the terms of the GNU General Public License as published by
+#   the Free Software Foundation, either version 3 of the License, or
+#   (at your option) any later version.
+#
+#   This program is distributed in the hope that it will be useful,
+#   but WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#   GNU General Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License
+#   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+#
+# configuration section:
+#      these variables are filled in by the make target in Makefile
+#
+MACHINE="@host_cpu@"
+OS="@host_os@"
+CC="@CC@"
+CFLAGS="@CFLAGS@"
+VERSION="@PACKAGE_VERSION@"
+MACHTYPE="@host@"
+
+PATH=/bin:/usr/bin:/usr/local/bin:$PATH
+export PATH
+
+# Check if TMPDIR is set, default to /tmp
+: ${TMPDIR:=/tmp}
+
+#Securely create a temporary directory for the temporary files
+TEMPDIR=$TMPDIR/bbug.$$
+(umask 077 && mkdir "$TEMPDIR") || {
+       echo "$0: could not create temporary directory" >&2
+       exit 1
+}
+
+TEMPFILE1=$TEMPDIR/bbug1
+TEMPFILE2=$TEMPDIR/bbug2
+        
+USAGE="Usage: $0 [--help] [--version] [bug-report-email-address]"
+VERSTR="GNU gawkbug, version ${VERSION}"
+
+do_help= do_version=
+
+while [ $# -gt 0 ]
+do
+       case "$1" in
+       --help)         shift ; do_help=y ;;
+       --version)      shift ; do_version=y ;;
+       --)             shift ; break ;;
+       -*)             echo "gawkbug: ${1}: invalid option" >&2
+                       echo "$USAGE" >&2
+                       exit 2 ;;
+       *)              break ;;
+       esac
+done
+
+if [ -n "$do_version" ]
+then
+       echo "${VERSTR}"
+       exit 0
+fi
+
+if [ -n "$do_help" ]
+then
+       echo "${VERSTR}"
+       echo "${USAGE}"
+       echo
+       cat << HERE_EOF
+Gawkbug is used to send mail to the Gawk maintainers
+for when Gawk doesn't behave like you'd like, or expect.
+
+Gawkbug will start up your editor (as defined by the shell's
+EDITOR environment variable) with a preformatted bug report
+template for you to fill in. The report will be mailed to the
+bug-gawk mailing list by default. See the manual for details.
+
+If you invoke gawkbug by accident, just quit your editor without
+saving any changes to the template, and no bug report will be sent.
+HERE_EOF
+       exit 0
+fi
+
+# Figure out how to echo a string without a trailing newline
+N=`echo 'hi there\c'`
+case "$N" in
+*c)    n=-n c= ;;
+*)     n= c='\c' ;;
+esac
+
+BUGGAWK=bug-gawk@gnu.org
+
+BUGADDR="${1-$BUGGAWK}"
+
+if [ -z "$DEFEDITOR" ] && [ -z "$EDITOR" ]
+then
+       if [ -x /usr/bin/editor ]
+       then
+               DEFEDITOR=editor
+       elif [ -x /usr/bin/vim ]
+       then
+               DEFEDITOR=vim
+       elif [ -x /usr/bin/gvim ]
+       then
+               DEFEDITOR=gvim
+       elif [ -x /usr/local/bin/ce ]
+       then
+               DEFEDITOR=ce
+       elif [ -x /usr/local/bin/emacs ]
+       then
+               DEFEDITOR=emacs
+       elif [ -x /usr/contrib/bin/emacs ]
+       then
+               DEFEDITOR=emacs
+       elif [ -x /usr/bin/emacs ]
+       then
+               DEFEDITOR=emacs
+       elif [ -x /usr/bin/xemacs ]
+       then
+               DEFEDITOR=xemacs
+       elif [ -x /usr/bin/nano ]
+       then
+               DEFEDITOR=nano
+       elif [ -x /usr/contrib/bin/jove ]
+       then
+               DEFEDITOR=jove
+       elif [ -x /usr/local/bin/jove ]
+       then
+               DEFEDITOR=jove
+       elif [ -x /usr/bin/vi ]
+       then
+               DEFEDITOR=vi
+       else
+               echo "$0: No default editor found: attempting to use vi" >&2
+               DEFEDITOR=vi
+       fi
+fi
+
+
+: ${EDITOR=$DEFEDITOR}
+
+: ${USER=${LOGNAME-`whoami`}}
+
+trap 'rm -rf "$TEMPDIR"; exit 1' 1 2 3 13 15
+trap 'rm -rf "$TEMPDIR"' 0
+
+UN=
+if (uname) >/dev/null 2>&1
+then
+       UN=`uname -a`
+fi
+
+if [ -f /usr/lib/sendmail ]
+then
+       RMAIL="/usr/lib/sendmail"
+       SMARGS="-i -t"
+elif [ -f /usr/sbin/sendmail ]
+then
+       RMAIL="/usr/sbin/sendmail"
+       SMARGS="-i -t"
+else
+       RMAIL=rmail
+       SMARGS="$BUGADDR"
+fi
+
+INITIAL_SUBJECT='[50 character or so descriptive subject here (for reference)]'
+
+cat > "$TEMPFILE1" <<EOF
+From: ${USER}
+To: ${BUGADDR}
+Subject: ${INITIAL_SUBJECT}
+
+Configuration Information [Automatically generated, do not change]:
+Machine: $MACHINE
+OS: $OS
+Compiler: $CC
+Compilation CFLAGS: $CFLAGS
+uname output: $UN
+Machine Type: $MACHTYPE
+
+Gawk Version: $VERSION
+
+Description:
+       [Detailed description of the problem, suggestion, or complaint.]
+
+Repeat-By:
+       [Describe the sequence of events that causes the problem
+       to occur.]
+
+Fix:
+       [Description of how to fix the problem.  If you don't know a
+       fix for the problem, don't include this section.]
+EOF
+
+cp "$TEMPFILE1" "$TEMPFILE2"
+chmod u+w "$TEMPFILE1"
+
+trap '' 2              # ignore interrupts while in editor
+
+edstat=1
+while [ $edstat -ne 0 ]
+do
+       $EDITOR "$TEMPFILE1"
+       edstat=$?
+
+       if [ $edstat -ne 0 ]
+       then
+               echo "$0: editor \`$EDITOR' exited with nonzero status."
+               echo "$0: Perhaps it was interrupted."
+               echo "$0: Type \`y' to give up, and lose your bug report;"
+               echo "$0: type \`n' to re-enter the editor."
+               echo $n "$0: Do you want to give up? $c"
+
+               read ans
+               case "$ans" in
+               [Yy]*) exit 1 ;;
+               esac
+
+               continue
+       fi
+
+       # find the subject from the temp file and see if it's been changed
+       CURR_SUB=`grep '^Subject: ' "$TEMPFILE1" | sed 's|^Subject:[    ]*||' | 
sed 1q`
+
+       case "$CURR_SUB" in
+       "${INITIAL_SUBJECT}")
+               echo
+               echo "$0: You have not changed the subject from the default."
+               echo "$0: Please use a more descriptive subject header."
+               echo "$0: Type \`y' to give up, and lose your bug report;"
+               echo "$0: type \`n' to re-enter the editor."
+               echo $n "$0: Do you want to give up? $c"
+
+               read ans
+               case "$ans" in
+               [Yy]*) exit 1 ;;
+               esac
+
+               echo "$0:  The editor will be restarted in five seconds."
+               sleep 5
+               edstat=1
+               ;;
+       esac
+
+done
+
+trap 'rm -rf "$TEMPDIR"; exit 1' 2     # restore trap on SIGINT
+
+if cmp -s "$TEMPFILE1" "$TEMPFILE2"
+then
+       echo "File not changed, no bug report submitted."
+       exit
+fi
+
+echo $n "Send bug report to ${BUGADDR}? [y/n] $c"
+read ans
+case "$ans" in
+[Nn]*) exit 0 ;;
+esac
+
+${RMAIL} $SMARGS < "$TEMPFILE1" || {
+       cat "$TEMPFILE1" >> $HOME/dead.gawkbug
+       echo "$0: mail to ${BUGADDR} failed: report saved in 
$HOME/dead.gawkbug" >&2
+       echo "$0: please send it manually to ${BUGADDR}" >&2
+}
+
+exit 0

-----------------------------------------------------------------------

Summary of changes:
 .gitignore      |   1 +
 ChangeLog       |  10 ++
 Makefile.am     |   8 +-
 Makefile.in     | 137 +++++++++++++++++++---------
 NEWS            |   2 +
 configure       |   4 +
 configure.ac    |   5 +-
 doc/ChangeLog   |   5 +
 doc/Makefile.am |  23 ++++-
 doc/Makefile.in |  23 ++++-
 doc/gawkbug.1   |  72 +++++++++++++++
 doc/wordlist5   |  13 +++
 gawkbug.in      | 277 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 13 files changed, 521 insertions(+), 59 deletions(-)
 create mode 100644 doc/gawkbug.1
 create mode 100644 doc/wordlist5
 create mode 100644 gawkbug.in


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]