* bug#12411: 24.2.50; No `make help' target?
@ 2012-09-11 9:05 Bastien
2012-09-11 19:14 ` Glenn Morris
2019-08-20 23:09 ` Stefan Kangas
0 siblings, 2 replies; 13+ messages in thread
From: Bastien @ 2012-09-11 9:05 UTC (permalink / raw)
To: 12411
`make help' and `make targets' don't exist in last rev.
I think it would help.
In GNU Emacs 24.2.50.1 (i686-pc-linux-gnu, GTK+ Version 2.24.10)
of 2012-09-10 on myhost
Bzr revision: 109965 cyd@gnu.org-20120910032510-vrblnwlfnsb0cx3s
Windowing system distributor `The X.Org Foundation', version 11.0.11201000
Important settings:
value of $LANG: fr_FR.UTF-8
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
--
Bastien
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#12411: 24.2.50; No `make help' target?
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
2019-08-20 23:09 ` Stefan Kangas
1 sibling, 1 reply; 13+ messages in thread
From: Glenn Morris @ 2012-09-11 19:14 UTC (permalink / raw)
To: Bastien; +Cc: 12411
Bastien wrote:
> `make help' and `make targets' don't exist in last rev.
In general, Emacs has the standard GNU Makefile targets:
http://www.gnu.org/prep/standards/html_node/Standard-Targets.html
Your proposed two are not in that list.
Could you say what you want them to do?
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#12411: 24.2.50; No `make help' target?
2012-09-11 19:14 ` Glenn Morris
@ 2012-09-11 20:34 ` Bastien
2012-09-12 7:52 ` Glenn Morris
0 siblings, 1 reply; 13+ messages in thread
From: Bastien @ 2012-09-11 20:34 UTC (permalink / raw)
To: Glenn Morris; +Cc: 12411
Glenn Morris <rgm@gnu.org> writes:
> Bastien wrote:
>
>> `make help' and `make targets' don't exist in last rev.
>
> In general, Emacs has the standard GNU Makefile targets:
>
> http://www.gnu.org/prep/standards/html_node/Standard-Targets.html
>
> Your proposed two are not in that list.
> Could you say what you want them to do?
My bad, I thought the `help' target was a GNU standard.
`make help' would display a one-line help about the various
available targets:
# make all
# make install
# make TAGS
# make clean (or make mostlyclean)
# make distclean
# make maintainer-clean
# make extraclean
# make bootstrap
(Taken from INSTALL, not from the actual Makefile.)
If I'm not confused, the last two targets are not in the
GNU standards (`bootstrap' and `extraclean').
Documenting `make extraclean' is not important IMO but
documenting `make bootstrap' could be: there are often
questions on emacs-devel which are answered by "You need
to `make bootstrap'."
I guess `make help' could give a better exposure to this
option?
--
Bastien
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#12411: 24.2.50; No `make help' target?
2012-09-11 20:34 ` Bastien
@ 2012-09-12 7:52 ` Glenn Morris
2012-09-12 9:59 ` Bastien
2012-09-13 3:23 ` Stefan Monnier
0 siblings, 2 replies; 13+ messages in thread
From: Glenn Morris @ 2012-09-12 7:52 UTC (permalink / raw)
To: Bastien; +Cc: 12411
Bastien wrote:
> `make help' would display a one-line help about the various
> available targets:
sed -n 's/^\([a-z]*\):.*/\1/p' Makefile # plus uniq...
They are all pretty much standard targets, and documented at the top of
the Makefile.
> Documenting `make extraclean' is not important IMO but documenting
> `make bootstrap' could be: there are often questions on emacs-devel
> which are answered by "You need to `make bootstrap'."
It is written in INSTALL.BZR...
> I guess `make help' could give a better exposure to this option?
I'm not optimistic that any more people will read this than read
INSTALL.BZR or the commentary in the Makefile.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#12411: 24.2.50; No `make help' target?
2012-09-12 7:52 ` Glenn Morris
@ 2012-09-12 9:59 ` Bastien
2012-09-13 2:47 ` Glenn Morris
2012-09-13 3:23 ` Stefan Monnier
1 sibling, 1 reply; 13+ messages in thread
From: Bastien @ 2012-09-12 9:59 UTC (permalink / raw)
To: Glenn Morris; +Cc: 12411
Glenn Morris <rgm@gnu.org> writes:
> I'm not optimistic that any more people will read this than read
> INSTALL.BZR or the commentary in the Makefile.
Fair enough. My basic assumption is that users are used to run
`make help' when they are trying to understand what they do, but
that may be wrong.
--
Bastien
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#12411: 24.2.50; No `make help' target?
2012-09-12 9:59 ` Bastien
@ 2012-09-13 2:47 ` Glenn Morris
2012-09-13 12:43 ` Stefan Monnier
0 siblings, 1 reply; 13+ messages in thread
From: Glenn Morris @ 2012-09-13 2:47 UTC (permalink / raw)
To: Bastien; +Cc: 12411
Bastien wrote:
> Glenn Morris <rgm@gnu.org> writes:
>
>> I'm not optimistic that any more people will read this than read
>> INSTALL.BZR or the commentary in the Makefile.
>
> Fair enough. My basic assumption is that users are used to run
> `make help' when they are trying to understand what they do, but
> that may be wrong.
I think you should feel free to add such a target if you think it will
be useful to people. Don't let my pessimism discourage you! :)
(I've never tried to run `make help' for anything.)
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#12411: 24.2.50; No `make help' target?
2012-09-12 7:52 ` Glenn Morris
2012-09-12 9:59 ` Bastien
@ 2012-09-13 3:23 ` Stefan Monnier
1 sibling, 0 replies; 13+ messages in thread
From: Stefan Monnier @ 2012-09-13 3:23 UTC (permalink / raw)
To: Glenn Morris; +Cc: Bastien, 12411
> sed -n 's/^\([a-z]*\):.*/\1/p' Makefile # plus uniq...
> They are all pretty much standard targets, and documented at the top of
> the Makefile.
It's not always easy to find the doc corresponding to a given target, so
I think it would indeed be a good idea to make "make help" return some
useful info.
I also think it would be a valuable addition to the GNU coding standards.
Just like all commands should accept a "--help", it would make sense for
the main Makefile to do something useful with "make help".
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#12411: 24.2.50; No `make help' target?
2012-09-13 2:47 ` Glenn Morris
@ 2012-09-13 12:43 ` Stefan Monnier
0 siblings, 0 replies; 13+ messages in thread
From: Stefan Monnier @ 2012-09-13 12:43 UTC (permalink / raw)
To: Glenn Morris; +Cc: Bastien, 12411
> (I've never tried to run `make help' for anything.)
Indeed, it's not a standard target, so it'll benefit from being
advertised in things like INSTALL.
Stefan
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#12411: 24.2.50; No `make help' target?
2012-09-11 9:05 bug#12411: 24.2.50; No `make help' target? Bastien
2012-09-11 19:14 ` Glenn Morris
@ 2019-08-20 23:09 ` Stefan Kangas
2019-08-21 16:57 ` Eli Zaretskii
1 sibling, 1 reply; 13+ messages in thread
From: Stefan Kangas @ 2019-08-20 23:09 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 12411, Bastien
[-- Attachment #1: Type: text/plain, Size: 750 bytes --]
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> sed -n 's/^\([a-z]*\):.*/\1/p' Makefile # plus uniq...
>> They are all pretty much standard targets, and documented at the top of
>> the Makefile.
>
> It's not always easy to find the doc corresponding to a given target, so
> I think it would indeed be a good idea to make "make help" return some
> useful info.
> I also think it would be a valuable addition to the GNU coding standards.
> Just like all commands should accept a "--help", it would make sense for
> the main Makefile to do something useful with "make help".
How about something like the attached patch?
I'm not a Makefile expert, so I couldn't find a way to skip the
configure step and immediately echo.
Thanks,
Stefan Kangas
[-- Attachment #2: 0001-Add-new-make-help-target.patch --]
[-- Type: text/x-patch, Size: 2317 bytes --]
From dc823516bc8085bfbab97d90395a33c884a24738 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
* Makefile.in: Add new "help" target with a brief summary of the
available targets. (Bug#12411)
* INSTALL: Announce it.
---
INSTALL | 3 +++
Makefile.in | 24 ++++++++++++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/INSTALL b/INSTALL
index 6934022c4e..e9caff1501 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 other common make targets:
+
+ make help
ADDITIONAL DISTRIBUTION FILES
diff --git a/Makefile.in b/Makefile.in
index aa11e6b0b7..afdb86b518 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1178,6 +1178,30 @@ check-declare:
$(MAKE) -C lisp $@
$(MAKE) -C test $@
+.PHONY: help
+
+help:
+ @echo ""
+ @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 it"
+ @echo "make TAGS -- update tags tables"
+ @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"
+ @echo "make bootstrap -- delete all files and force a new bootstrap"
+ @echo "make uninstall -- delete all installed files"
+ @echo "make check -- run the Emacs test suite"
+ @echo "make docs -- generate Emacs documentation"
+ @echo "make html -- generate html documentation"
+ @echo "make ps -- generate ps documentation"
+ @echo "make pdf -- generate pdf documentation"
+
.PHONY: gitmerge
GITMERGE_EMACS = ./src/emacs${EXEEXT}
--
2.20.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* bug#12411: 24.2.50; No `make help' target?
2019-08-20 23:09 ` Stefan Kangas
@ 2019-08-21 16:57 ` Eli Zaretskii
2019-08-27 23:56 ` Stefan Kangas
0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2019-08-21 16:57 UTC (permalink / raw)
To: Stefan Kangas; +Cc: bzg, 12411, monnier
> From: Stefan Kangas <stefan@marxist.se>
> Date: Wed, 21 Aug 2019 01:09:32 +0200
> Cc: 12411@debbugs.gnu.org, Bastien <bzg@altern.org>
>
> 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.
> + @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.
> + @echo "make bootstrap -- delete all files and force a new bootstrap"
"Delete all files" sounds scary, and is also incorrect.
> + @echo "make uninstall -- delete all installed files"
I'd say "remove files installed by 'make install'"
> + @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.
Thanks.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#12411: 24.2.50; No `make help' target?
2019-08-21 16:57 ` Eli Zaretskii
@ 2019-08-27 23:56 ` Stefan Kangas
2019-08-28 11:28 ` Eli Zaretskii
0 siblings, 1 reply; 13+ messages in thread
From: Stefan Kangas @ 2019-08-27 23:56 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Bastien Guerry, 12411, Stefan Monnier
[-- 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
^ permalink raw reply related [flat|nested] 13+ messages in thread
* bug#12411: 24.2.50; No `make help' target?
2019-08-27 23:56 ` Stefan Kangas
@ 2019-08-28 11:28 ` Eli Zaretskii
2019-08-29 10:01 ` Stefan Kangas
0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2019-08-28 11:28 UTC (permalink / raw)
To: Stefan Kangas; +Cc: bzg, 12411, monnier
> From: Stefan Kangas <stefan@marxist.se>
> Date: Wed, 28 Aug 2019 01:56:14 +0200
> Cc: Stefan Monnier <monnier@iro.umontreal.ca>, 12411@debbugs.gnu.org,
> Bastien Guerry <bzg@altern.org>
>
> Thanks for reviewing. Please find attached a revised patch,
> incorporating your changes and also announcing this feature in NEWS
> for bigger visibility.
LGTM, thanks.
^ permalink raw reply [flat|nested] 13+ messages in thread
* bug#12411: 24.2.50; No `make help' target?
2019-08-28 11:28 ` Eli Zaretskii
@ 2019-08-29 10:01 ` Stefan Kangas
0 siblings, 0 replies; 13+ messages in thread
From: Stefan Kangas @ 2019-08-29 10:01 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: Bastien Guerry, 12411, Stefan Monnier
close 12411 27.1
quit
Eli Zaretskii <eliz@gnu.org> writes:
> > Thanks for reviewing. Please find attached a revised patch,
> > incorporating your changes and also announcing this feature in NEWS
> > for bigger visibility.
>
> LGTM, thanks.
Thanks. Now pushed as commit 9df285250b.
Best regards,
Stefan Kangas
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2019-08-29 10:01 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2019-08-28 11:28 ` Eli Zaretskii
2019-08-29 10:01 ` Stefan Kangas
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).