diff options
| author | Eli Zaretskii | 2013-04-01 16:18:20 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2013-04-01 16:18:20 +0300 |
| commit | 095bf25383aab763b09bc4df4593632d51e37ec6 (patch) | |
| tree | 63a16a4ff09d582ed5eda0d277eb985b39fb4bfd | |
| parent | a74b0e1bdf0f2f49bce82dd7e15264c5c548d980 (diff) | |
| download | emacs-095bf25383aab763b09bc4df4593632d51e37ec6.tar.gz emacs-095bf25383aab763b09bc4df4593632d51e37ec6.zip | |
Added nt/Makefile.in and appropriate tweaks to configure.ac.
Added emacsclient.res support to lib-src/.
Fixed temacs and dumping commands in src/Makefile.in.
Miscellaneous fixes all over the place.
Not tried to build yet.
| -rw-r--r-- | Makefile.in | 15 | ||||
| -rw-r--r-- | configure.ac | 52 | ||||
| -rw-r--r-- | lib-src/Makefile.in | 9 | ||||
| -rw-r--r-- | nt/Makefile.in | 212 | ||||
| -rw-r--r-- | src/Makefile.in | 30 |
5 files changed, 294 insertions, 24 deletions
diff --git a/Makefile.in b/Makefile.in index bd77fa6a70d..6fbf4699bb8 100644 --- a/Makefile.in +++ b/Makefile.in | |||
| @@ -93,6 +93,9 @@ version=@version@ | |||
| 93 | ### for, like `mips-dec-ultrix' or `sparc-sun-sunos'. | 93 | ### for, like `mips-dec-ultrix' or `sparc-sun-sunos'. |
| 94 | configuration=@configuration@ | 94 | configuration=@configuration@ |
| 95 | 95 | ||
| 96 | ### The nt/ subdirectory gets built only for MinGW | ||
| 97 | NTDIR=@NTDIR@ | ||
| 98 | |||
| 96 | # ==================== Where To Install Things ==================== | 99 | # ==================== Where To Install Things ==================== |
| 97 | 100 | ||
| 98 | # Location to install Emacs.app under GNUstep / Mac OS X. | 101 | # Location to install Emacs.app under GNUstep / Mac OS X. |
| @@ -271,17 +274,17 @@ EMACS = ${EMACS_NAME}${EXEEXT} | |||
| 271 | EMACSFULL = `echo emacs-${version} | sed '$(TRANSFORM)'`${EXEEXT} | 274 | EMACSFULL = `echo emacs-${version} | sed '$(TRANSFORM)'`${EXEEXT} |
| 272 | 275 | ||
| 273 | # Subdirectories to make recursively. | 276 | # Subdirectories to make recursively. |
| 274 | SUBDIR = lib lib-src src lisp leim | 277 | SUBDIR = lib lib-src src lisp leim $(NTDIR) |
| 275 | 278 | ||
| 276 | # The subdir makefiles created by config.status. | 279 | # The subdir makefiles created by config.status. |
| 277 | SUBDIR_MAKEFILES_IN = @SUBDIR_MAKEFILES_IN@ | 280 | SUBDIR_MAKEFILES_IN = @SUBDIR_MAKEFILES_IN@ |
| 278 | SUBDIR_MAKEFILES = `echo $(SUBDIR_MAKEFILES_IN:.in=) | sed 's|$(srcdir)/||g'` | 281 | SUBDIR_MAKEFILES = `echo $(SUBDIR_MAKEFILES_IN:.in=) | sed 's|$(srcdir)/||g'` |
| 279 | 282 | ||
| 280 | # Subdirectories to install, and where they'll go. | 283 | # Subdirectories to install, and where they'll go. lib-src's and nt's |
| 281 | # lib-src's makefile knows how to install it, so we don't do that here. | 284 | # makefiles know how to install them, so we don't do that here. |
| 282 | # Directories that cannot simply be copied, eg info, | 285 | # Directories that cannot simply be copied, eg info, are treated |
| 283 | # are treated separately. | 286 | # separately. quail appears twice because in out-of-tree builds, it |
| 284 | # quail appears twice because in out-of-tree builds, it exists twice. | 287 | # exists twice. |
| 285 | COPYDIR = ${srcdir}/etc ${srcdir}/lisp ${srcdir}/leim/ja-dic ${srcdir}/leim/quail leim/quail | 288 | COPYDIR = ${srcdir}/etc ${srcdir}/lisp ${srcdir}/leim/ja-dic ${srcdir}/leim/quail leim/quail |
| 286 | COPYDESTS = $(DESTDIR)${etcdir} $(DESTDIR)${lispdir} $(DESTDIR)${leimdir}/ja-dic $(DESTDIR)${leimdir}/quail $(DESTDIR)${leimdir}/quail | 289 | COPYDESTS = $(DESTDIR)${etcdir} $(DESTDIR)${lispdir} $(DESTDIR)${leimdir}/ja-dic $(DESTDIR)${leimdir}/quail $(DESTDIR)${leimdir}/quail |
| 287 | 290 | ||
diff --git a/configure.ac b/configure.ac index 72aa43c29e3..d1fd9fc26d4 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -1544,8 +1544,10 @@ AC_SUBST(NS_OBJC_OBJ) | |||
| 1544 | HAVE_W32=no | 1544 | HAVE_W32=no |
| 1545 | W32_OBJ= | 1545 | W32_OBJ= |
| 1546 | W32_LIBS= | 1546 | W32_LIBS= |
| 1547 | W32_RES= | 1547 | EMACSRES= |
| 1548 | CLIENTRES= | ||
| 1548 | W32_RES_LINK= | 1549 | W32_RES_LINK= |
| 1550 | EMACS_MANIFEST= | ||
| 1549 | if test "${with_w32}" != no; then | 1551 | if test "${with_w32}" != no; then |
| 1550 | if test "${opsys}" != "cygwin"; then | 1552 | if test "${opsys}" != "cygwin"; then |
| 1551 | if test "${opsys}" != "mingw32"; then | 1553 | if test "${opsys}" != "mingw32"; then |
| @@ -1573,29 +1575,39 @@ if test "${opsys}" = "mingw32"; then | |||
| 1573 | fi | 1575 | fi |
| 1574 | fi | 1576 | fi |
| 1575 | 1577 | ||
| 1578 | FIRSTFILE_OBJ= | ||
| 1576 | if test "${HAVE_W32}" = "yes"; then | 1579 | if test "${HAVE_W32}" = "yes"; then |
| 1577 | AC_DEFINE(HAVE_NTGUI, 1, [Define to use native MS Windows GUI.]) | 1580 | AC_DEFINE(HAVE_NTGUI, 1, [Define to use native MS Windows GUI.]) |
| 1578 | AC_CHECK_TOOL(WINDRES, [windres], | 1581 | AC_CHECK_TOOL(WINDRES, [windres], |
| 1579 | [AC_MSG_ERROR([No resource compiler found.])]) | 1582 | [AC_MSG_ERROR([No resource compiler found.])]) |
| 1580 | W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o" | 1583 | W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o" |
| 1581 | W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o" | 1584 | W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o" |
| 1585 | EMACSRES="emacs.res" | ||
| 1586 | case "$canonical" in | ||
| 1587 | x86_64-*-*) EMACS_MANIFEST="emacs-x64.manifest" ;; | ||
| 1588 | *) EMACS_MANIFEST="emacs-x86.manifest" ;; | ||
| 1589 | esac | ||
| 1582 | if test "${opsys}" = "cygwin"; then | 1590 | if test "${opsys}" = "cygwin"; then |
| 1583 | W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32" | 1591 | W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32" |
| 1584 | W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool" | 1592 | W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool" |
| 1585 | W32_RES="emacs.res" | ||
| 1586 | # Tell the linker that emacs.res is an object (which we compile from | 1593 | # Tell the linker that emacs.res is an object (which we compile from |
| 1587 | # the rc file), not a linker script. | 1594 | # the rc file), not a linker script. |
| 1588 | W32_RES_LINK="-Wl,-bpe-i386 -Wl,emacs.res" | 1595 | W32_RES_LINK="-Wl,-bpe-i386 -Wl,emacs.res" |
| 1589 | else | 1596 | else |
| 1590 | W32_OBJ="$W32_OBJ w32.o w32console.o w32heap.o w32inevt.o w32proc.o" | 1597 | W32_OBJ="$W32_OBJ w32.o w32console.o w32heap.o w32inevt.o w32proc.o" |
| 1591 | W32_LIBS="$W32_LIBS -lwinmm -lgdi32 -lcomdlg32" | 1598 | W32_LIBS="$W32_LIBS -lwinmm -lgdi32 -lcomdlg32" |
| 1592 | W32_LIBS="$W32_LIBS -lmpr -lwinspool -lole32 -lusp10" | 1599 | W32_LIBS="$W32_LIBS -lmpr -lwinspool -lole32 -lcomctl32 -lusp10" |
| 1600 | CLIENTRES="emacsclient.res" | ||
| 1601 | FIRSTFILE_OBJ=firstfile.o | ||
| 1593 | fi | 1602 | fi |
| 1594 | fi | 1603 | fi |
| 1595 | AC_SUBST(W32_OBJ) | 1604 | AC_SUBST(W32_OBJ) |
| 1596 | AC_SUBST(W32_LIBS) | 1605 | AC_SUBST(W32_LIBS) |
| 1597 | AC_SUBST(W32_RES) | 1606 | AC_SUBST(EMACSRES) |
| 1607 | AC_SUBST(EMACS_MANIFEST) | ||
| 1608 | AC_SUBST(CLIENTRES) | ||
| 1598 | AC_SUBST(W32_RES_LINK) | 1609 | AC_SUBST(W32_RES_LINK) |
| 1610 | AC_SUBST(FIRSTFILE_OBJ) | ||
| 1599 | 1611 | ||
| 1600 | if test "${HAVE_W32}" = "yes"; then | 1612 | if test "${HAVE_W32}" = "yes"; then |
| 1601 | window_system=w32 | 1613 | window_system=w32 |
| @@ -4016,6 +4028,9 @@ case $opsys in | |||
| 4016 | mingw32) | 4028 | mingw32) |
| 4017 | AC_DEFINE(DOS_NT, []) | 4029 | AC_DEFINE(DOS_NT, []) |
| 4018 | AC_DEFINE(WINDOWSNT, 1, [Define if compiling for native MS Windows.]) | 4030 | AC_DEFINE(WINDOWSNT, 1, [Define if compiling for native MS Windows.]) |
| 4031 | if test "x$ac_enable_checking" != "x" ; then | ||
| 4032 | AC_DEFINE(EMACSDEBUG, 1, [Define to 1 to enable w32 debug facilities.]) | ||
| 4033 | fi | ||
| 4019 | ;; | 4034 | ;; |
| 4020 | 4035 | ||
| 4021 | sol2*) | 4036 | sol2*) |
| @@ -4362,7 +4377,7 @@ CFLAGS=$SAVE_CFLAGS | |||
| 4362 | LIBS=$SAVE_LIBS | 4377 | LIBS=$SAVE_LIBS |
| 4363 | 4378 | ||
| 4364 | if test "${opsys}" = "mingw32"; then | 4379 | if test "${opsys}" = "mingw32"; then |
| 4365 | CPPFLAGS="-DUSE_CRT_DLL=1 -I $srcdir/nt/inc" | 4380 | CPPFLAGS="$CPPFLAGS -DUSE_CRT_DLL=1 -I $srcdir/nt/inc" |
| 4366 | # Remove unneeded switches from the value of CC that goes to Makefiles | 4381 | # Remove unneeded switches from the value of CC that goes to Makefiles |
| 4367 | CC=`echo $CC | sed -e "s,$GCC_TEST_OPTIONS,,"` | 4382 | CC=`echo $CC | sed -e "s,$GCC_TEST_OPTIONS,,"` |
| 4368 | fi | 4383 | fi |
| @@ -4401,7 +4416,10 @@ case "$opsys" in | |||
| 4401 | gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;; | 4416 | gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_RPATH)" ;; |
| 4402 | 4417 | ||
| 4403 | mingw32) | 4418 | mingw32) |
| 4404 | LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-subsystem,console -Wl,-entry,__start -Wl,-Map,./temacs.map" | 4419 | case "$canonical" in |
| 4420 | x86_64-*-*) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-subsystem,console -Wl,-entry,_start -Wl,-Map,./temacs.map" ;; | ||
| 4421 | *) LD_SWITCH_SYSTEM_TEMACS="-Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 -Wl,-subsystem,console -Wl,-entry,__start -Wl,-Map,./temacs.map" ;; | ||
| 4422 | esac | ||
| 4405 | ;; | 4423 | ;; |
| 4406 | 4424 | ||
| 4407 | *) LD_SWITCH_SYSTEM_TEMACS= ;; | 4425 | *) LD_SWITCH_SYSTEM_TEMACS= ;; |
| @@ -4409,6 +4427,24 @@ esac | |||
| 4409 | 4427 | ||
| 4410 | AC_SUBST(LD_SWITCH_SYSTEM_TEMACS) | 4428 | AC_SUBST(LD_SWITCH_SYSTEM_TEMACS) |
| 4411 | 4429 | ||
| 4430 | ## MinGW-specific post-link processing of temacs. | ||
| 4431 | TEMACS_POST_LINK=":" | ||
| 4432 | ADDSECTION= | ||
| 4433 | EMACS_HEAPSIZE= | ||
| 4434 | if test "${opsys}" = "mingw32"; then | ||
| 4435 | TEMACS_POST_LINK="\$(MINGW_TEMACS_POST_LINK)" | ||
| 4436 | ADDSECTION="../nt/addsection\$(EXEEXT)" | ||
| 4437 | ## Preload heap size of temacs.exe in MB. | ||
| 4438 | case "$canonical" in | ||
| 4439 | x86_64-*-*) EMACS_HEAPSIZE=42 ;; | ||
| 4440 | *) EMACS_HEAPSIZE=27 ;; | ||
| 4441 | esac | ||
| 4442 | fi | ||
| 4443 | |||
| 4444 | AC_SUBST(ADDSECTION) | ||
| 4445 | AC_SUBST(TEMACS_POST_LINK) | ||
| 4446 | AC_SUBST(EMACS_HEAPSIZE) | ||
| 4447 | |||
| 4412 | ## Common for all window systems | 4448 | ## Common for all window systems |
| 4413 | if test "$window_system" != "none"; then | 4449 | if test "$window_system" != "none"; then |
| 4414 | AC_DEFINE(HAVE_WINDOW_SYSTEM, 1, [Define if you have a window system.]) | 4450 | AC_DEFINE(HAVE_WINDOW_SYSTEM, 1, [Define if you have a window system.]) |
| @@ -4567,12 +4603,12 @@ dnl This will work, but you get a config.status that is not quite right | |||
| 4567 | dnl (see http://lists.gnu.org/archive/html/bug-autoconf/2008-08/msg00028.html). | 4603 | dnl (see http://lists.gnu.org/archive/html/bug-autoconf/2008-08/msg00028.html). |
| 4568 | dnl That doesn't have any obvious consequences for Emacs, but on the whole | 4604 | dnl That doesn't have any obvious consequences for Emacs, but on the whole |
| 4569 | dnl it seems better to just live with the duplication. | 4605 | dnl it seems better to just live with the duplication. |
| 4570 | 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" | 4606 | 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 nt/Makefile" |
| 4571 | 4607 | ||
| 4572 | AC_CONFIG_FILES([Makefile lib/Makefile lib-src/Makefile oldXMenu/Makefile \ | 4608 | AC_CONFIG_FILES([Makefile lib/Makefile lib-src/Makefile oldXMenu/Makefile \ |
| 4573 | doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile \ | 4609 | doc/emacs/Makefile doc/misc/Makefile doc/lispintro/Makefile \ |
| 4574 | doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile \ | 4610 | doc/lispref/Makefile src/Makefile lwlib/Makefile lisp/Makefile \ |
| 4575 | leim/Makefile nextstep/Makefile]) | 4611 | leim/Makefile nextstep/Makefile nt/Makefile]) |
| 4576 | 4612 | ||
| 4577 | dnl test/ is not present in release tarfiles. | 4613 | dnl test/ is not present in release tarfiles. |
| 4578 | opt_makefile=test/automated/Makefile | 4614 | opt_makefile=test/automated/Makefile |
diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in index 5e40c2555cf..c7bfc207608 100644 --- a/lib-src/Makefile.in +++ b/lib-src/Makefile.in | |||
| @@ -172,6 +172,8 @@ LIBS_MOVE = $(LIBS_MAIL) $(KRB4LIB) $(DESLIB) $(KRB5LIB) $(CRYPTOLIB) \ | |||
| 172 | 172 | ||
| 173 | ## Extra object files for linking emacsclient | 173 | ## Extra object files for linking emacsclient |
| 174 | NTLIB = @NTLIB@ | 174 | NTLIB = @NTLIB@ |
| 175 | CLIENTRES = @CLIENTRES@ | ||
| 176 | WINDRES = @WINDRES@ | ||
| 175 | 177 | ||
| 176 | ## Some systems define this to request special libraries. | 178 | ## Some systems define this to request special libraries. |
| 177 | LIBS_SYSTEM = @LIBS_SYSTEM@ | 179 | LIBS_SYSTEM = @LIBS_SYSTEM@ |
| @@ -339,9 +341,9 @@ movemail${EXEEXT}: ${srcdir}/movemail.c pop.o $(NTLIB) $(config_h) | |||
| 339 | pop.o: ${srcdir}/pop.c ${srcdir}/../lib/min-max.h $(config_h) | 341 | pop.o: ${srcdir}/pop.c ${srcdir}/../lib/min-max.h $(config_h) |
| 340 | $(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/pop.c | 342 | $(CC) -c ${CPP_CFLAGS} ${MOVE_FLAGS} ${srcdir}/pop.c |
| 341 | 343 | ||
| 342 | emacsclient${EXEEXT}: ${srcdir}/emacsclient.c $(NTLIB) $(config_h) | 344 | emacsclient${EXEEXT}: ${srcdir}/emacsclient.c $(NTLIB) $(CLIENTRES) $(config_h) |
| 343 | $(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c \ | 345 | $(CC) ${ALL_CFLAGS} ${srcdir}/emacsclient.c \ |
| 344 | -DVERSION="\"${version}\"" $(LIB_WSOCK32) \ | 346 | -DVERSION="\"${version}\"" $(CLIENTRES) $(LIB_WSOCK32) \ |
| 345 | $(LOADLIBES) $(LIB_FDATASYNC) -o emacsclient${EXEEXT} | 347 | $(LOADLIBES) $(LIB_FDATASYNC) -o emacsclient${EXEEXT} |
| 346 | 348 | ||
| 347 | ntlib.o: ${srcdir}/ntlib.c ${srcdir}/ntlib.h | 349 | ntlib.o: ${srcdir}/ntlib.c ${srcdir}/ntlib.h |
| @@ -355,4 +357,7 @@ update-game-score${EXEEXT}: ${srcdir}/update-game-score.c $(NTLIB) $(config_h) | |||
| 355 | ${srcdir}/update-game-score.c $(NTLIB) $(LOADLIBES) \ | 357 | ${srcdir}/update-game-score.c $(NTLIB) $(LOADLIBES) \ |
| 356 | -o update-game-score${EXEEXT} | 358 | -o update-game-score${EXEEXT} |
| 357 | 359 | ||
| 360 | emacsclient.res: ${srcdir}/nt/emacsclient.rc | ||
| 361 | $(WINDRES) -O coff --include-dir=${srcdir}/nt -o emacscient.res | ||
| 362 | |||
| 358 | ## Makefile ends here. | 363 | ## Makefile ends here. |
diff --git a/nt/Makefile.in b/nt/Makefile.in new file mode 100644 index 00000000000..3b777047c27 --- /dev/null +++ b/nt/Makefile.in | |||
| @@ -0,0 +1,212 @@ | |||
| 1 | # nt/Makefile for GNU Emacs. | ||
| 2 | |||
| 3 | # Copyright (C) 2013 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | # This file is part of GNU Emacs. | ||
| 6 | |||
| 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. | ||
| 11 | |||
| 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. | ||
| 16 | |||
| 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/>. | ||
| 19 | |||
| 20 | # Avoid trouble on systems where the `SHELL' variable might be | ||
| 21 | # inherited from the environment. | ||
| 22 | SHELL = /bin/sh | ||
| 23 | |||
| 24 | # ==================== Things `configure' will edit ==================== | ||
| 25 | |||
| 26 | CC=@CC@ | ||
| 27 | CFLAGS=@CFLAGS@ | ||
| 28 | version=@version@ | ||
| 29 | ## Used in $archlibdir. | ||
| 30 | configuration=@configuration@ | ||
| 31 | EXEEXT=@EXEEXT@ | ||
| 32 | C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@ | ||
| 33 | C_SWITCH_MACHINE=@C_SWITCH_MACHINE@ | ||
| 34 | PROFILING_CFLAGS = @PROFILING_CFLAGS@ | ||
| 35 | WARN_CFLAGS = @WARN_CFLAGS@ | ||
| 36 | WERROR_CFLAGS = @WERROR_CFLAGS@ | ||
| 37 | |||
| 38 | # Program name transformation. | ||
| 39 | TRANSFORM = @program_transform_name@ | ||
| 40 | |||
| 41 | # ==================== Where To Install Things ==================== | ||
| 42 | |||
| 43 | # The default location for installation. Everything is placed in | ||
| 44 | # subdirectories of this directory. The default values for many of | ||
| 45 | # the variables below are expressed in terms of this one, so you may | ||
| 46 | # not need to change them. This is set with the --prefix option to | ||
| 47 | # `../configure'. | ||
| 48 | prefix=@prefix@ | ||
| 49 | |||
| 50 | # Like `prefix', but used for architecture-specific files. This is | ||
| 51 | # set with the --exec-prefix option to `../configure'. | ||
| 52 | exec_prefix=@exec_prefix@ | ||
| 53 | |||
| 54 | # Where to install Emacs and other binaries that people will want to | ||
| 55 | # run directly (like etags). This is set with the --bindir option | ||
| 56 | # to `../configure'. | ||
| 57 | bindir=@bindir@ | ||
| 58 | |||
| 59 | # Where to install and expect executable files to be run by Emacs | ||
| 60 | # rather than directly by users, and other architecture-dependent | ||
| 61 | # data. ${archlibdir} is usually below this. This is set with the | ||
| 62 | # --libexecdir option to `../configure'. | ||
| 63 | libexecdir=@libexecdir@ | ||
| 64 | |||
| 65 | # Directory for local state files for all programs. | ||
| 66 | localstatedir=@localstatedir@ | ||
| 67 | |||
| 68 | # Where to find the source code. This is set by the configure | ||
| 69 | # script's `--srcdir' option. However, the value of ${srcdir} in | ||
| 70 | # this makefile is not identical to what was specified with --srcdir, | ||
| 71 | # since the variable here has `/lib-src' added at the end. | ||
| 72 | |||
| 73 | # We use $(srcdir) explicitly in dependencies so as not to depend on VPATH. | ||
| 74 | srcdir=@srcdir@ | ||
| 75 | VPATH=@srcdir@ | ||
| 76 | |||
| 77 | # The top-level source directory, also set by configure. | ||
| 78 | top_srcdir=@top_srcdir@ | ||
| 79 | |||
| 80 | # ==================== Emacs-specific directories ==================== | ||
| 81 | |||
| 82 | # These variables hold the values Emacs will actually use. They are | ||
| 83 | # based on the values of the standard Make variables above. | ||
| 84 | |||
| 85 | # Where to put executables to be run by Emacs rather than the user. | ||
| 86 | # This path usually includes the Emacs version and configuration name, | ||
| 87 | # so that multiple configurations for multiple versions of Emacs may | ||
| 88 | # be installed at once. This can be set with the --archlibdir option | ||
| 89 | # to `../configure'. | ||
| 90 | archlibdir=@archlibdir@ | ||
| 91 | |||
| 92 | # ==================== Utility Programs for the Build ================= | ||
| 93 | |||
| 94 | # ../configure figures out the correct values for these. | ||
| 95 | INSTALL = @INSTALL@ | ||
| 96 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
| 97 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
| 98 | # By default, we uphold the dignity of our programs. | ||
| 99 | INSTALL_STRIP = | ||
| 100 | MKDIR_P = @MKDIR_P@ | ||
| 101 | |||
| 102 | # ========================== Lists of Files =========================== | ||
| 103 | |||
| 104 | # Things that a user might actually run, which should be installed in bindir. | ||
| 105 | INSTALLABLES = runemacs${EXEEXT} addpm${EXEEXT} | ||
| 106 | |||
| 107 | # Things that Emacs runs internally, which should not be installed in bindir. | ||
| 108 | UTILITIES = cmdproxy${EXEEXT} ddeclient${EXEEXT} | ||
| 109 | |||
| 110 | # Things that Emacs runs during the build process. | ||
| 111 | DONT_INSTALL = addsection${EXEEXT} | ||
| 112 | |||
| 113 | # All files that are created by the linker, i.e., whose names end in ${EXEEXT}. | ||
| 114 | EXE_FILES = ${INSTALLABLES} ${UTILITIES} ${DONT_INSTALL} | ||
| 115 | |||
| 116 | # =========================== Configuration =========================== | ||
| 117 | |||
| 118 | # MS-Windows resource files and resource compiler | ||
| 119 | EMACSRES = @EMACSRES@ | ||
| 120 | EMACS_MANIFEST = @EMACS_MANIFEST@ | ||
| 121 | WINDRES = @WINDRES@ | ||
| 122 | |||
| 123 | ## Extra libraries to use when linking addpm. | ||
| 124 | LIBS_ADDPM = -lole32 -luuid | ||
| 125 | |||
| 126 | ## Compilation and linking flags | ||
| 127 | BASE_CFLAGS = $(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \ | ||
| 128 | $(WARN_CFLAGS) $(WERROR_CFLAGS) \ | ||
| 129 | -I. -I${srcdir} | ||
| 130 | |||
| 131 | ALL_CFLAGS = ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${LDFLAGS} ${CPPFLAGS} ${CFLAGS} | ||
| 132 | LINK_CFLAGS = ${BASE_CFLAGS} ${LDFLAGS} ${CFLAGS} | ||
| 133 | CPP_CFLAGS = ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${CPPFLAGS} ${CFLAGS} | ||
| 134 | |||
| 135 | all: ${EXE_FILES} | ||
| 136 | |||
| 137 | .PHONY: all | ||
| 138 | |||
| 139 | ## Install the internal utilities. Until they are installed, we can | ||
| 140 | ## just run them directly from nt/. | ||
| 141 | $(DESTDIR)${archlibdir}: all | ||
| 142 | @echo | ||
| 143 | @echo "Installing utilities run internally by Emacs." | ||
| 144 | umask 022; ${MKDIR_P} $(DESTDIR)${archlibdir} | ||
| 145 | if [ `cd $(DESTDIR)${archlibdir} && /bin/pwd` != `/bin/pwd` ]; then \ | ||
| 146 | for file in ${UTILITIES}; do \ | ||
| 147 | $(INSTALL_PROGRAM) $(INSTALL_STRIP) $$file $(DESTDIR)${archlibdir}/$$file ; \ | ||
| 148 | done ; \ | ||
| 149 | fi | ||
| 150 | |||
| 151 | .PHONY: install uninstall mostlyclean clean distclean maintainer-clean | ||
| 152 | .PHONY: extraclean check tags | ||
| 153 | |||
| 154 | install: $(DESTDIR)${archlibdir} | ||
| 155 | @echo | ||
| 156 | @echo "Installing utilities for users to run." | ||
| 157 | umask 022; ${MKDIR_P} $(DESTDIR)${bindir} | ||
| 158 | for file in ${INSTALLABLES} ; do \ | ||
| 159 | $(INSTALL_PROGRAM) $(INSTALL_STRIP) $${file} $(DESTDIR)${bindir}/`echo $${file} | sed -e 's/${EXEEXT}$$//' -e '$(TRANSFORM)'`${EXEEXT} ; \ | ||
| 160 | done | ||
| 161 | |||
| 162 | uninstall: | ||
| 163 | for file in ${INSTALLABLES}; do \ | ||
| 164 | rm -f $(DESTDIR)${bindir}/`echo $${file} | sed -e 's/${EXEEXT}$$//' -e '$(TRANSFORM)'`${EXEEXT} ; \ | ||
| 165 | done | ||
| 166 | if [ -d $(DESTDIR)${archlibdir} ]; then \ | ||
| 167 | (cd $(DESTDIR)${archlibdir} && rm -f ${UTILITIES}) \ | ||
| 168 | fi | ||
| 169 | |||
| 170 | mostlyclean: | ||
| 171 | -rm -f core *.o | ||
| 172 | |||
| 173 | clean: mostlyclean | ||
| 174 | -rm -f ${EXE_FILES} | ||
| 175 | |||
| 176 | distclean: clean | ||
| 177 | -rm -f TAGS | ||
| 178 | -rm -f Makefile | ||
| 179 | |||
| 180 | maintainer-clean: distclean | ||
| 181 | true | ||
| 182 | |||
| 183 | extraclean: maintainer-clean | ||
| 184 | -rm -f *~ \#* | ||
| 185 | |||
| 186 | ## Test the contents of the directory. | ||
| 187 | check: | ||
| 188 | @echo "We don't have any tests for the nt/ directory yet." | ||
| 189 | |||
| 190 | tags: TAGS | ||
| 191 | TAGS: ${EXE_FILES:${EXEEXT}=.c} | ||
| 192 | ../lib-src/etags *.[ch] | ||
| 193 | |||
| 194 | ## Build the programs | ||
| 195 | addsection${EXEEXT}: ${srcdir}/addsection.c | ||
| 196 | $(CC) ${ALL_CFLAGS} ${srcdir}/addsection.c -o addsection${EXEEXT} | ||
| 197 | |||
| 198 | addpm${EXEEXT}: ${srcdir}/addpm.c | ||
| 199 | $(CC) ${ALL_CFLAGS} ${srcdir}/addpm.c $(LIBS_ADDPM) -o addpm${EXEEXT} | ||
| 200 | |||
| 201 | ddeclient${EXEEXT}: ${srcdir}/ddeclient.c | ||
| 202 | $(CC) ${ALL_CFLAGS} ${srcdir}/ddeclient.c -o ddeclient${EXEEXT} | ||
| 203 | |||
| 204 | cmdproxy{EXEEXT}: ${srcdir}/cmdproxy.c | ||
| 205 | $(CC) ${ALL_CFLAGS} ${srcdir}/cmdproxy.c -o cmdproxy${EXEEXT} | ||
| 206 | |||
| 207 | runemacs{EXEEXT}: ${srcdir}/runemacs.c $(EMACSRES) | ||
| 208 | $(CC) ${ALL_CFLAGS} ${srcdir}/runemacs.c $(EMACSRES) \ | ||
| 209 | -o runemacs${EXEEXT} | ||
| 210 | |||
| 211 | emacs.res: ${srcdir}/emacs.rc ${srcdir}/emacs.ico ${srcdir}/$(EMACS_MANIFEST) | ||
| 212 | ${WINDRES} -O coff -o emacs.res emacs.rc | ||
diff --git a/src/Makefile.in b/src/Makefile.in index 31de9714c65..cac8ddec57c 100644 --- a/src/Makefile.in +++ b/src/Makefile.in | |||
| @@ -260,8 +260,10 @@ W32_OBJ=@W32_OBJ@ | |||
| 260 | W32_LIBS=@W32_LIBS@ | 260 | W32_LIBS=@W32_LIBS@ |
| 261 | 261 | ||
| 262 | ## emacs.res if HAVE_W32 | 262 | ## emacs.res if HAVE_W32 |
| 263 | W32_RES=@W32_RES@ | 263 | EMACSRES = @EMACSRES@ |
| 264 | ## If HAVE_W32, compiler arguments for including | 264 | ## emacs-*.manifest if HAVE_W32 |
| 265 | EMACS_MANIFEST = @EMACS_MANIFEST@ | ||
| 266 | ## If HAVE_W32 and CYGWIN, compiler arguments for including | ||
| 265 | ## the resource file in the binary. | 267 | ## the resource file in the binary. |
| 266 | ## XXX -Wl,-b -Wl,pe-i386 -Wl,emacs.res | 268 | ## XXX -Wl,-b -Wl,pe-i386 -Wl,emacs.res |
| 267 | W32_RES_LINK=@W32_RES_LINK@ | 269 | W32_RES_LINK=@W32_RES_LINK@ |
| @@ -292,6 +294,14 @@ GETLOADAVG_LIBS = @GETLOADAVG_LIBS@ | |||
| 292 | 294 | ||
| 293 | RUN_TEMACS = `/bin/pwd`/temacs | 295 | RUN_TEMACS = `/bin/pwd`/temacs |
| 294 | 296 | ||
| 297 | ## Invoke ../nt/addsection for MinGW, ":" elsewhere. | ||
| 298 | TEMACS_POST_LINK = @TEMACS_POST_LINK@ | ||
| 299 | ADDSECTION = @ADDSECTION@ | ||
| 300 | EMACS_HEAPSIZE = @EMACS_HEAPSIZE@ | ||
| 301 | MINGW_TEMACS_POST_LINK = \ | ||
| 302 | mv temacs$(EXEEXT) temacs.tmp; \ | ||
| 303 | ../nt/addsection temacs.tmp temacs$(EXEEXT) EMHEAP $(EMACS_HEAPSIZE) | ||
| 304 | |||
| 295 | UNEXEC_OBJ = @UNEXEC_OBJ@ | 305 | UNEXEC_OBJ = @UNEXEC_OBJ@ |
| 296 | 306 | ||
| 297 | CANNOT_DUMP=@CANNOT_DUMP@ | 307 | CANNOT_DUMP=@CANNOT_DUMP@ |
| @@ -372,9 +382,9 @@ VMLIMIT_OBJ=@VMLIMIT_OBJ@ | |||
| 372 | ## ralloc.o if !SYSTEM_MALLOC && REL_ALLOC, else empty. | 382 | ## ralloc.o if !SYSTEM_MALLOC && REL_ALLOC, else empty. |
| 373 | RALLOC_OBJ=@RALLOC_OBJ@ | 383 | RALLOC_OBJ=@RALLOC_OBJ@ |
| 374 | 384 | ||
| 375 | ## Empty on Cygwin, lastfile.o elsewhere. | 385 | ## Empty on Cygwin and MinGW, lastfile.o elsewhere. |
| 376 | PRE_ALLOC_OBJ=@PRE_ALLOC_OBJ@ | 386 | PRE_ALLOC_OBJ=@PRE_ALLOC_OBJ@ |
| 377 | ## lastfile.o on Cygwin, empty elsewhere. | 387 | ## lastfile.o on Cygwin and MinGW, empty elsewhere. |
| 378 | POST_ALLOC_OBJ=@POST_ALLOC_OBJ@ | 388 | POST_ALLOC_OBJ=@POST_ALLOC_OBJ@ |
| 379 | 389 | ||
| 380 | ## List of object files that make-docfile should not be told about. | 390 | ## List of object files that make-docfile should not be told about. |
| @@ -382,7 +392,9 @@ otherobj= $(TERMCAP_OBJ) $(PRE_ALLOC_OBJ) $(GMALLOC_OBJ) $(RALLOC_OBJ) \ | |||
| 382 | $(POST_ALLOC_OBJ) $(WIDGET_OBJ) $(LIBOBJS) | 392 | $(POST_ALLOC_OBJ) $(WIDGET_OBJ) $(LIBOBJS) |
| 383 | 393 | ||
| 384 | ## All object files linked into temacs. $(VMLIMIT_OBJ) should be first. | 394 | ## All object files linked into temacs. $(VMLIMIT_OBJ) should be first. |
| 385 | ALLOBJS = $(VMLIMIT_OBJ) $(obj) $(otherobj) | 395 | ## (On MinGW, firstfile.o should be before vm-limit.o.) |
| 396 | FIRSTFILE_OBJ=@FIRSTFILE_OBJ@ | ||
| 397 | ALLOBJS = $(FIRSTFILE_OBJ) $(VMLIMIT_OBJ) $(obj) $(otherobj) | ||
| 386 | 398 | ||
| 387 | ## Configure inserts the file lisp.mk at this point, defining $lisp. | 399 | ## Configure inserts the file lisp.mk at this point, defining $lisp. |
| 388 | @lisp_frag@ | 400 | @lisp_frag@ |
| @@ -411,7 +423,8 @@ $(leimdir)/leim-list.el: bootstrap-emacs$(EXEEXT) | |||
| 411 | ## Strictly speaking, emacs does not depend directly on all of $lisp, | 423 | ## Strictly speaking, emacs does not depend directly on all of $lisp, |
| 412 | ## since not all pieces are used on all platforms. But DOC depends | 424 | ## since not all pieces are used on all platforms. But DOC depends |
| 413 | ## on all of $lisp, and emacs depends on DOC, so it is ok to use $lisp here. | 425 | ## on all of $lisp, and emacs depends on DOC, so it is ok to use $lisp here. |
| 414 | emacs$(EXEEXT): temacs$(EXEEXT) $(etc)/DOC $(lisp) $(leimdir)/leim-list.el | 426 | emacs$(EXEEXT): temacs$(EXEEXT) $(ADDSECTION) \ |
| 427 | $(etc)/DOC $(lisp) $(leimdir)/leim-list.el | ||
| 415 | if test "$(CANNOT_DUMP)" = "yes"; then \ | 428 | if test "$(CANNOT_DUMP)" = "yes"; then \ |
| 416 | rm -f emacs$(EXEEXT); \ | 429 | rm -f emacs$(EXEEXT); \ |
| 417 | ln temacs$(EXEEXT) emacs$(EXEEXT); \ | 430 | ln temacs$(EXEEXT) emacs$(EXEEXT); \ |
| @@ -463,10 +476,11 @@ $(lib)/libgnu.a: $(config_h) | |||
| 463 | cd $(lib) && $(MAKE) libgnu.a | 476 | cd $(lib) && $(MAKE) libgnu.a |
| 464 | 477 | ||
| 465 | temacs$(EXEEXT): stamp-oldxmenu $(ALLOBJS) \ | 478 | temacs$(EXEEXT): stamp-oldxmenu $(ALLOBJS) \ |
| 466 | $(lib)/libgnu.a $(W32_RES) | 479 | $(lib)/libgnu.a $(EMACSRES) |
| 467 | $(CC) $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(LDFLAGS) \ | 480 | $(CC) $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(LDFLAGS) \ |
| 468 | -o temacs $(ALLOBJS) $(lib)/libgnu.a $(LIBES) \ | 481 | -o temacs $(ALLOBJS) $(lib)/libgnu.a $(LIBES) \ |
| 469 | $(W32_RES_LINK) | 482 | $(W32_RES_LINK) |
| 483 | $(TEMACS_POST_LINK) | ||
| 470 | test "$(CANNOT_DUMP)" = "yes" || \ | 484 | test "$(CANNOT_DUMP)" = "yes" || \ |
| 471 | test "X$(PAXCTL)" = X || $(PAXCTL) -r temacs$(EXEEXT) | 485 | test "X$(PAXCTL)" = X || $(PAXCTL) -r temacs$(EXEEXT) |
| 472 | 486 | ||
| @@ -509,7 +523,7 @@ doc.o: buildobj.h | |||
| 509 | 523 | ||
| 510 | emacs.res: $(ntsource)/emacs.rc \ | 524 | emacs.res: $(ntsource)/emacs.rc \ |
| 511 | $(ntsource)/icons/emacs.ico \ | 525 | $(ntsource)/icons/emacs.ico \ |
| 512 | $(ntsource)/emacs-x86.manifest | 526 | $(ntsource)/$(EMACS_MANIFEST) |
| 513 | $(WINDRES) -O COFF -o $@ $(ntsource)/emacs.rc | 527 | $(WINDRES) -O COFF -o $@ $(ntsource)/emacs.rc |
| 514 | 528 | ||
| 515 | ns-app: emacs$(EXEEXT) | 529 | ns-app: emacs$(EXEEXT) |