comparison Makefile.in @ 2498:0126ca788e99

* Makefile.in (clean mostlyclean): Missing right paren. Change `configure' to a mixture of custom code and autoconf stuff. autoconf can't derive all the information we need, but we'd really like to be able to take advantage of some of its tests, and its file-editing facilities. * configure.in: Renamed from configure. Quote the sections of shell script we want copied literally to the configure script. (compile): Initialize this to make the autoconf macros' code happy. Use AC_PROG_CC, AC_CONST, and AC_RETSIGTYPE instead of writing out code to do their jobs. Use autoconf to produce Makefile and src/config.h. Remove the Makefile-style comment that autoconf places at the top of src/config.h. (config_h_opts): Removed - no longer necessary. * Makefile.in (configname): Renamed to configuration. (CONFIG_CFLAGS): Renamed to DEFS. (CC, DEFS, C_SWITCH_SYSTEM, version, configuration): Adjusted to get values via autoload @cookies@. (libsrc_libs): Get this from autoconf. We used to do nothing about this. (${SUBDIR}): Pass DEFS to submakes instead of CONFIG_CFLAGS. * Makefile.in (src/paths.h, lib-src/Makefile, src/Makefile): Don't echo the move-if-change command.
author Jim Blandy <jimb@redhat.com>
date Sat, 10 Apr 1993 06:01:49 +0000
parents 094bec4c13e9
children b951532eca82
comparison
equal deleted inserted replaced
2497:55f73883303f 2498:0126ca788e99
38 SHELL = /bin/sh 38 SHELL = /bin/sh
39 MAKE = make # BSD doesn't have it as a default. 39 MAKE = make # BSD doesn't have it as a default.
40 40
41 # ==================== Things `configure' Might Edit ==================== 41 # ==================== Things `configure' Might Edit ====================
42 42
43 CC=cc 43 CC=@CC@
44 CONFIG_CFLAGS=-g 44 DEFS=@DEFS@
45 C_SWITCH_SYSTEM= 45 C_SWITCH_SYSTEM=@c_switch_system@
46 46
47 ### These help us choose version- and architecture-specific directories 47 ### These help us choose version- and architecture-specific directories
48 ### to install files in. 48 ### to install files in.
49 49
50 ### This should be the number of the Emacs version we're building, 50 ### This should be the number of the Emacs version we're building,
51 ### like `18.59' or `19.0'. 51 ### like `18.59' or `19.0'.
52 version=version-not-set 52 version=@version@
53 53
54 ### This should be the name of the configuration we're building Emacs 54 ### This should be the name of the configuration we're building Emacs
55 ### for, like `mips-dec-ultrix' or `sparc-sun-sunos'. 55 ### for, like `mips-dec-ultrix' or `sparc-sun-sunos'.
56 configname=configuration-name-not-set 56 configuration=@configuration@
57
58 ### Libraries which should be edited into lib-src/Makefile.
59 libsrc_libs=@libsrc_libs@
57 60
58 # ==================== Where To Install Things ==================== 61 # ==================== Where To Install Things ====================
59 62
60 # The default location for installation. Everything is placed in 63 # The default location for installation. Everything is placed in
61 # subdirectories of this directory. The default values for many of 64 # subdirectories of this directory. The default values for many of
151 154
152 # Where to put executables to be run by Emacs rather than the user. 155 # Where to put executables to be run by Emacs rather than the user.
153 # This path usually includes the Emacs version and configuration name, 156 # This path usually includes the Emacs version and configuration name,
154 # so that multiple configurations for multiple versions of Emacs may 157 # so that multiple configurations for multiple versions of Emacs may
155 # be installed at once. 158 # be installed at once.
156 archlibdir=${libdir}/emacs/${version}/${configname} 159 archlibdir=${libdir}/emacs/${version}/${configuration}
157 160
158 # ====================== Developer's configuration ======================= 161 # ====================== Developer's configuration =======================
159 162
160 # The following assignments make sense if you're running Emacs on a single 163 # The following assignments make sense if you're running Emacs on a single
161 # machine, one version at a time, and you want changes to the lisp and etc 164 # machine, one version at a time, and you want changes to the lisp and etc
182 # ============================= Targets ============================== 185 # ============================= Targets ==============================
183 186
184 # Flags passed down to subdirectory makefiles. 187 # Flags passed down to subdirectory makefiles.
185 MFLAGS = 188 MFLAGS =
186 189
187 CFLAGS=${CONFIG_CFLAGS} 190 CFLAGS=${DEFS}
188 191
189 # Subdirectories to make recursively. `lisp' is not included 192 # Subdirectories to make recursively. `lisp' is not included
190 # because the compiled lisp files are part of the distribution 193 # because the compiled lisp files are part of the distribution
191 # and you cannot remake them without installing Emacs first. 194 # and you cannot remake them without installing Emacs first.
192 SUBDIR = lib-src src 195 SUBDIR = lib-src src
220 -e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "'$${lisppath}'";' \ 223 -e 's;\(#.*PATH_LOADSEARCH\).*$$;\1 "'$${lisppath}'";' \
221 -e 's;\(#.*PATH_DUMPLOADSEARCH\).*$$;\1 "'$${buildlisppath}'";' \ 224 -e 's;\(#.*PATH_DUMPLOADSEARCH\).*$$;\1 "'$${buildlisppath}'";' \
222 -e 's;\(#.*PATH_EXEC\).*$$;\1 "${archlibdir}";' \ 225 -e 's;\(#.*PATH_EXEC\).*$$;\1 "${archlibdir}";' \
223 -e 's;\(#.*PATH_DATA\).*$$;\1 "${etcdir}";' \ 226 -e 's;\(#.*PATH_DATA\).*$$;\1 "${etcdir}";' \
224 -e 's;\(#.*PATH_LOCK\).*$$;\1 "${lockdir}/";') 227 -e 's;\(#.*PATH_LOCK\).*$$;\1 "${lockdir}/";')
225 ${srcdir}/move-if-change src/paths.h.tmp src/paths.h 228 @${srcdir}/move-if-change src/paths.h.tmp src/paths.h
226 229
227 src: lib-src 230 src: lib-src
228 231
229 .RECURSIVE: ${SUBDIR} 232 .RECURSIVE: ${SUBDIR}
230 233
231 ${SUBDIR}: ${SUBDIR_MAKEFILES} FRC 234 ${SUBDIR}: ${SUBDIR_MAKEFILES} FRC
232 cd $@; $(MAKE) all ${MFLAGS} \ 235 cd $@; $(MAKE) all ${MFLAGS} \
233 CC='${CC}' CONFIG_CFLAGS='${CONFIG_CFLAGS}' \ 236 CC='${CC}' DEFS='${DEFS}' \
234 srcdir='${srcdir}/$@' libdir='${libdir}' 237 srcdir='${srcdir}/$@' libdir='${libdir}'
235 238
236 ## We build the makefiles for the subdirectories here so that we can 239 ## We build the makefiles for the subdirectories here so that we can
237 ## edit the values for the path variables into them. This means that 240 ## edit the values for the path variables into them. This means that
238 ## when the user has built them from this makefile once, they will use 241 ## when the user has built them from this makefile once, they will use
245 echo "# running \`make lib-src/Makefile' at the top of the" ; \ 248 echo "# running \`make lib-src/Makefile' at the top of the" ; \
246 echo "# Emacs build tree instead, or editing" ; \ 249 echo "# Emacs build tree instead, or editing" ; \
247 echo "# \`${srcdir}/lib-src/Makefile.in' itself." ; \ 250 echo "# \`${srcdir}/lib-src/Makefile.in' itself." ; \
248 /bin/sed < ${srcdir}/lib-src/Makefile.in \ 251 /bin/sed < ${srcdir}/lib-src/Makefile.in \
249 -e 's|^\(version *=\).*$$|\1'"${version}"'|' \ 252 -e 's|^\(version *=\).*$$|\1'"${version}"'|' \
250 -e 's|^\(configname *=\).*$$|\1'"${configname}"'|' \ 253 -e 's|^\(configname *=\).*$$|\1'"${configuration}"'|' \
251 -e 's|^\(prefix *=\).*$$|\1'"${prefix}"'|' \ 254 -e 's|^\(prefix *=\).*$$|\1'"${prefix}"'|' \
252 -e 's|^\(exec_prefix *=\).*$$|\1'"${exec_prefix}"'|' \ 255 -e 's|^\(exec_prefix *=\).*$$|\1'"${exec_prefix}"'|' \
253 -e 's|^\(libdir *=\).*$$|\1'"${libdir}"'|' \ 256 -e 's|^\(libdir *=\).*$$|\1'"${libdir}"'|' \
254 -e 's|^\(srcdir *=\).*$$|\1'"${srcdir}"'|' \ 257 -e 's|^\(srcdir *=\).*$$|\1'"${srcdir}"'|' \
255 -e 's|^\(archlibdir *=\).*$$|\1'"${archlibdir}"'|' \ 258 -e 's|^\(archlibdir *=\).*$$|\1'"${archlibdir}"'|' \
256 -e 's|^CC *=.*$$|CC='"${CC}"'|' \ 259 -e 's|^CC *=.*$$|CC='"${CC}"'|' \
257 -e 's|^CONFIG_CFLAGS *=.*$$|CONFIG_CFLAGS='"${CONFIG_CFLAGS}"'|' \ 260 -e 's|^DEFS *=.*$$|DEFS='"${DEFS}"'|' \
258 -e 's|^C_SWITCH_SYSTEM *=.*$$|C_SWITCH_SYSTEM='"${C_SWITCH_SYSTEM}"'|' \ 261 -e 's|^C_SWITCH_SYSTEM *=.*$$|C_SWITCH_SYSTEM='"${C_SWITCH_SYSTEM}"'|' \
259 -e 's|^LOADLIBES *=.*$$|LOADLIBES='"${libsrc_libs}"'|' \ 262 -e 's|^LOADLIBES *=.*$$|LOADLIBES='"${libsrc_libs}"'|' \
260 -e '/^# DIST: /d') > lib-src/Makefile.tmp 263 -e '/^# DIST: /d') > lib-src/Makefile.tmp
261 ${srcdir}/move-if-change lib-src/Makefile.tmp lib-src/Makefile 264 @${srcdir}/move-if-change lib-src/Makefile.tmp lib-src/Makefile
262 chmod -w lib-src/Makefile 265 chmod -w lib-src/Makefile
263 266
264 src/Makefile: ${srcdir}/src/Makefile.in Makefile 267 src/Makefile: ${srcdir}/src/Makefile.in Makefile
265 rm -f src/Makefile.tmp 268 rm -f src/Makefile.tmp
266 @echo "Producing \`src/Makefile' from \`${srcdir}/src/Makefile.in'." 269 @echo "Producing \`src/Makefile' from \`${srcdir}/src/Makefile.in'."
270 echo "# Emacs build tree instead, or editing" ; \ 273 echo "# Emacs build tree instead, or editing" ; \
271 echo "# \`${srcdir}/src/Makefile.in' itself." ; \ 274 echo "# \`${srcdir}/src/Makefile.in' itself." ; \
272 /bin/sed < ${srcdir}/src/Makefile.in \ 275 /bin/sed < ${srcdir}/src/Makefile.in \
273 -e 's|^\(srcdir *=\).*$$|\1'"${srcdir}"'|' \ 276 -e 's|^\(srcdir *=\).*$$|\1'"${srcdir}"'|' \
274 -e 's|^CC *=.*$$|CC='"${CC}"'|' \ 277 -e 's|^CC *=.*$$|CC='"${CC}"'|' \
275 -e 's|^CONFIG_CFLAGS *=.*$$|CONFIG_CFLAGS='"${CONFIG_CFLAGS}"'|' \ 278 -e 's|^DEFS *=.*$$|DEFS='"${DEFS}"'|' \
276 -e '/^# DIST: /d') > src/Makefile.tmp 279 -e '/^# DIST: /d') > src/Makefile.tmp
277 ${srcdir}/move-if-change src/Makefile.tmp src/Makefile 280 @${srcdir}/move-if-change src/Makefile.tmp src/Makefile
278 chmod -w src/Makefile 281 chmod -w src/Makefile
279 282
280 oldXMenu/Makefile: ${srcdir}/oldXMenu/Makefile Makefile 283 oldXMenu/Makefile: ${srcdir}/oldXMenu/Makefile Makefile
281 echo "Producing \`src/Makefile' from \`${srcdir}/src/Makefile.in'." 284 echo "Producing \`src/Makefile' from \`${srcdir}/src/Makefile.in'."
282 rm -f src/Makefile.tmp 285 rm -f src/Makefile.tmp
459 ### 462 ###
460 clean mostlyclean: 463 clean mostlyclean:
461 cd src; $(MAKE) clean 464 cd src; $(MAKE) clean
462 cd lib-src; $(MAKE) clean 465 cd lib-src; $(MAKE) clean
463 cd oldXMenu; $(MAKE) clean 466 cd oldXMenu; $(MAKE) clean
464 if [ `(cd ${etcdir} ; /bin/pwd` != `(cd etc; /bin/pwd)` ] ; then \ 467 if [ `(cd ${etcdir} ; /bin/pwd)` != `(cd etc; /bin/pwd)` ] ; then \
465 cd etc; $(MAKE) clean; \ 468 cd etc; $(MAKE) clean; \
466 else true; \ 469 else true; \
467 fi 470 fi
468 471
469 ### `distclean' 472 ### `distclean'