all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: david.reitter@gmail.com, Tim Cross <theophilusx@gmail.com>,
	dan.colascione@gmail.com, rms@gnu.org, emacs-devel@gnu.org
Subject: Re: New build process?
Date: Wed, 27 Jul 2011 13:27:31 -0700	[thread overview]
Message-ID: <4E3074B3.4010408@cs.ucla.edu> (raw)
In-Reply-To: <E1Qm0y2-0006jr-V1@fencepost.gnu.org>

On 07/27/11 03:03, Eli Zaretskii wrote:
 
> ... the need to install,
> update, and use any additional commands before "./configure; make" is
> a nuisance whose justification is questionable at best.  It's just
> that I gave up on talking people into catering to us dinosaurs

The *real* dinosaurs just type "make".  The "./configure; make"
business is a relative latecomer.

It'd be nice if one could just type "make".

To help move in that direction, I installed the following patch.
It assumes GNU Make, but that's a reasonable assumption these
days for developers.  Developers who insist on using non-GNU "make"
can use "./autogen.sh; ./configure; make" as before.

If there are any problems with this, please feel free to back it out
or improve it.

* GNUmakefile: New file.
This is for convenience, so that one can run GNU make in an
unconfigured source tree, and get a default build.
=== added file 'GNUmakefile'
--- GNUmakefile	1970-01-01 00:00:00 +0000
+++ GNUmakefile	2011-07-27 20:22:50 +0000
@@ -0,0 +1,77 @@
+# Build Emacs from a fresh tarball or version-control checkout.
+
+# Copyright 2011 Free Software Foundation, Inc.
+#
+# This file is part of GNU Emacs.
+#
+# GNU Emacs 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.
+#
+# GNU Emacs 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 GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+#
+# written by Paul Eggert
+
+
+# This GNUmakefile is for GNU Make.  It is for convenience, so that
+# one can run 'make' in an unconfigured source tree.  In such a tree,
+# this file causes GNU Make to first create a standard configuration
+# with the default options, and then reinvokes itself on the
+# newly-built Makefile.  If the source tree is already configured,
+# this file defers to the existing Makefile.
+
+# If you are using a non-GNU 'make', or if you want non-default build
+# options, or if you want to build in an out-of-source tree, please
+# run "configure" by hand.  But run autogen.sh first, if the source
+# was checked out directly from the repository.
+
+
+# If a Makefile already exists, just use it.
+
+ifeq ($(wildcard Makefile),Makefile)
+include Makefile
+else
+
+# If cleaning and Makefile does not exist, don't bother creating it.
+# The source tree is already clean, or is in a weird state that
+# requires expert attention.
+
+ifeq ($(filter-out %clean,$(or $(MAKECMDGOALS),default)),)
+
+$(MAKECMDGOALS):
+	@echo >&2 'No Makefile; skipping $@.'
+
+else
+
+# No Makefile, and not cleaning.
+# If 'configure' does not exist, Emacs must have been checked
+# out directly from the repository; run ./autogen.sh.
+# Once 'configure' exists, run it.
+# Finally, run the actual 'make'.
+
+default $(filter-out configure Makefile,$(MAKECMDGOALS)): Makefile
+	$(MAKE) -f Makefile $(MAKECMDGOALS)
+# Execute in sequence, so that multiple user goals don't conflict.
+.NOTPARALLEL:
+
+configure:
+	@echo >&2 'There seems to be no "configure" file in this directory.'
+	@echo >&2 'Running ./autogen.sh || autogen/copy_autogen ...'
+	./autogen.sh || autogen/copy_autogen
+	@echo >&2 '"configure" file built.'
+
+Makefile: configure
+	@echo >&2 'There seems to be no Makefile in this directory.'
+	@echo >&2 'Running ./configure ...'
+	./configure
+	@echo >&2 'Makefile built.'
+
+endif
+endif




  parent reply	other threads:[~2011-07-27 20:27 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-26 18:42 New build process? Alan Mackenzie
2011-07-26 18:47 ` David Kastrup
2011-07-26 20:00   ` David Reitter
2011-07-26 20:16     ` Daniel Colascione
2011-07-27  2:58       ` Richard Stallman
2011-07-27  3:40         ` Tim Cross
2011-07-27  5:08           ` Eli Zaretskii
2011-07-27  7:58             ` Tim Cross
2011-07-27  8:25               ` Peter Münster
2011-07-27  8:48                 ` Tim Cross
2011-07-27  9:43                   ` Peter Münster
2011-07-27  8:51                 ` David Kastrup
2011-07-27 10:05                 ` Eli Zaretskii
2011-07-27 10:03               ` Eli Zaretskii
2011-07-27 13:11                 ` Tim Cross
2011-07-27 13:31                   ` Lennart Borgman
2011-07-27 13:56                     ` David Kastrup
2011-07-28 12:37                       ` David De La Harpe Golden
2011-07-28 12:46                         ` David Kastrup
2011-07-29 12:36                           ` Alan Mackenzie
2011-07-27 14:58                     ` Tim Cross
2011-07-27 16:14                 ` Richard Stallman
2011-07-27 16:25                   ` Eli Zaretskii
2011-07-27 20:27                 ` Paul Eggert [this message]
2011-07-28 10:06                   ` Eli Zaretskii
2011-07-28 10:15                     ` bug#9106: " Paul Eggert
2011-07-28 16:45                   ` Richard Stallman
2011-07-27  7:51           ` Andreas Schwab
2011-07-27  8:02             ` Tim Cross
2011-07-27  8:07               ` Andreas Schwab
2011-07-27  8:13                 ` Tim Cross
2011-07-27  8:22                   ` Andreas Schwab
2011-07-27  8:31                     ` Tim Cross
2011-07-27  8:54                     ` David Kastrup
2011-07-27  9:01                       ` Andreas Schwab
2011-07-27  9:15                         ` David Kastrup
2011-07-27  9:41                           ` Andreas Schwab
2011-07-26 20:24     ` David Kastrup
2011-07-26 22:10   ` Alan Mackenzie
2011-07-27 12:15     ` Thien-Thi Nguyen

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=4E3074B3.4010408@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=dan.colascione@gmail.com \
    --cc=david.reitter@gmail.com \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=rms@gnu.org \
    --cc=theophilusx@gmail.com \
    /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.