Mercurial > emacs
comparison lib-src/Makefile.in @ 1675:2d6fee9f818d
* Makefile.in (exec_prefix): New variable.
(bindir, libdir): Use it instead of `prefix'.
* Makefile.in (CFLAGS): #define HAVE_CONFIG_H, too.
* Makefile.in (libdir): Default to ${prefix}/lib.
(archlibdir): Adjusted to match.
* Makefile.in (distclean): Don't delete backup or autosave files.
(extraclean): Like realclean, but does delete backup and autosave
files.
* Makefile.in (realclean): Ignore errors from rm.
* Makefile.in (distclean): Don't bother to delete ../arch-lib;
that doesn't exist anymore.
* Makefile.in (prefix, bindir, libdir, srcdir): New variables, as
described in the top-level Makefile.
(UTILITIES): Add make-path to the list of utility programs.
(../arch-lib): Replaced by the ${archlibdir} target, which places
the executables in their permanent home.
(install, install.sysv, install.xenix): Consolidated into one
target which should work under all circumstances, modulo a few
ignored error messages.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Sat, 12 Dec 1992 15:24:50 +0000 |
parents | 59aca09e60f8 |
children | 29579cd51981 |
comparison
equal
deleted
inserted
replaced
1674:75e8a7f920c7 | 1675:2d6fee9f818d |
---|---|
10 | 10 |
11 # Avoid trouble on systems where the `SHELL' variable might be | 11 # Avoid trouble on systems where the `SHELL' variable might be |
12 # inherited from the environment. | 12 # inherited from the environment. |
13 SHELL = /bin/sh | 13 SHELL = /bin/sh |
14 | 14 |
15 # ==================== Things `configure' might edit ==================== | |
16 | |
17 CC=cc | |
18 CONFIG_CFLAGS=-g | |
19 LOADLIBES= | |
20 version=version-not-set | |
21 configname=configuration-name-not-set | |
22 | |
23 # ==================== Where To Install Things ==================== | |
24 | |
25 # The default location for installation. Everything is placed in | |
26 # subdirectories of this directory. The default values for many of | |
27 # the variables below are expressed in terms of this one, so you may | |
28 # not need to change them. | |
29 prefix=/usr/local | |
30 | |
31 # Like `prefix', but used for architecture-specific files. | |
32 exec_prefix=${prefix} | |
33 | |
34 # Where to install Emacs and other binaries that people will want to | |
35 # run directly (like etags). | |
36 bindir=${exec_prefix}/bin | |
37 | |
38 # Where to install and expect executable files to be run by Emacs | |
39 # rather than directly by users, and other architecture-dependent | |
40 # data. ${archlibdir} is usually below this. | |
41 libdir=${exec_prefix}/lib | |
42 | |
43 # Where to find the source code - setting this to anything but | |
44 # . doesn't work yet. The source code for Emacs's C kernel is | |
45 # expected to be in ${srcdir}/src, and the source code for Emacs's | |
46 # utility programs is expected to be in ${srcdir}/lib-src. This is | |
47 # set by the configure script's `--srcdir' option. | |
48 srcdir=. | |
49 | |
50 # ==================== Emacs-specific directories ==================== | |
51 | |
52 # These variables hold the values Emacs will actually use. They are | |
53 # based on the values of the standard Make variables above. | |
54 | |
55 # Where to put executables to be run by Emacs rather than the user. | |
56 # This path usually includes the Emacs version and configuration name, | |
57 # so that multiple configurations for multiple versions of Emacs may | |
58 # be installed at once. | |
59 archlibdir=${libdir}/emacs/${version}/${configname} | |
60 | |
61 # ==================== Utility Programs for the Build ==================== | |
62 | |
15 # Allow the user to specify the install program. | 63 # Allow the user to specify the install program. |
16 INSTALL = install | 64 INSTALL = install |
17 INSTALLFLAGS = | 65 INSTALLFLAGS = -c |
66 INSTALL_PROGRAM = ${INSTALL} | |
67 INSTALL_DATA = ${INSTALL} | |
68 | |
69 # ============================= Targets ============================== | |
18 | 70 |
19 # Things that a user might actually run, which should be installed in bindir. | 71 # Things that a user might actually run, which should be installed in bindir. |
20 INSTALLABLES = etags ctags emacsclient b2m | 72 INSTALLABLES = etags ctags emacsclient b2m |
21 | 73 |
22 # Things that Emacs runs internally, or during the build process, | 74 # Things that Emacs runs internally, or during the build process, |
23 # which should not be installed in bindir. | 75 # which should not be installed in bindir. |
24 UTILITIES= test-distrib wakeup make-docfile digest-doc sorted-doc \ | 76 UTILITIES= test-distrib make-path wakeup make-docfile digest-doc sorted-doc \ |
25 movemail cvtmail fakemail yow env emacsserver hexl timer | 77 movemail cvtmail fakemail yow env emacsserver hexl timer |
26 | 78 |
27 # Like UTILITIES, but they're not system-dependent, and should not be | 79 # Like UTILITIES, but they're not system-dependent, and should not be |
28 # deleted by the distclean target. | 80 # deleted by the distclean target. |
29 SCRIPTS= rcs2log vcdiff | 81 SCRIPTS= rcs2log vcdiff |
30 | 82 |
31 EXECUTABLES= ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} | 83 EXECUTABLES= ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} |
32 | 84 |
33 # These things are edited by ../configure; don't change anything before | 85 ### We need to #define emacs to get the right versions of some files. |
34 # or including the '='; everything after that gets blown away. | 86 ### Some other files - those shared with other GNU utilities - need |
35 CC=gcc | 87 ### HAVE_CONFIG_H #defined before they know they can take advantage of |
36 CONFIG_CFLAGS= -g -O | 88 ### the information in ../src/config.h. |
37 LOADLIBES= | 89 CFLAGS=${CONFIG_CFLAGS} -Demacs -DHAVE_CONFIG_H -I../src |
38 | 90 |
39 CFLAGS=${CONFIG_CFLAGS} -Demacs -I../src | 91 all: ${EXECUTABLES} |
40 | 92 |
41 all: ../arch-lib | 93 ### Install the internal utilities. Until they are installed, we can |
42 | 94 ### just run them directly from lib-src. |
43 # We use rm -f so that rm won't try to ask questions during the build. | 95 ${archlibdir}: all |
44 ../arch-lib: ${EXECUTABLES} | 96 @echo |
45 for file in ${EXECUTABLES} ; do \ | 97 @echo "Installing utilities run internally by Emacs." |
46 if [ -f $${file} ]; then \ | 98 ./make-path ${archlibdir} |
47 if [ -f ../arch-lib/$${file} ]; then \ | 99 if [ `(cd ${archlibdir};/bin/pwd)` != `/bin/pwd` ]; then \ |
48 rm -f ../arch-lib/$${file} ; \ | 100 for file in ${EXECUTABLES} ; do \ |
49 fi ; \ | 101 cp $${file} ${archlibdir} ; \ |
50 ln $${file} ../arch-lib ; \ | 102 chmod 755 ${archlibdir}/$${file} ; \ |
51 fi ; \ | 103 done ; \ |
104 fi | |
105 @echo | |
106 @echo "Changing the owner and group of Emacs's utility programs to \`bin'." | |
107 @echo "(You may ignore errors here if you don't care about this.)" | |
108 -for file in ${EXECUTABLES} ; do \ | |
109 chgrp bin ${archlibdir}/$${file} ; \ | |
110 chown bin ${archlibdir}/$${file} ; \ | |
52 done | 111 done |
53 | 112 |
54 # We don't need to install `wakeup' explicitly, because it will be copied when | 113 # We don't need to install `wakeup' explicitly, because it will be copied when |
55 # this whole directory is copied. | 114 # this whole directory is copied. |
56 install: all | 115 install: ${archlibdir} |
57 ${INSTALL} ${INSTALLFLAGS} -c emacsclient ${BINDIR}/emacsclient | 116 @echo |
58 ${INSTALL} ${INSTALLFLAGS} -c etags ${BINDIR}/etags | 117 @echo "Installing utilities for users to run." |
59 ${INSTALL} ${INSTALLFLAGS} -c ctags ${BINDIR}/ctags | 118 for file in emacsclient etags ctags b2m ; do \ |
60 ${INSTALL} ${INSTALLFLAGS} -c b2m ${BINDIR}/b2m | 119 cp $${file} ${bindir}/$${file}.new ; \ |
61 ${INSTALL} ${INSTALLFLAGS} -c -m 444 emacs.1 ${MANDIR}/emacs.${MANEXT} | 120 chmod 755 ${bindir}/$${file}.new ; \ |
62 | 121 done |
63 install.sysv: all | 122 @echo |
64 -cp emacsclient ${BINDIR}/emacsclient.new | 123 @echo "Changing the owner and group of utility programs to \`bin'." |
65 -chmod 755 ${BINDIR}/emacsclient.new | 124 @echo "(You may ignore errors here if you don't care about this.)" |
66 -chgrp bin ${BINDIR}/emacsclient.new | 125 -for file in emacsclient etags ctags b2m ; do \ |
67 -chown bin ${BINDIR}/emacsclient.new | 126 chgrp bin ${bindir}/$${file}.new ; \ |
68 -mv ${BINDIR}/emacsclient.new ${BINDIR}/emacsclient | 127 chown bin ${bindir}/$${file}.new ; \ |
69 -cp etags ${BINDIR}/etags.new | 128 mv ${bindir}/$${file}.new ${bindir}/$${file} ; \ |
70 -chmod 755 ${BINDIR}/etags.new | 129 done |
71 -chgrp bin ${BINDIR}/etags.new | |
72 -chown bin ${BINDIR}/etags.new | |
73 -mv ${BINDIR}/etags.new ${BINDIR}/etags | |
74 -cp ctags ${BINDIR}/ctags.new | |
75 -chmod 755 ${BINDIR}/ctags.new | |
76 -chgrp bin ${BINDIR}/ctags.new | |
77 -chown bin ${BINDIR}/ctags.new | |
78 -mv ${BINDIR}/ctags.new ${BINDIR}/ctags | |
79 -cp b2m ${BINDIR}/b2m.new | |
80 -chmod 755 ${BINDIR}/b2m.new | |
81 -chgrp bin ${BINDIR}/b2m.new | |
82 -chown bin ${BINDIR}/b2m.new | |
83 -mv ${BINDIR}/b2m.new ${BINDIR}/b2m | |
84 -cp emacs.1 ${MANDIR}/emacs.${MANEXT}.new | |
85 -chmod 444 ${MANDIR}/emacs.${MANEXT}.new | |
86 -mv ${MANDIR}/emacs.${MANEXT}.new ${MANDIR}/emacs.${MANEXT} | |
87 | |
88 install.xenix: | |
89 cp etags ctags emacsclient ${BINDIR} | |
90 chmod 755 ${BINDIR}/etags ${BINDIR}/ctags | |
91 chmod 755 ${BINDIR}/emacsclient | |
92 cp b2m ${BINDIR} | |
93 chmod 755 ${BINDIR}/b2m | |
94 cp emacs.1 ${MANDIR}/emacs.${MANEXT} | |
95 chmod 444 ${MANDIR}/emacs.${MANEXT} | |
96 | |
97 | 130 |
98 clean mostlyclean: | 131 clean mostlyclean: |
99 -rm -f ${INSTALLABLES} ${UTILITIES} core *.o | 132 -rm -f ${INSTALLABLES} ${UTILITIES} core *.o |
100 | 133 |
101 distclean: | 134 distclean: |
102 -rm -f ${INSTALLABLES} ${UTILITIES} *~ \#* ../etc/DOC* core *.o | 135 -rm -f ${INSTALLABLES} ${UTILITIES} ../etc/DOC* core *.o |
103 cd ../arch-lib; rm -f ${EXECUTABLES} | |
104 | 136 |
105 realclean: distclean | 137 realclean: distclean |
106 rm TAGS aixcc.c | 138 -rm TAGS aixcc.c |
139 | |
140 extraclean: realclean | |
141 -rm -f *~ \#* | |
107 | 142 |
108 # Test the contents of the directory. | 143 # Test the contents of the directory. |
109 check: | 144 check: |
110 @echo "We don't have any tests for GNU Emacs yet." | 145 @echo "We don't have any tests for GNU Emacs yet." |
111 | 146 |