Commit 83da1b55 authored by Glenn Morris's avatar Glenn Morris

Increase compartmentalization of Nextstep builds rules,

and store Emacs version number in fewer versioned files.

* configure.ac (ns_appsrc): Use relative names.
(ns_frag): Remove.
(Info-gnustep.plist, Emacs.desktop, Info.plist, InfoPlist.strings)
(nextstep/Makefile): Generate these nextstep files.
(SUBDIR_MAKEFILES): Add nextstep.

* Makefile.in (clean, distclean, bootstrap-clean): Add nextstep.

* make-dist (nextstep/templates): Add directory.
(nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj): Remove.
(nextstep/Cocoa/Emacs.base/Contents)
(nextstep/GNUstep/Emacs.base/Resources): Update contents.

* .bzrignore: Add some nextstep files.

* admin/admin.el (set-version): No more need to set nextstep versions.
(set-copyright): Update for moved nextstep files.

* nextstep/Makefile.in: New file.
* nextstep/templates: New directory.
* nextstep/templates/Emacs.desktop.in, nextstep/templates/Info-gnustep.plist.in:
* nextstep/templates/Info.plist.in, nextstep/templates/InfoPlist.strings.in:
Move here from various Cocoa/, GNUstep/ locations.
Let configure set the version number.
* nextstep/Cocoa/Emacs.base/Contents/Info.plist:
* nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings:
* nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist:
* nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop: Move to templates/.
* nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj: Remove directory.

* src/Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Remove variables.
(ns_frag): Remove.
(ns-app): Move here from ns.mk, and simplify.
(clean): Simplify nextstep entry.
* src/ns.mk: Remove file.
parent 40d70ecb
2012-09-16 Glenn Morris <rgm@gnu.org>
Increase compartmentalization of Nextstep builds rules,
and store Emacs version number in fewer versioned files.
* configure.ac (ns_appsrc): Use relative names.
(ns_frag): Remove.
(Info-gnustep.plist, Emacs.desktop, Info.plist, InfoPlist.strings)
(nextstep/Makefile): Generate these nextstep files.
(SUBDIR_MAKEFILES): Add nextstep.
* Makefile.in (clean, distclean, bootstrap-clean): Add nextstep.
* make-dist (nextstep/templates): Add directory.
(nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj): Remove.
(nextstep/Cocoa/Emacs.base/Contents)
(nextstep/GNUstep/Emacs.base/Resources): Update contents.
2012-09-15 Paul Eggert <eggert@cs.ucla.edu>
Port better to POSIX hosts lacking _setjmp (Bug#12446).
......
......@@ -737,6 +737,7 @@ clean: FRC
-(cd doc/lispref && $(MAKE) $(MFLAGS) clean)
-(cd doc/lispintro && $(MAKE) $(MFLAGS) clean)
(cd leim; $(MAKE) $(MFLAGS) clean)
(cd nextstep && $(MAKE) $(MFLAGS) clean)
### `bootclean'
### Delete all files that need to be remade for a clean bootstrap.
......@@ -763,6 +764,7 @@ distclean: FRC
(cd doc/lispintro && $(MAKE) $(MFLAGS) distclean)
(cd leim; $(MAKE) $(MFLAGS) distclean)
(cd lisp; $(MAKE) $(MFLAGS) distclean)
(cd nextstep && $(MAKE) $(MFLAGS) distclean)
${top_distclean}
### `bootstrap-clean'
......@@ -780,6 +782,7 @@ bootstrap-clean: FRC
-(cd doc/lispintro && $(MAKE) $(MFLAGS) maintainer-clean)
(cd leim; $(MAKE) $(MFLAGS) maintainer-clean)
(cd lisp; $(MAKE) $(MFLAGS) bootstrap-clean)
(cd nextstep && $(MAKE) $(MFLAGS) maintainer-clean)
[ ! -f config.log ] || mv -f config.log config.log~
${top_bootclean}
......
2012-09-16 Glenn Morris <rgm@gnu.org>
* admin.el (set-version): No more need to set nextstep versions.
(set-copyright): Update for moved nextstep files.
2012-09-13 Paul Eggert <eggert@cs.ucla.edu>
Simplify SIGIO usage (Bug#12408).
......
......@@ -126,39 +126,7 @@ Root must be the root of an Emacs source tree."
(set-version-in-file root "nt/emacsclient.rc" comma-space-version
(rx (and "\"ProductVersion\"" (0+ space) ?,
(0+ space) ?\" (submatch (1+ (in "0-9, ")))
"\\0\""))))
;; nextstep.
(set-version-in-file
root "nextstep/Cocoa/Emacs.base/Contents/Info.plist"
version (rx (and "CFBundleGetInfoString" (1+ anything) "Emacs" (1+ space)
(submatch (1+ (in "0-9."))))))
(set-version-in-file
root "nextstep/Cocoa/Emacs.base/Contents/Info.plist"
version (rx (and "CFBundleShortVersionString" (1+ not-newline) ?\n
(0+ not-newline) "<string>" (0+ space)
(submatch (1+ (in "0-9."))))))
(set-version-in-file
root "nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings"
version (rx (and "CFBundleShortVersionString" (0+ space) ?= (0+ space)
?\" (0+ space) "Version" (1+ space)
(submatch (1+ (in "0-9."))))))
(set-version-in-file
root "nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings"
version (rx (and "CFBundleGetInfoString" (0+ space) ?= (0+ space)
?\" (0+ space) "Emacs version" (1+ space)
(submatch (1+ (in "0-9."))))))
(set-version-in-file
root "nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist"
version (rx (and "ApplicationRelease" (0+ space) ?= (0+ space)
?\" (0+ space) (submatch (1+ (in "0-9."))))))
(set-version-in-file
root "nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist"
version (rx (and "FullVersionID" (0+ space) ?= (0+ space)
?\" (0+ space) "Emacs" (1+ space)
(submatch (1+ (in "0-9."))))))
(set-version-in-file
root "nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop"
version (rx (and "Version=" (submatch (1+ (in "0-9.")))))))
"\\0\"")))))
;; Note this makes some assumptions about form of short copyright.
(defun set-copyright (root copyright)
......@@ -188,16 +156,16 @@ Root must be the root of an Emacs source tree."
(string-match "\\(.*[0-9]\\{4\\} *\\)\\(.*\\)" copyright)
;; nextstep.
(set-version-in-file
root "nextstep/Cocoa/Emacs.base/Contents/Info.plist"
root "nextstep/templates/Info.plist.in"
copyright (rx (and "CFBundleGetInfoString" (1+ anything) "Emacs" (1+ space)
(1+ (in "0-9.")) (1+ space)
(submatch (1+ (not (in ?\<)))))))
(set-version-in-file
root "nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings"
root "nextstep/templates/InfoPlist.strings.in"
copyright (rx (and "NSHumanReadableCopyright" (0+ space) ?\= (0+ space)
?\" (submatch (1+ (not (in ?\")))))))
(set-version-in-file
root "nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist"
root "nextstep/templates/Info-gnustep.plist.in"
copyright (rx (and "Copyright" (0+ space) ?\= (0+ space)
?\" (submatch (1+ (not (in ?\")))))))
(when (string-match "\\([0-9]\\{4\\}\\)" copyright)
......
......@@ -1461,13 +1461,13 @@ if test "${with_ns}" != no; then
ns_appdir=`pwd`/nextstep/Emacs.app
ns_appbindir=${ns_appdir}/Contents/MacOS
ns_appresdir=${ns_appdir}/Contents/Resources
ns_appsrc=${srcdir}/nextstep/Cocoa/Emacs.base
ns_appsrc=Cocoa/Emacs.base
elif test -f $GNUSTEP_CONFIG_FILE; then
NS_IMPL_GNUSTEP=yes
ns_appdir=`pwd`/nextstep/Emacs.app
ns_appbindir=${ns_appdir}
ns_appresdir=${ns_appdir}/Resources
ns_appsrc=${srcdir}/nextstep/GNUstep/Emacs.base
ns_appsrc=GNUstep/Emacs.base
dnl FIXME sourcing this several times in subshells seems inefficient.
GNUSTEP_SYSTEM_HEADERS="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_HEADERS)"
GNUSTEP_SYSTEM_LIBRARIES="$(. $GNUSTEP_CONFIG_FILE; echo $GNUSTEP_SYSTEM_LIBRARIES)"
......@@ -1521,7 +1521,6 @@ AC_SUBST(TEMACS_LDFLAGS2)
INSTALL_ARCH_INDEP_EXTRA=install-etc
ns_self_contained=no
ns_frag=/dev/null
NS_OBJ=
NS_OBJC_OBJ=
if test "${HAVE_NS}" = yes; then
......@@ -1548,7 +1547,6 @@ if test "${HAVE_NS}" = yes; then
leimdir="\${ns_appresdir}/leim"
INSTALL_ARCH_INDEP_EXTRA=
fi
ns_frag=$srcdir/src/ns.mk
NS_OBJC_OBJ="nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o"
fi
CFLAGS="$tmp_CFLAGS"
......@@ -1558,7 +1556,6 @@ AC_SUBST(ns_self_contained)
AC_SUBST(NS_OBJ)
AC_SUBST(NS_OBJC_OBJ)
AC_SUBST(LIB_STANDARD)
AC_SUBST_FILE(ns_frag)
## $window_system is now set to the window system we will
## ultimately use.
......@@ -4484,6 +4481,16 @@ fi
test "${exec_prefix}" != NONE &&
exec_prefix=`echo "${exec_prefix}" | sed 's,\([^/]\)/*$,\1,'`]
if test "$HAVE_NS" = "yes"; then
if test "$NS_IMPL_GNUSTEP" = yes; then
AC_CONFIG_FILES([nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist:nextstep/templates/Info-gnustep.plist.in \
nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:nextstep/templates/Emacs.desktop.in])
else
AC_CONFIG_FILES([nextstep/Cocoa/Emacs.base/Contents/Info.plist:nextstep/templates/Info.plist.in \
nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings:nextstep/templates/InfoPlist.strings.in])
fi
fi
dnl Obviously there is duplication here wrt $SUBDIR_MAKEFILES.
dnl You _can_ use that variable in AC_CONFIG_FILES, so long as any directory
dnl using automake (ie lib/) is explicitly listed and not "hidden" in a variable
......@@ -4492,12 +4499,12 @@ dnl This will work, but you get a config.status that is not quite right
dnl (see http://lists.gnu.org/archive/html/bug-autoconf/2008-08/msg00028.html).
dnl That doesn't have any obvious consequences for Emacs, but on the whole
dnl it seems better to just live with the duplication.
SUBDIR_MAKEFILES="lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile"
SUBDIR_MAKEFILES="lib/Makefile lib-src/Makefile oldXMenu/Makefile doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile leim/Makefile nextstep/Makefile"
AC_CONFIG_FILES([Makefile lib/Makefile lib-src/Makefile oldXMenu/Makefile \
doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile \
doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile \
leim/Makefile])
leim/Makefile nextstep/Makefile])
dnl test/ is not present in release tarfiles.
opt_makefile=test/automated/Makefile
......
......@@ -287,10 +287,10 @@ for subdir in site-lisp \
`find etc lisp admin -type d` \
doc doc/emacs doc/misc doc/man doc/lispref doc/lispintro \
info m4 msdos \
nextstep nextstep/Cocoa nextstep/Cocoa/Emacs.base \
nextstep nextstep/templates \
nextstep/Cocoa nextstep/Cocoa/Emacs.base \
nextstep/Cocoa/Emacs.base/Contents \
nextstep/Cocoa/Emacs.base/Contents/Resources \
nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj \
nextstep/GNUstep \
nextstep/GNUstep/Emacs.base \
nextstep/GNUstep/Emacs.base/Resources
......@@ -406,21 +406,21 @@ echo "Making links to \`nextstep'"
(cd nextstep
ln ChangeLog README INSTALL ../${tempdir}/nextstep)
echo "Making links to \`nextstep/templates'"
(cd nextstep/templates
ln Emacs.desktop.in Info-gnustep.plist.in Info.plist.in InfoPlist.strings.in../../${tempdir}/nextstep/templates)
echo "Making links to \`nextstep/Cocoa/Emacs.base/Contents'"
(cd nextstep/Cocoa/Emacs.base/Contents
ln Info.plist PkgInfo ../../../../${tempdir}/nextstep/Cocoa/Emacs.base/Contents)
ln PkgInfo ../../../../${tempdir}/nextstep/Cocoa/Emacs.base/Contents)
echo "Making links to \`nextstep/Cocoa/Emacs.base/Contents/Resources'"
(cd nextstep/Cocoa/Emacs.base/Contents/Resources
ln Credits.html *.icns ../../../../../${tempdir}/nextstep/Cocoa/Emacs.base/Contents/Resources)
echo "Making links to \`nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj'"
(cd nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj
ln InfoPlist.strings ../../../../../../${tempdir}/nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj)
echo "Making links to \`nextstep/GNUstep/Emacs.base/Resources'"
(cd nextstep/GNUstep/Emacs.base/Resources
ln Emacs.desktop Info-gnustep.plist README emacs.tiff ../../../../${tempdir}/nextstep/GNUstep/Emacs.base/Resources )
ln README emacs.tiff ../../../../${tempdir}/nextstep/GNUstep/Emacs.base/Resources )
echo "Making links to \`oldXMenu'"
(cd oldXMenu
......
2012-09-16 Glenn Morris <rgm@gnu.org>
* Makefile.in: New file.
* templates: New directory.
* templates/Emacs.desktop.in, templates/Info-gnustep.plist.in:
* templates/Info.plist.in, templates/InfoPlist.strings.in:
Move here from various Cocoa/, GNUstep/ locations.
Let configure set the version number.
* Cocoa/Emacs.base/Contents/Info.plist:
* Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings:
* GNUstep/Emacs.base/Resources/Info-gnustep.plist:
* GNUstep/Emacs.base/Resources/Emacs.desktop: Move to templates/.
* Cocoa/Emacs.base/Contents/Resources/English.lproj: Remove directory.
2012-04-07 Glenn Morris <rgm@gnu.org>
* Cocoa/Emacs.base/Contents/Info.plist:
......
### autodeps.mk --- src/Makefile fragment for GNU Emacs
### nextstep/Makefile for GNU Emacs
## Copyright (C) 2008-2012 Free Software Foundation, Inc.
## Copyright (C) 2012 Free Software Foundation, Inc.
## This file is part of GNU Emacs.
......@@ -19,21 +19,50 @@
### Commentary:
## This is inserted in src/Makefile if HAVE_NS.
### Code:
SHELL = /bin/sh
## The only reason this is in a separate file is because $ns_appdir,
## which appears as a target, is empty on non-NS builds. Some makes
## do not like empty targets, even if they are never used.
srcdir = @srcdir@
EXEEXT = @EXEEXT@
${ns_appdir}: ${ns_appsrc}
rm -fr ${ns_appdir}
@SET_MAKE@
MKDIR_P = @MKDIR_P@
ns_appdir = @ns_appdir@
ns_appbindir = @ns_appbindir@
ns_appsrc = @ns_appsrc@
${ns_appdir}: ${srcdir}/${ns_appsrc} ${ns_appsrc}
rm -rf ${ns_appdir}
${MKDIR_P} ${ns_appdir}
( cd ${ns_appsrc} ; tar cfh - . ) | ( cd ${ns_appdir} ; umask 022; tar xf - )
( cd ${srcdir}/${ns_appsrc} ; tar cfh - . ) | \
( cd ${ns_appdir} ; umask 022; tar xf - )
[ `cd ${srcdir} && /bin/pwd` = `/bin/pwd` ] || \
( cd ${ns_appsrc} ; tar cfh - . ) | \
( cd ${ns_appdir} ; umask 022; tar xf - )
${ns_appbindir}/Emacs: emacs${EXEEXT}
${ns_appbindir}/Emacs: ${ns_appdir} ../src/emacs${EXEEXT}
${MKDIR_P} ${ns_appbindir}
cp -f emacs${EXEEXT} ${ns_appbindir}/Emacs
cp -f ../src/emacs${EXEEXT} ${ns_appbindir}/Emacs
.PHONY: all
all: ${ns_appdir} ${ns_appbindir}/Emacs
.PHONY: clean distclean maintainer-clean
clean:
rm -rf ${ns_appdir}
distclean: clean
rm -f Makefile
rm -f GNUstep/Emacs.base/Resources/Info-gnustep.plist \
GNUstep/Emacs.base/Resources/Emacs.desktop \
Cocoa/Emacs.base/Contents/Info.plist \
Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings
[ `cd ${srcdir} && /bin/pwd` = `/bin/pwd` ] || rm -rf ${ns_appsrc}
ns-app: ${ns_appdir} ${ns_appbindir}/Emacs
maintainer-clean: distclean
### ns.mk ends here
### Makefile.in ends here
[Desktop Entry]
Encoding=UTF-8
Type=Application
Version=24.2.50
Version=@version@
Categories=GNUstep
Name=Emacs
Comment=GNU Emacs for NeXT/Open/GNUstep and OS X
......
......@@ -2,7 +2,7 @@
ApplicationDescription = "GNU Emacs for GNUstep / OS X";
ApplicationIcon = emacs.tiff;
ApplicationName = Emacs;
ApplicationRelease = "24.2.50";
ApplicationRelease = "@version@";
Authors = (
"Adrian Robert (GNUstep)",
"Christophe de Dinechin (MacOS X)",
......@@ -13,7 +13,7 @@
);
Copyright = "Copyright (C) 2012 Free Software Foundation, Inc.";
CopyrightDescription = "Released under the GNU General Public License Version 3 or later";
FullVersionID = "Emacs 24.2.50, NS Windowing";
FullVersionID = "Emacs @version@, NS Windowing";
NSExecutable = Emacs;
NSIcon = emacs.tiff;
NSPrincipalClass = NSApplication;
......
......@@ -553,7 +553,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
<key>CFBundleExecutable</key>
<string>Emacs</string>
<key>CFBundleGetInfoString</key>
<string>Emacs 24.2.50 Copyright (C) 2012 Free Software Foundation, Inc.</string>
<string>Emacs @version@ Copyright (C) 2012 Free Software Foundation, Inc.</string>
<key>CFBundleIconFile</key>
<string>Emacs.icns</string>
<key>CFBundleIdentifier</key>
......@@ -566,7 +566,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
<string>APPL</string>
<!-- This should be the emacs version number. -->
<key>CFBundleShortVersionString</key>
<string>24.2.50</string>
<string>@version@</string>
<key>CFBundleSignature</key>
<string>EMAx</string>
<!-- This SHOULD be a build number. -->
......
/* Localized versions of Info.plist keys */
CFBundleName = "Emacs";
CFBundleShortVersionString = "Version 24.2.50";
CFBundleGetInfoString = "Emacs version 24.2.50, NS Windowing";
CFBundleShortVersionString = "Version @version@";
CFBundleGetInfoString = "Emacs version @version@, NS Windowing";
NSHumanReadableCopyright = "Copyright (C) 2012 Free Software Foundation, Inc.";
2012-09-17 Kenichi Handa <handa@gnu.org>
2012-09-16 Glenn Morris <rgm@gnu.org>
* Makefile.in (ns_appdir, ns_appbindir, ns_appsrc): Remove variables.
(ns_frag): Remove.
(ns-app): Move here from ns.mk, and simplify.
(clean): Simplify nextstep entry.
* ns.mk: Remove file.
2012-09-16 Kenichi Handa <handa@gnu.org>
* font.c (Ffont_shape_gstring): Fix previous change; GLYPHs may
not covert the last few charactes.
......
......@@ -255,9 +255,6 @@ MSDOS_OBJ =
## w16select.o termcap.o if MSDOS && HAVE_X_WINDOWS.
MSDOS_X_OBJ =
ns_appdir=@ns_appdir@
ns_appbindir=@ns_appbindir@
ns_appsrc=@ns_appsrc@
NS_OBJ=@NS_OBJ@
## nsterm.o nsfns.o nsmenu.o nsselect.o nsimage.o nsfont.o if HAVE_NS.
NS_OBJC_OBJ=@NS_OBJC_OBJ@
......@@ -501,8 +498,9 @@ $(OLDXMENU): $(OLDXMENU_TARGET)
doc.o: buildobj.h
## If HAVE_NS, some ns-specific rules (for OTHER_FILES) are inserted here.
@ns_frag@
ns-app: emacs$(EXEEXT)
cd ../nextstep && $(MAKE) $(MFLAGS) all
.PHONY: mostlyclean clean bootstrap-clean distclean maintainer-clean
.PHONY: versionclean extraclean frc
......@@ -516,7 +514,7 @@ mostlyclean:
clean: mostlyclean
rm -f emacs-*.*.*$(EXEEXT) emacs$(EXEEXT)
-rm -rf $(DEPDIR)
test "X$(ns_appdir)" = "X" || rm -rf $(ns_appdir)
-cd ../nextstep && $(MAKE) $(MFLAGS) clean
## bootstrap-clean is used to clean up just before a bootstrap.
## It should remove all files generated during a compilation/bootstrap,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment