Merge from origin/emacs-24
[emacs.git] / nextstep / Makefile.in
blob07e7285924a7d90b4e1be6ee3e2a5dfb3463b7f6
1 ### @configure_input@
3 ## Copyright (C) 2012-2015 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 <http://www.gnu.org/licenses/>.
20 ### Commentary:
22 ### Code:
23 SHELL = @SHELL@
25 srcdir = @srcdir@
26 abs_builddir = @abs_builddir@
27 abs_top_builddir = @abs_top_builddir@
28 EXEEXT = @EXEEXT@
30 # abs_top_srcdir may contain ".."
31 top_srcdir_abs = $(shell cd @top_srcdir@; pwd -P)
33 @SET_MAKE@
34 MKDIR_P = @MKDIR_P@
36 ns_appdir = @ns_appdir@
37 ns_appbindir = @ns_appbindir@
38 ns_appsrc = @ns_appsrc@
39 ns_check_file = @ns_appdir@/@ns_check_file@
41 ${ns_check_file} ${ns_appdir}: ${srcdir}/${ns_appsrc} ${ns_appsrc}
42 rm -rf ${ns_appdir}
43 ${MKDIR_P} ${ns_appdir}
44 ( cd ${srcdir}/${ns_appsrc} ; tar cfh - . ) | \
45 ( cd ${ns_appdir} ; umask 022; tar xf - )
46 [ "`cd ${srcdir} && /bin/pwd`" = "`/bin/pwd`" ] || \
47 ( cd ${ns_appsrc} ; tar cfh - . ) | \
48 ( cd ${ns_appdir} ; umask 022; tar xf - )
49 touch ${ns_appdir}
51 ${ns_appbindir}:
52 ${MKDIR_P} $@
54 ${ns_appbindir}/Emacs: ${ns_appdir} ${ns_check_file} ../src/emacs${EXEEXT} | \
55 ${ns_appbindir}
56 cp -f ../src/emacs${EXEEXT} $@
58 .PHONY: all links
60 all: ${ns_appdir} ${ns_appbindir}/Emacs
62 # create a fake installation pointing back to the source tree
63 # to run GUI Emacs in-place
64 links : ../src/emacs${EXEEXT} | ${ns_appbindir}
65 for d in $(shell cd ${srcdir}/${ns_appsrc}; find . -type d); do ${MKDIR_P} ${ns_appdir}/$$d; done
66 for f in $(shell cd ${srcdir}/${ns_appsrc}; find . -type f); do ln -s $(shell cd ${srcdir}; pwd -P)/${ns_appsrc}/$$f ${ns_appdir}/$$f; done
67 for d in $(shell cd ${ns_appsrc}; find . -type d); do ${MKDIR_P} ${ns_appdir}/$$d; done
68 for f in $(shell cd ${ns_appsrc}; find . -type f); do ln -s $(shell cd ${ns_appsrc}; pwd -P)/$$f ${ns_appdir}/$$f; done
69 ln -s $(top_srcdir_abs)/lisp ${ns_appdir}/Contents/Resources
70 ln -s $(top_srcdir_abs)/info ${ns_appdir}/Contents/Resources
71 ln -s $(abs_top_builddir)/src/emacs${EXEEXT} ${ns_appbindir}/Emacs
72 ln -s $(abs_top_builddir)/lib-src ${ns_appbindir}/bin
73 ln -s $(abs_top_builddir)/lib-src ${ns_appbindir}/libexec
74 ${MKDIR_P} ${ns_appdir}/Contents/Resources/etc
75 for f in $(shell cd $(top_srcdir_abs)/etc; ls); do ln -s $(top_srcdir_abs)/etc/$$f ${ns_appdir}/Contents/Resources/etc; done
76 ln -s $(abs_top_builddir)/etc/DOC ${ns_appdir}/Contents/Resources/etc
77 @echo if the next find prints something, the installation failed
78 find ${ns_appdir} -exec test \! -e {} \; -ls
80 .PHONY: clean distclean bootstrap-clean maintainer-clean
82 clean:
83 rm -rf ${ns_appdir}
85 distclean: clean
86 rm -f Makefile
87 rm -f GNUstep/Emacs.base/Resources/Info-gnustep.plist \
88 GNUstep/Emacs.base/Resources/Emacs.desktop \
89 Cocoa/Emacs.base/Contents/Info.plist \
90 Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings
92 bootstrap-clean maintainer-clean: distclean
94 ### Makefile.in ends here