; Merge: Lisp watchpoints (Bug#24923)
[emacs.git] / nextstep / Makefile.in
blobd6e1282561302d7effa621f8038222621889b31b
1 ### @configure_input@
3 ## Copyright (C) 2012-2016 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 ## Emacs.app.
37 ns_appdir = @ns_appdir@
38 ## GNUstep: ns_appdir; macOS: ns_appdir/Contents/MacOS
39 ns_appbindir = @ns_appbindir@
40 ## GNUstep/Emacs.base or Cocoa/Emacs.base.
41 ns_appsrc = @ns_appsrc@
42 ## GNUstep: GNUstep/Emacs.base/Resources/Info-gnustep.plist
43 ## macOS: Cocoa/Emacs.base/Contents/Info.plist
44 ns_check_file = @ns_appdir@/@ns_check_file@
46 .PHONY: all
48 all: ${ns_appdir} ${ns_appbindir}/Emacs
50 ${ns_check_file} ${ns_appdir}: ${srcdir}/${ns_appsrc} ${ns_appsrc}
51 rm -rf ${ns_appdir}
52 ${MKDIR_P} ${ns_appdir}
53 ( cd ${srcdir}/${ns_appsrc} ; tar cfh - . ) | \
54 ( cd ${ns_appdir} ; umask 022; tar xf - )
55 [ "`cd ${srcdir} && /bin/pwd`" = "`/bin/pwd`" ] || \
56 ( cd ${ns_appsrc} ; tar cfh - . ) | \
57 ( cd ${ns_appdir} ; umask 022; tar xf - )
58 touch ${ns_appdir}
60 ## Don't create ns_appbindir via an order-only prerequisite, because
61 ## on GNUstep ns_appbindir and ns_bindir are the same, so
62 ## the rule for ns_appbindir would conflict with that for ns_appdir.
63 ${ns_appbindir}/Emacs: ${ns_appdir} ${ns_check_file} ../src/emacs${EXEEXT}
64 ${MKDIR_P} ${ns_appbindir}
65 cp -f ../src/emacs${EXEEXT} $@
67 .PHONY: FORCE
69 ../src/emacs${EXEEXT}: FORCE
70 ${MAKE} -C ../src $(notdir $@)
72 # create a fake installation pointing back to the source tree
73 # to run GUI Emacs in-place
74 .PHONY: links
76 links: ../src/emacs${EXEEXT}
77 for d in $(shell cd ${srcdir}/${ns_appsrc}; find . -type d); do ${MKDIR_P} ${ns_appdir}/$$d; done
78 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
79 for d in $(shell cd ${ns_appsrc}; find . -type d); do ${MKDIR_P} ${ns_appdir}/$$d; done
80 for f in $(shell cd ${ns_appsrc}; find . -type f); do ln -s $(shell cd ${ns_appsrc}; pwd -P)/$$f ${ns_appdir}/$$f; done
81 ln -s $(top_srcdir_abs)/lisp ${ns_appdir}/Contents/Resources
82 ln -s $(top_srcdir_abs)/info ${ns_appdir}/Contents/Resources
83 ${MKDIR_P} ${ns_appbindir}
84 ln -s $(abs_top_builddir)/src/emacs${EXEEXT} ${ns_appbindir}/Emacs
85 ln -s $(abs_top_builddir)/lib-src ${ns_appbindir}/bin
86 ln -s $(abs_top_builddir)/lib-src ${ns_appbindir}/libexec
87 ${MKDIR_P} ${ns_appdir}/Contents/Resources/etc
88 for f in $(shell cd $(top_srcdir_abs)/etc; ls); do ln -s $(top_srcdir_abs)/etc/$$f ${ns_appdir}/Contents/Resources/etc; done
89 ln -s $(abs_top_builddir)/etc/DOC ${ns_appdir}/Contents/Resources/etc
90 @echo if the next find prints something, the installation failed
91 find ${ns_appdir} -exec test \! -e {} \; -ls
93 .PHONY: clean distclean bootstrap-clean maintainer-clean
95 clean:
96 rm -rf ${ns_appdir}
98 distclean: clean
99 rm -f Makefile
100 rm -f GNUstep/Emacs.base/Resources/Info-gnustep.plist \
101 GNUstep/Emacs.base/Resources/Emacs.desktop \
102 Cocoa/Emacs.base/Contents/Info.plist \
103 Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings
105 bootstrap-clean maintainer-clean: distclean
107 ### Makefile.in ends here