Attempt to make defclass documentation more legible
[emacs.git] / GNUmakefile
blob5155487de28d140eeff946804b685f24c1727dcd
1 # Build Emacs from a fresh tarball or version-control checkout.
3 # Copyright (C) 2011-2021 Free Software Foundation, Inc.
5 # This file is part of GNU Emacs.
7 # GNU Emacs is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License as published by
9 # the Free Software Foundation, either version 3 of the License, or
10 # (at your option) any later version.
12 # GNU Emacs is distributed in the hope that it will be useful,
13 # but WITHOUT ANY WARRANTY; without even the implied warranty of
14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 # GNU General Public License for more details.
17 # You should have received a copy of the GNU General Public License
18 # along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
20 # written by Paul Eggert
23 # This GNUmakefile is for GNU Make. It is for convenience, so that
24 # one can run 'make' in an unconfigured source tree. In such a tree,
25 # this file causes GNU Make to first create a standard configuration
26 # with the default options, and then reinvokes itself on the
27 # newly-built Makefile. If the source tree is already configured,
28 # this file defers to the existing Makefile.
30 # If you want non-default build options, or if you want to build in an
31 # out-of-source tree, you should run 'configure' before running 'make'.
32 # But run 'autogen.sh' first, if the source was checked out directly
33 # from the repository.
35 # Display help.
37 ifeq (help,$(filter help,$(MAKECMDGOALS)))
38 help:
39 @echo "NOTE: This is a brief summary of some common make targets."
40 @echo "For more detailed information, please read the files INSTALL,"
41 @echo "INSTALL.REPO, Makefile or visit this URL:"
42 @echo "https://www.gnu.org/prep/standards/html_node/Standard-Targets.html"
43 @echo ""
44 @echo "make all -- compile and build Emacs"
45 @echo "make install -- install Emacs"
46 @echo "make TAGS -- update tags tables"
47 @echo "make clean -- delete built files but preserve configuration"
48 @echo "make mostlyclean -- like 'make clean', but leave those files that"
49 @echo " usually do not need to be recompiled"
50 @echo "make distclean -- delete all build and configuration files,"
51 @echo " leave only files included in source distribution"
52 @echo "make maintainer-clean -- delete almost everything that can be regenerated"
53 @echo "make extraclean -- like maintainer-clean, and also delete"
54 @echo " backup and autosave files"
55 @echo "make bootstrap -- delete all compiled files to force a new bootstrap"
56 @echo " from a clean slate, then build in the normal way"
57 @echo "make uninstall -- remove files installed by 'make install'"
58 @echo "make check -- run the Emacs test suite"
59 @echo "make docs -- generate Emacs documentation in info format"
60 @echo "make html -- generate documentation in html format"
61 @echo "make ps -- generate documentation in ps format"
62 @echo "make pdf -- generate documentation in pdf format "
63 @exit
65 .PHONY: help
67 else
69 # If a Makefile already exists, just use it.
71 ifeq ($(wildcard Makefile),Makefile)
72 include Makefile
73 else
75 # If cleaning and Makefile does not exist, don't bother creating it.
76 # The source tree is already clean, or is in a weird state that
77 # requires expert attention.
79 ifeq ($(filter-out %clean,$(or $(MAKECMDGOALS),default)),)
81 $(MAKECMDGOALS):
82 @echo >&2 'No Makefile; skipping $@.'
84 else
86 # No Makefile, and not cleaning.
87 # If 'configure' does not exist, Emacs must have been checked
88 # out directly from the repository; run ./autogen.sh.
89 # Once 'configure' exists, run it.
90 # Finally, run the actual 'make'.
92 ORDINARY_GOALS = $(filter-out configure Makefile bootstrap,$(MAKECMDGOALS))
94 default $(ORDINARY_GOALS): Makefile
95 $(MAKE) -f Makefile $(MAKECMDGOALS)
96 # Execute in sequence, so that multiple user goals don't conflict.
97 .NOTPARALLEL:
99 configure:
100 @echo >&2 'There seems to be no "configure" file in this directory.'
101 @echo >&2 Running ./autogen.sh ...
102 ./autogen.sh
103 @echo >&2 '"configure" file built.'
105 Makefile: configure
106 @echo >&2 'There seems to be no Makefile in this directory.'
107 @echo >&2 'Running ./configure ...'
108 ./configure
109 @echo >&2 'Makefile built.'
111 # 'make bootstrap' in a fresh checkout needn't run 'configure' twice.
112 bootstrap: Makefile
113 $(MAKE) -f Makefile all
115 .PHONY: bootstrap default $(ORDINARY_GOALS)
117 endif
118 endif
119 endif