From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: New build process? Date: Wed, 27 Jul 2011 13:27:31 -0700 Organization: UCLA Computer Science Department Message-ID: <4E3074B3.4010408@cs.ucla.edu> References: <20110726184220.GA6390@acm.acm> <87bowg6fre.fsf@fencepost.gnu.org> <4E2F2084.7070001@gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1311798535 8490 80.91.229.12 (27 Jul 2011 20:28:55 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 27 Jul 2011 20:28:55 +0000 (UTC) Cc: david.reitter@gmail.com, Tim Cross , dan.colascione@gmail.com, rms@gnu.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 27 22:28:50 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QmAin-0002uR-6W for ged-emacs-devel@m.gmane.org; Wed, 27 Jul 2011 22:28:49 +0200 Original-Received: from localhost ([::1]:48262 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmAim-0003xC-Nm for ged-emacs-devel@m.gmane.org; Wed, 27 Jul 2011 16:28:48 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:46801) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmAij-0003ww-W0 for emacs-devel@gnu.org; Wed, 27 Jul 2011 16:28:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QmAii-000859-QC for emacs-devel@gnu.org; Wed, 27 Jul 2011 16:28:45 -0400 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:58038) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QmAih-00082A-5j; Wed, 27 Jul 2011 16:28:43 -0400 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 864B039E8105; Wed, 27 Jul 2011 13:28:33 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id A+F3JhELyxzG; Wed, 27 Jul 2011 13:28:31 -0700 (PDT) Original-Received: from [131.179.64.200] (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id DEE2939E80DA; Wed, 27 Jul 2011 13:28:31 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110621 Fedora/3.1.11-1.fc14 Thunderbird/3.1.11 In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 131.179.128.62 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:142407 Archived-At: 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 . +# +# 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