John Mandereau wrote:
> As for any portability issue, you can't simply remove the
> "-e" just because it works better for you.  Least you
> should do by submitting such a patch is telling us your OS
> and shell name and version; in order to be sure whether to
> apply this patch or not is to investigate which shell
> flavours and versions support or not -e flag, and in which
> cases -e is needed, by reading their respective
> documentations.  FWIW it is supported and needed on my
> system (Fedora 12, bash-4.0.35, coreutils-7.6-8 which
> provides /bin/echo).

Well, that's why I wouldn't push it without asking.  I
tested the patch on my system and the -e is clearly not
needed (everything works fine without it).

Ubuntu 9.10 (x86_64)
GNU bash 4.0.33(1)
coreutils 7.4-2ubuntu1 (with /bin/echo)

> That said, the simplest way to fix this portability issue
> is putting "@echo" at the beginning of each line.

I see.  Okay, here's a new patch that
  * cleans up some more `make help' outputs
  * incorporates multiple lines of "@echo"

I didn't know exactly what to do with these lines in
GNUmakefile.in, so I left them alone for now:

249 test:
250         @echo -en 'For tracking crashes: use\n\n\t'
251         @echo 'grep sourcefilename [...]'
252         @echo

- Mark


      
From 619b96f81df7c658725a196bf4504ec00bcc6e87 Mon Sep 17 00:00:00 2001
From: Mark Polesky <[email protected]>
Date: Tue, 19 Jan 2010 09:26:53 -0800
Subject: [PATCH] Clean up `make help' output.

* Reformat output to fit better with 80-column terminals.
* Replace "@echo -e" with multiple lines of "@echo"
    (distros implement the -e option differently).
---
 Documentation/GNUmakefile               |   45 ++++++++++++++++------------
 make/mutopia-targets.make               |   15 ++++-----
 stepmake/stepmake/generic-targets.make  |   49 ++++++++++++++++---------------
 stepmake/stepmake/texinfo-targets.make  |    9 +++--
 stepmake/stepmake/toplevel-targets.make |   45 ++++++++++++++++------------
 5 files changed, 88 insertions(+), 75 deletions(-)

diff --git a/Documentation/GNUmakefile b/Documentation/GNUmakefile
index 50f3ff6..690fe4c 100644
--- a/Documentation/GNUmakefile
+++ b/Documentation/GNUmakefile
@@ -56,7 +56,7 @@ TEXI_FILES_FROM_TELY = $(outdir)/internals.texi
 
 PDF_FILES = $(TEXINFO_MANUALS:%=$(outdir)/%.pdf)
 
-TOPDIR_HTML_MANUALS = 
+TOPDIR_HTML_MANUALS =
 UNSPLITTED_HTML_MANUALS =
 SPLITTED_HTML_MANUALS = $(foreach manual, $(TEXINFO_MANUALS),\
  $(if $(findstring $(manual), $(UNSPLITTED_HTML_MANUALS)),,$(manual)))
@@ -78,7 +78,7 @@ INFO_DOCS = lilypond-usage lilypond-changes lilypond-contributor lilypond-intern
  lilypond-essay lilypond-learning lilypond-notation music-glossary \
  lilypond-web lilypond-extending
 ifeq ($(out),www)
-INFO_DOCS += lilypond-snippets 
+INFO_DOCS += lilypond-snippets
 endif
 INFO_FILES = $(INFO_DOCS:%=$(outdir)/%.info)
 
@@ -109,23 +109,30 @@ default: local-txt-doc
 local-help: extra-local-help
 
 extra-local-help:
-	@echo -e "\
-  check-xrefs [ISOLANG=LL] validate Texinfo cross-references\n\
-  fix-xrefs [ISOLANG=LL]   interactively fix Texinfo cross-references (use with caution)\n\
-  info        update info pages\n\
-  xml	      update Docbook xml documentation\n\
-\n\
-Translations specific targets (see TRANSLATION for details):\n\
-  new-lang ISOLANG=LL  create and initialize subdirectory \'LL' for language \'LL\n\
-(if \'LL exists, update missing file)\n\
-  po-update            update and replace PO files for documentation with msgmerged versions\n\
-  check-translation ISOLANG=LL   show changes in English docs since last translation update\n\
-  update-translation ISOLANG=LL  call $$$$EDITOR to help updating the translation\n\
-  skeleton-update ISOLANG=LL     update Texinfo skeleton files\n\
-  snippet-update ISOLANG=LL      update ly snippets in Texinfo translation according to\n\
-                              docs in English (use with caution)\n\
-\n\
-LL refers to the desired locale (most often only the ISO 639 language code).\n"
+	@echo "  check-xrefs [ISOLANG=LL] validate Texinfo cross-references"
+	@echo "  fix-xrefs [ISOLANG=LL]   interactively fix Texinfo cross-references"
+	@echo "                             (use with caution)"
+	@echo "  info                     update info pages"
+	@echo "  xml                      update Docbook xml documentation"
+	@echo ""
+	@echo "Translations specific targets (see TRANSLATION for details):"
+	@echo "  new-lang ISOLANG=LL           create and initialize"
+	@echo "                                  subdirectory \'LL' for language \'LL"
+	@echo "                                  (if \'LL exists, update missing file)"
+	@echo "  po-update                     update and replace PO files for"
+	@echo "                                  documentation with msgmerged versions"
+	@echo "  check-translation ISOLANG=LL  show changes in English docs since"
+	@echo "                                  last translation update"
+	@echo "  update-translation ISOLANG=LL call $$$$EDITOR to help updating"
+	@echo "                                  the translation"
+	@echo "  skeleton-update ISOLANG=LL    update Texinfo skeleton files"
+	@echo "  snippet-update ISOLANG=LL     update ly snippets in Texinfo translation"
+	@echo "                                  according to docs in English"
+	@echo "                                  (use with caution)"
+	@echo ""
+	@echo "  LL refers to the desired locale"
+	@echo "    (most often only the ISO 639 language code)."
+	@echo ""
 
 info: $(INFO_FILES)
 	@echo export LILYPOND_DATADIR=$(LILYPOND_DATADIR)
diff --git a/make/mutopia-targets.make b/make/mutopia-targets.make
index 4eeb80e..62a754f 100644
--- a/make/mutopia-targets.make
+++ b/make/mutopia-targets.make
@@ -40,14 +40,13 @@ local-letter-clean:
 local-help: local-mutopia-help
 
 local-mutopia-help:
-	@echo -e "\
-  <NAME>      update $(outdir)/<NAME>.ps\n\
-  <NAME>-book update booklet $(outdir)/<NAME>-book.ps\n\
-  mutopia     update PNGs, PostScript a4 and letter of all mutopia-examples\n\
-  png         update PNGs of all examples\n\
-  ps          update PostScript of all examples\n\
-  scores      update PostScript of all scores\n\
-"\
+	@echo "  <NAME>      update $(outdir)/<NAME>.ps"
+	@echo "  <NAME>-book update booklet $(outdir)/<NAME>-book.ps"
+	@echo "  mutopia     update PNGs, PostScript a4 and letter of all mutopia-examples"
+	@echo "  png         update PNGs of all examples"
+	@echo "  ps          update PostScript of all examples"
+	@echo "  scores      update PostScript of all scores"
+	@echo ""\
 #
 
 
diff --git a/stepmake/stepmake/generic-targets.make b/stepmake/stepmake/generic-targets.make
index eddf25a..0b1ee5b 100644
--- a/stepmake/stepmake/generic-targets.make
+++ b/stepmake/stepmake/generic-targets.make
@@ -47,32 +47,33 @@ config:
 
 
 generic-help:
-	@echo -e "\
-Makefile for $(PACKAGE_NAME) $(TOPLEVEL_VERSION)\n\
-Usage: make ["VARIABLE=value"]... [TARGET]\n\
-\n\
-Targets specific to current directory:\n"
+	@echo "Makefile for $(PACKAGE_NAME) $(TOPLEVEL_VERSION)"
+	@echo "Usage: make ["VARIABLE=value"]... [TARGET]"
+	@echo ""
+	@echo "Targets specific to current directory:"
 
 help: generic-help local-help
-	@echo -e "Generic targets:\n\
-  all *       update everything except documentation with images\n\
-  clean *     remove all generated stuff in $(outdir)\n\
-  bin-clean * same as clean, except that mf/out is preserved\n\
-  default     same as the empty target\n\
-  doc *       update documentation with images in directory \`out-www'\n\
-  doc-stage-1 * update only PDF and Info documentation in directory \`out-www'\n\
-  doc-clean * clean \`out-www' directory\n\
-  exe         update all executables\n\
-  help        this help\n\
-  install *   install programs and data (prefix=$(prefix))\n\
-  lib         update all libraries\n\
-  uninstall*  uninstall programs and data\n\
-  TAGS        generate tagfiles\n\
-\n\
-\`make' may be invoked from any subdirectory.\n\
-Note that all commands marked with a star (*) recurse into subdirectories;\n\
-prepend \`local-' to restrict operation to the current directory.\n\
-Example: \`local-clean'."
+	@echo "Generic targets that recurse into subdirectories*:"
+	@echo "  all          update everything except documentation with images"
+	@echo "  clean        remove all generated stuff in $(outdir)"
+	@echo "  bin-clean    same as clean, except that mf/out is preserved"
+	@echo "  doc          update documentation with images in directory \`out-www'"
+	@echo "  doc-stage-1  update only PDF and Info documentation in directory \`out-www'"
+	@echo "  doc-clean    clean \`out-www' directory"
+	@echo "  install      install programs and data (prefix=$(prefix))"
+	@echo "  uninstall    uninstall programs and data"
+	@echo ""
+	@echo "  *Note: Prepend \`local-' (eg. \`local-clean') to restrict"
+	@echo "         any of the above commands to the current directory."
+	@echo ""
+	@echo "Other generic targets:"
+	@echo "  default      same as the empty target"
+	@echo "  exe          update all executables"
+	@echo "  help         this help"
+	@echo "  lib          update all libraries"
+	@echo "  TAGS         generate tagfiles"
+	@echo ""
+	@echo "\`make' may be invoked from any subdirectory."
 
 local-help:
 
diff --git a/stepmake/stepmake/texinfo-targets.make b/stepmake/stepmake/texinfo-targets.make
index 36a2e92..df3fe83 100644
--- a/stepmake/stepmake/texinfo-targets.make
+++ b/stepmake/stepmake/texinfo-targets.make
@@ -163,8 +163,9 @@ texinfo-all-menus-update:
 local-help: local-texinfo-help
 
 local-texinfo-help:
-	@echo -e "\
-  info [out=www]  update Info documentation (use \`out=www' for having images)\n\
-  install-info [out=www]   install Info documentation (idem)\n\
-  texinfo-all-menus-update update node menus in Texinfo source files (use with caution)\n"
+	@echo "  info [out=www]           update Info documentation"
+	@echo "                             (use \`out=www' for having images)"
+	@echo "  install-info [out=www]   install Info documentation (idem)"
+	@echo "  texinfo-all-menus-update update node menus in Texinfo source files"
+	@echo "                             (use with caution)"
 
diff --git a/stepmake/stepmake/toplevel-targets.make b/stepmake/stepmake/toplevel-targets.make
index 1c590b0..6fc465d 100644
--- a/stepmake/stepmake/toplevel-targets.make
+++ b/stepmake/stepmake/toplevel-targets.make
@@ -56,24 +56,29 @@ dist:
 	rm -rf $(distdir)/
 
 local-help:
-	@echo -e "\
-  config      rerun configure\n\
-  dist        roll tarball: $(depth)/$(outdir)/$(distname).tar.gz\n\
-  distclean   also remove configure output\n\
-  cvs-clean   also remove out directories and generated files\n\
-  maintainerclean also remove distributed generated files\n\
-  po          make new translation Portable Object database\n\
-  po-replace  do po-update and replace catalogs with msgmerged versions\n\
-  po-update   update translation Portable Object database\n\
-\n\
-  install-doc install website documentation in (webdir=$(webdir))\n\
-              and Info documentation with images\n\
-  uninstall-doc remove installed documentation with images\n\
-  info        build Info documentation with images\n\
-  install-info  install Info documentation with images\n\
-\n\
-Some more targets are available for testing changes:\n\
-  test-baseline  check  test-redo  test-clean\n\
-For more information on these targets, see Testing LilyPond\n\
-in Application Usage documentation.\n"
+	@echo "  config          rerun configure"
+	@echo "  dist            roll tarball: $(depth)/$(outdir)/$(distname).tar.gz"
+	@echo "  distclean       also remove configure output"
+	@echo "  cvs-clean       also remove out directories and generated files"
+	@echo "  maintainerclean also remove distributed generated files"
+	@echo "  po              make new translation Portable Object database"
+	@echo "  po-replace      do po-update and replace catalogs with msgmerged versions"
+	@echo "  po-update       update translation Portable Object database"
+	@echo ""
+	@echo "  install-doc     install website documentation in"
+	@echo "                    (webdir=$(webdir))"
+	@echo "                    and Info documentation with images"
+	@echo "  uninstall-doc   remove installed documentation with images"
+	@echo "  info            build Info documentation with images"
+	@echo "  install-info    install Info documentation with images"
+	@echo ""
+	@echo "Some more targets are available for testing changes:"
+	@echo "  test-baseline"
+	@echo "  check"
+	@echo "  test-redo"
+	@echo "  test-clean"
+	@echo ""
+	@echo "  For more information on these targets, see"
+	@echo "    \`Testing LilyPond' in the Contributor's Guide."
+	@echo ""
 
-- 
1.6.3.3

_______________________________________________
lilypond-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to