all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Bastien Guerry <bzg@altern.org>,
	12411@debbugs.gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#12411: 24.2.50; No `make help' target?
Date: Wed, 28 Aug 2019 01:56:14 +0200	[thread overview]
Message-ID: <CADwFkmnAibEP87isE0T_vHa2PqaHtgJHDqnPoFdTtgca=Ohajg@mail.gmail.com> (raw)
In-Reply-To: <83sgpujw2j.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1675 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

> > I'm not a Makefile expert, so I couldn't find a way to skip the
> > configure step and immediately echo.
>
> There's GNUmakefile which could be used for that purpose.

Thanks.  I think I was able to find a good way to do it using that file.

> > +     @echo "make clean            -- delete files from build"
> > +     @echo "make mostlyclean      -- delete most files from build"
> > +     @echo "make distclean        -- delete files from build and configure"
> > +     @echo "make maintainer-clean -- delete almost everything that can be regenerated"
>
> It would be good to have these 4 more descriptive.  The above
> basically just repeats the target names, which is not very helpful.

I've extended that.

> > +     @echo "make bootstrap        -- delete all files and force a new bootstrap"
>
> "Delete all files" sounds scary, and is also incorrect.

Fixed.

> > +     @echo "make uninstall        -- delete all installed files"
>
> I'd say "remove files installed by 'make install'"

Done.

> > +     @echo "make docs             -- generate Emacs documentation"
> > +     @echo "make html             -- generate html documentation"
> > +     @echo "make ps               -- generate ps documentation"
> > +     @echo "make pdf              -- generate pdf documentation"
>
> The description of "make docs" should tell which formats it produces,
> otherwise its relation to the 3 other docs-related targets is not
> clear.

Done.

> Thanks.

Thanks for reviewing.  Please find attached a revised patch,
incorporating your changes and also announcing this feature in NEWS
for bigger visibility.

Best regards,
Stefan Kangas

[-- Attachment #2: 0001-Add-new-make-help-target.patch --]
[-- Type: application/octet-stream, Size: 3251 bytes --]

From 90e9b62c689e6b601d3be8533eea49b94dccd99a Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas@gmail.com>
Date: Wed, 21 Aug 2019 01:02:43 +0200
Subject: [PATCH] Add new "make help" target

* GNUmakefile: Add new "help" target that shows a brief summary of
common make targets.  (Bug#12411)
* INSTALL
* etc/NEWS: Announce it.
---
 GNUmakefile | 33 +++++++++++++++++++++++++++++++++
 INSTALL     |  3 +++
 etc/NEWS    |  2 ++
 3 files changed, 38 insertions(+)

diff --git a/GNUmakefile b/GNUmakefile
index a67624e1f7..274109ca48 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -32,6 +32,38 @@
 # But run 'autogen.sh' first, if the source was checked out directly
 # from the repository.
 
+# Display help.
+
+ifeq (help,$(filter help,$(MAKECMDGOALS)))
+help:
+	@echo "NOTE:  This is a brief summary of some common make targets."
+	@echo "For more detailed information, please read the files INSTALL,"
+	@echo "INSTALL.REPO, Makefile or visit this URL:"
+	@echo "http://www.gnu.org/prep/standards/html_node/Standard-Targets.html"
+	@echo ""
+	@echo "make all              -- compile and build Emacs"
+	@echo "make install          -- install Emacs"
+	@echo "make TAGS             -- update tags tables"
+	@echo "make clean            -- delete built files but preserve configuration"
+	@echo "make mostlyclean      -- like 'make clean', but leave those files that"
+	@echo "                         usually do not need to be recompiled"
+	@echo "make distclean        -- delete all build and configuration files,"
+	@echo "                         leave only files included in source distribution"
+	@echo "make maintainer-clean -- delete almost everything that can be regenerated"
+	@echo "make bootstrap        -- delete all compiled files to force a new bootstrap"
+	@echo "                         from a clean slate, then build in the normal way"
+	@echo "make uninstall        -- remove files installed by 'make install'"
+	@echo "make check            -- run the Emacs test suite"
+	@echo "make docs             -- generate Emacs documentation in info format"
+	@echo "make html             -- generate documentation in html format"
+	@echo "make ps               -- generate documentation in ps format"
+	@echo "make pdf              -- generate documentation in pdf format "
+	@exit
+
+.PHONY: help
+
+else
+
 # If a Makefile already exists, just use it.
 
 ifeq ($(wildcard Makefile),Makefile)
@@ -82,3 +114,4 @@ .PHONY:
 
 endif
 endif
+endif
diff --git a/INSTALL b/INSTALL
index 6934022c4e..86f9e0080c 100644
--- a/INSTALL
+++ b/INSTALL
@@ -109,6 +109,9 @@ sections if you need to.
   (provided you have the 'gzip' program) those installed Lisp source (.el)
   files that have corresponding .elc versions, as well as the Info files.
 
+  You can read a brief summary about common make targets:
+
+                make help
 
 ADDITIONAL DISTRIBUTION FILES
 
diff --git a/etc/NEWS b/etc/NEWS
index cf187598ce..dea413f1a7 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -129,6 +129,8 @@ This is intended mostly to help developers.
 ** Emacs now requires GTK 2.24 and GTK 3.10 for the GTK 2 and GTK 3
 builds respectively.
 
+** New make target 'help' shows a summary of common make targets.
+
 \f
 * Startup Changes in Emacs 27.1
 
-- 
2.23.0


  reply	other threads:[~2019-08-27 23:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-11  9:05 bug#12411: 24.2.50; No `make help' target? Bastien
2012-09-11 19:14 ` Glenn Morris
2012-09-11 20:34   ` Bastien
2012-09-12  7:52     ` Glenn Morris
2012-09-12  9:59       ` Bastien
2012-09-13  2:47         ` Glenn Morris
2012-09-13 12:43           ` Stefan Monnier
2012-09-13  3:23       ` Stefan Monnier
2019-08-20 23:09 ` Stefan Kangas
2019-08-21 16:57   ` Eli Zaretskii
2019-08-27 23:56     ` Stefan Kangas [this message]
2019-08-28 11:28       ` Eli Zaretskii
2019-08-29 10:01         ` Stefan Kangas

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='CADwFkmnAibEP87isE0T_vHa2PqaHtgJHDqnPoFdTtgca=Ohajg@mail.gmail.com' \
    --to=stefan@marxist.se \
    --cc=12411@debbugs.gnu.org \
    --cc=bzg@altern.org \
    --cc=eliz@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.