From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: Last commit breaks macOS build Date: Wed, 4 Jan 2017 19:21:11 -0800 Organization: UCLA Computer Science Department Message-ID: References: <103c5ca4-dba4-9cf1-1c15-535684235be9@alice.it> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------89D8A8479545919128B36039" X-Trace: blaine.gmane.org 1483586501 20537 195.159.176.226 (5 Jan 2017 03:21:41 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 5 Jan 2017 03:21:41 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 To: Angelo Graziosi , Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jan 05 04:21:35 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cOycJ-0003fv-BA for ged-emacs-devel@m.gmane.org; Thu, 05 Jan 2017 04:21:27 +0100 Original-Received: from localhost ([::1]:43425 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cOycN-0004aL-5U for ged-emacs-devel@m.gmane.org; Wed, 04 Jan 2017 22:21:31 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53915) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cOycF-0004aC-8n for emacs-devel@gnu.org; Wed, 04 Jan 2017 22:21:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cOycC-00079V-1i for emacs-devel@gnu.org; Wed, 04 Jan 2017 22:21:23 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:43158) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cOycB-00077D-OR for emacs-devel@gnu.org; Wed, 04 Jan 2017 22:21:19 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 06F481600B3; Wed, 4 Jan 2017 19:21:17 -0800 (PST) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id fkUVVUf6JRw0; Wed, 4 Jan 2017 19:21:12 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 2BF9B1600BE; Wed, 4 Jan 2017 19:21:12 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id BsxFsH4Q3Og5; Wed, 4 Jan 2017 19:21:12 -0800 (PST) Original-Received: from [192.168.1.9] (unknown [47.153.178.162]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 081B51600B3; Wed, 4 Jan 2017 19:21:12 -0800 (PST) In-Reply-To: <103c5ca4-dba4-9cf1-1c15-535684235be9@alice.it> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:211117 Archived-At: This is a multi-part message in MIME format. --------------89D8A8479545919128B36039 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Angelo Graziosi wrote: > Interfering nt/gnulib.mk from lib/gnulib.mk ... Did it really say "Interfering"? :-) > sed: 46: "This is of m...": command c expects \ followed by text > > and the 'configure' is not created... This is caused by our recent attempt to better-automate MS-Windows builds= . I=20 fixed one nonportable construct, but evidently there are others. It's time to break out a bigger hammer. Please try the attached patch. I = have=20 tested it on Fedora, but not on MS-Windows and so have not installed it y= et. --------------89D8A8479545919128B36039 Content-Type: text/x-diff; name="0001-Use-GNU-Make-instead-of-sed-Automake-for-nt-lib.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename*0="0001-Use-GNU-Make-instead-of-sed-Automake-for-nt-lib.patch" =46rom d59053569fb37f80487810f6e18da0ac9030a0da Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 4 Jan 2017 19:13:14 -0800 Subject: [PATCH] Use GNU Make instead of sed+Automake for nt lib Problem reported by Angelo Graziosi. Instead of continuing to hack something in autogen.sh, which is a pain to port and which is a prepass to Automake, this patch uses GNU Make instead, so that there is no need to have anything in autogen.sh and no need for an nt/gnulib.mk file. * .gitignore: Remove nt/gnulib.mk. * Makefile.in (gnulib_mk, $(srcdir)/nt/gnulib.mk): Remove. (AUTOMAKE_INPUTS): Use $(srcdir)/lib/gnulib.mk, not gnulib_mk. * autogen.sh: Do not build nt/gnulib.mk. * configure.ac (GNULIB_MK): Remove. (SYSTEM_TYPE): Subst. (MT): New macro. Subst it. * lib/Makefile.am: Do not include ../nt/gnulib.mk. Use $(SYSTEM_TYPE), not BUILDING_FOR_WINDOWSNT. (libgnu_a_SOURCES_not, EXTRA_libgnu_a_SOURCES_not): New macros. (libgnu_a_SOURCES, EXTRA_libgnu_a_SOURCES) [windows-nt]: Filter out unwanted modules. * make-dist: Omit removed files. * nt/Makefile.in (AM_V_GEN, am__v_GEN_, am__v_GEN_0) (am__v_GEN_1, ${srcdir}/gnulib.mk): Remove. * nt/gnulib-modules-to-delete.cfg: Remove. --- .gitignore | 1 - Makefile.in | 8 +---- autogen.sh | 10 +------ configure.ac | 22 ++++---------- lib/Makefile.am | 19 ++++++++---- make-dist | 2 +- nt/Makefile.in | 10 ------- nt/gnulib-modules-to-delete.cfg | 66 -----------------------------------= ------ 8 files changed, 23 insertions(+), 115 deletions(-) delete mode 100644 nt/gnulib-modules-to-delete.cfg diff --git a/.gitignore b/.gitignore index e8eb4fd..85c06c9 100644 --- a/.gitignore +++ b/.gitignore @@ -288,6 +288,5 @@ lib/SYS/ /site-lisp/ nt/emacs.rc nt/emacsclient.rc -nt/gnulib.mk src/gdb.ini /var/ diff --git a/Makefile.in b/Makefile.in index b9aaf5b..3cb1f5e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -98,9 +98,6 @@ configuration=3D ### The nt/ subdirectory gets built only for MinGW NTDIR=3D@NTDIR@ =20 -### $(srcdir)/nt/gnulib.mk for MinGW, else $(srcdir)/lib/gnulib.mk -gnulib_mk=3D@GNULIB_MK@ - # 'make' verbosity. AM_DEFAULT_VERBOSITY =3D @AM_DEFAULT_VERBOSITY@ =20 @@ -454,13 +451,10 @@ $(srcdir)/aclocal.m4: cd $(srcdir) && ACLOCAL_PATH=3D'$(ACLOCAL_PATH)' $(ACLOCAL) -I m4 =20 AUTOMAKE_INPUTS =3D $(srcdir)/aclocal.m4 $(srcdir)/lib/Makefile.am \ - $(gnulib_mk) + $(srcdir)/lib/gnulib.mk $(srcdir)/lib/Makefile.in: $(AUTOMAKE_INPUTS) cd $(srcdir) && $(AUTOMAKE) --gnu -a -c lib/Makefile =20 -$(srcdir)/nt/gnulib.mk: $(srcdir)/lib/Makefile.in - $(MAKE) -C $(srcdir)/nt gnulib.mk - # Regenerate files that this makefile would have made, if this makefile # had been built by Automake. The name 'am--refresh' is for # compatibility with subsidiary Automake-generated makefiles. diff --git a/autogen.sh b/autogen.sh index f6bfde6..7381bc3 100755 --- a/autogen.sh +++ b/autogen.sh @@ -220,17 +220,9 @@ do_git=3D fi =20 echo 'Your system has the required tools.' - - ## Create nt/gnulib.mk if it doesn't exist, as autoreconf will need it= =2E - if test ! -f nt/gnulib.mk; then - echo 'Inferring nt/gnulib.mk from lib/gnulib.mk ...' - metascript=3D'/^[^#]/s|^.*$|/^## begin *gnulib module &/,/^## end= *gnulib module &/c ## gnulib module & removed|' - script=3D`sed "$metascript" nt/gnulib-modules-to-delete.cfg` || ex= it - sed "$script" lib/gnulib.mk > nt/gnulib.mk || exit - fi - echo "Running 'autoreconf -fi -I m4' ..." =20 + ## Let autoreconf figure out what, if anything, needs doing. ## Use autoreconf's -f option in case autoreconf itself has changed. autoreconf -fi -I m4 || exit $? diff --git a/configure.ac b/configure.ac index 262f367..7fd4988 100644 --- a/configure.ac +++ b/configure.ac @@ -771,22 +771,6 @@ AC_DEFUN test "x$GCC_TEST_OPTIONS" !=3D x && CC=3D"$CC $GCC_TEST_OPTIONS" fi =20 -dnl This is used in lib/Makefile.am to use nt/gnulib.mk, the -dnl alternative to lib/gnulib.mk, so as to avoid generating header files= -dnl that clash with MinGW. -case $opsys in - mingw32 ) - GNULIB_MK=3D'$(srcdir)/nt/gnulib.mk' - ;; - * ) - GNULIB_MK=3D'$(srcdir)/lib/gnulib.mk' - ;; - -esac -AC_SUBST([GNULIB_MK]) - -AM_CONDITIONAL([BUILDING_FOR_WINDOWSNT], [test "x$opsys" =3D "xmingw32"]= ) - # Avoid gnulib's tests for -lcrypto, so that there's no static dependenc= y on it. AC_DEFUN([gl_CRYPTO_CHECK]) # Avoid gnulib's tests for HAVE_WORKING_O_NOATIME and HAVE_WORKING_O_NOF= OLLOW, @@ -1555,7 +1539,13 @@ AC_DEFUN AC_SUBST(LIB_MATH) AC_DEFINE_UNQUOTED(SYSTEM_TYPE, "$SYSTEM_TYPE", [The type of system you are compiling for; sets 'system-type'.]) +AC_SUBST([SYSTEM_TYPE]) =20 +# The empty (MT) string. +# Use this in Makefile.am before GNU Make conditionals; +# otherwise, Automake gets confused. +MT=3D +AC_SUBST([MT]) =20 pre_PKG_CONFIG_CFLAGS=3D$CFLAGS pre_PKG_CONFIG_LIBS=3D$LIBS diff --git a/lib/Makefile.am b/lib/Makefile.am index e6d90dd..141838c 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -29,13 +29,22 @@ SUFFIXES =3D AM_CFLAGS =3D $(PROFILING_CFLAGS) $(GNULIB_WARN_CFLAGS) $(WERROR_CFLAGS)= DEFAULT_INCLUDES =3D -I. -I$(top_srcdir)/lib -I../src -I$(top_srcdir)/sr= c =20 -if BUILDING_FOR_WINDOWSNT -include ../nt/gnulib.mk -else include gnulib.mk =20 -libgnu_a_SOURCES +=3D openat-die.c save-cwd.c -endif +@MT@ifeq ($(SYSTEM_TYPE), windows-nt) +@MT@ libgnu_a_SOURCES_not =3D \ +@MT@ acl-errno-valid.c acl-internal.c allocator.c \ +@MT@ careadlinkat.c get-permissions.c pipe2.c \ +@MT@ set-permissions.c tempname.c unistd.c +@MT@ libgnu_a_SOURCES :=3D \ +@MT@ $(filter-out $(libgnu_a_SOURCES_not), $(libgnu_a_SOURCES)) +@MT@ EXTRA_libgnu_a_SOURCES_not =3D \ +@MT@ acl_entries.c dirfd.c fcntl.c mkostemp.c openat-proc.c secure_ge= tenv.c +@MT@ EXTRA_libgnu_a_SOURCES :=3D \ +@MT@ $(filter-out $(EXTRA_libgnu_a_SOURCES_not), $(EXTRA_libgnu_a_SOU= RCES)) +@MT@else +@MT@ libgnu_a_SOURCES +=3D openat-die.c save-cwd.c +@MT@endif =20 if HYBRID_MALLOC_LIB noinst_LIBRARIES +=3D libegnu.a diff --git a/make-dist b/make-dist index 41203b2..2d1a218 100755 --- a/make-dist +++ b/make-dist @@ -482,7 +482,7 @@ files=3D (cd nt ln emacs-x86.manifest emacs-x64.manifest ../${tempdir}/nt ln [a-z]*.bat [a-z]*.[ch] ../${tempdir}/nt - ln *.in gnulib.mk gnulib-modules-to-delete.cfg ../${tempdir}/nt + ln *.in ../${tempdir}/nt ln mingw-cfg.site epaths.nt INSTALL.W64 ../${tempdir}/nt ln ChangeLog.*[0-9] INSTALL README README.W32 ../${tempdir}/nt) =20 diff --git a/nt/Makefile.in b/nt/Makefile.in index 89f4460..7e911db 100644 --- a/nt/Makefile.in +++ b/nt/Makefile.in @@ -54,11 +54,6 @@ am__v_CCLD_ =3D am__v_CCLD_0 =3D @echo " CCLD " $@; am__v_CCLD_1 =3D =20 -AM_V_GEN =3D $(am__v_GEN_@AM_V@) -am__v_GEN_ =3D $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 =3D @echo " GEN " $@; -am__v_GEN_1 =3D - AM_V_RC =3D $(am__v_RC_@AM_V@) am__v_RC_ =3D $(am__v_RC_@AM_DEFAULT_V@) am__v_RC_0 =3D @echo " RC " $@; @@ -260,8 +255,3 @@ runemacs${EXEEXT}: emacs.res ../src/emacs.res: emacs.rc ${srcdir}/icons/emacs.ico \ ${srcdir}/icons/hand.cur ${srcdir}/$(EMACS_MANIFEST) $(AM_V_RC)${WINDRES} -I ${srcdir} -O coff -o $@ $< - -${srcdir}/gnulib.mk: ${srcdir}/gnulib-modules-to-delete.cfg ${srcdir}/..= /lib/gnulib.mk - $(AM_V_GEN)sed '/^[^#]/s|^.*$$|/^## begin *gnulib module &/,/^## end = *gnulib module &/c ## gnulib module & removed|' < $< | \ - sed -f- ${srcdir}/../lib/gnulib.mk > $@-t && \ - ${srcdir}/../build-aux/move-if-change $@-t $@ diff --git a/nt/gnulib-modules-to-delete.cfg b/nt/gnulib-modules-to-delet= e.cfg deleted file mode 100644 index 09bea0e..0000000 --- a/nt/gnulib-modules-to-delete.cfg +++ /dev/null @@ -1,66 +0,0 @@ -# This is the list of modules to be deleted from ../lib/gnulib.mk. -# -# We delete them because they either conflict with MinGW headers or -# headers in nt/inc, or because those modules won't compile with -# MinGW, or because Emacs already has the corresponding facilities as -# part of Emacs sources, and their implementation is incompatible with -# Gnulib's. -# -# In general, do NOT remove anything from ../lib/gnulib.mk that -# doesn't need to be removed, to minimize the differences from -# upstream gnulib.mk and thus make the maintenance easier. Every -# header file whose generation is controlled by configure-time tests -# does NOT need to be removed; instead, force the configure script to -# accept whatever MinGW has to offer, by defining the appropriate -# Autoconf variable in the nt/mingw-cfg.site file. Headers that are -# generated conditionally have the tell-tale "if GL_GENERATE_foo_H" -# condition before their Makefile snippet in this file. Likewise, do -# NOT remove gnulib modules which introduce header files that don't -# exist in MinGW and in nt/inc/, since they cannot possibly clash -# with anything. Gnulib modules that introduce source *.c files also -# need not be removed; if they define functions that could clash with -# the w32 substitutes in Emacs, disable their compilation by defining -# suitable variables in nt/mingw-cfg.site. -# ----------------------------------------------------------------------= -# -# Copyright (C) 2017 Free Software Foundation, Inc. -# -# This file 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. -# -# This file 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 this file. If not, see . -# -# As a special exception to the GNU General Public License, -# this file may be distributed as part of a program that -# contains a configuration script generated by Autoconf, under -# the same distribution terms as the rest of that program. -# -acl-permissions -allocator -at-internal -careadlinkat -dirent -dirfd -fcntl -fcntl-h -inttypes-incomplete -mkostemp -pipe2 -secure_getenv -signal-h -stdio -stdlib -sys_select -sys_stat -sys_time -sys_types -tempname -unistd --=20 2.7.4 --------------89D8A8479545919128B36039--