diff options
| author | Eli Zaretskii | 2011-01-29 14:36:11 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2011-01-29 14:36:11 +0200 |
| commit | f915f0f7c8a35ecc5ca95e99f5bf4286aafa3d05 (patch) | |
| tree | 164a36f43c2ba41f70fb6f8aad8341bfdedab59c /lib/makefile.w32-in | |
| parent | 497a1925ecc0550630ba44f29d2db7378e7c9e4e (diff) | |
| download | emacs-f915f0f7c8a35ecc5ca95e99f5bf4286aafa3d05.tar.gz emacs-f915f0f7c8a35ecc5ca95e99f5bf4286aafa3d05.zip | |
Fix the MS-Windows build broken by 2011-01-17T19:01:01Z!eggert@cs.ucla.edu and emacs-23/2010-05-21T19:51:48Z!acm@muc.de.
lib/makefile.w32-in:
lib/getopt_.h: New files.
src/s/ms-w32.h (HAVE_MKTIME): Remove.
src/makefile.w32-in (LOCAL_FLAGS): Add -I../lib.
(GNULIB): New variable.
(LIBS): Add $(GNULIB).
$(TEMACS): Depend on $(GNULIB).
<top-level>: Fix font-lock disrupted by a lone `"'.
src/makefile.w32-in (LOCAL_FLAGS): Add -I../lib.
(GETOPTOBJS, GETOPTDEPS): Remove targets.
(MOVEMAILOBJS): Replace $(GETOPTOBJS) with ../lib/$(BLD)/libgnu.$(A).
($(BLD)/movemail.exe): Depend on ../lib/getopt.h.
(ECLIENTOBJS, ETAGSOBJ, CTAGSOBJ, EBROWSEOBJ): Replace getopt.o
and getopt1.o with ../lib/$(BLD)/libgnu.$(A).
(clean): Don't remove getopt.h.
(getopt.h, $(BLD)/getopt.$(O), $(BLD)/getopt1.$(O)): Remove targets.
($(BLD)/ctags.$(O), $(BLD)/etags.$(O)): Replace getopt.h with
$(EMACS_ROOT)/lib/getopt.h.
nt/makefile.w32-in (all-other-dirs-nmake, all-other-dirs-gmake)
(bootstrap-nmake, bootstrap-gmake, bootstrap-clean-nmake)
(bootstrap-clean-gmake, clean-other-dirs-nmake)
(clean-other-dirs-gmake, cleanall-other-dirs-nmake)
(cleanall-other-dirs-gmake, distclean-other-dirs-nmake)
(distclean-other-dirs-gmake, maintainer-clean-other-dirs-nmake)
(maintainer-clean-other-dirs-gmake): Recurse into ../lib as well.
nt/configure.bat: Create lib/makefile.
nt/config.nt (HAVE_MKTIME, BROKEN_MKTIME): Remove.
(HAVE_ATTRIBUTE_ALIGNED, HAVE_C99_STRTOLD, HAVE_DECL_GETENV)
(HAVE_DECL_LOCALTIME_R, HAVE_WCHAR_T, PACKAGE, VERSION, inline)
(_GL_UNUSED, _UNUSED_PARAMETER_): Add definitions, for gnulib.
Diffstat (limited to 'lib/makefile.w32-in')
| -rw-r--r-- | lib/makefile.w32-in | 154 |
1 files changed, 154 insertions, 0 deletions
diff --git a/lib/makefile.w32-in b/lib/makefile.w32-in new file mode 100644 index 00000000000..cf74288e2cf --- /dev/null +++ b/lib/makefile.w32-in | |||
| @@ -0,0 +1,154 @@ | |||
| 1 | # -*- Makefile -*- for GNU Emacs on the Microsoft W32 API. | ||
| 2 | # Copyright (C) 2011 Free Software Foundation, Inc. | ||
| 3 | |||
| 4 | # This file is part of GNU Emacs. | ||
| 5 | |||
| 6 | # GNU Emacs is free software: you can redistribute it and/or modify | ||
| 7 | # it under the terms of the GNU General Public License as published by | ||
| 8 | # the Free Software Foundation, either version 3 of the License, or | ||
| 9 | # (at your option) any later version. | ||
| 10 | |||
| 11 | # GNU Emacs is distributed in the hope that it will be useful, | ||
| 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | # GNU General Public License for more details. | ||
| 15 | |||
| 16 | # You should have received a copy of the GNU General Public License | ||
| 17 | # along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | ||
| 18 | |||
| 19 | ALL = gnulib | ||
| 20 | |||
| 21 | .PHONY: $(ALL) | ||
| 22 | |||
| 23 | LOCAL_FLAGS = -DHAVE_CONFIG_H=1 -I. -I../nt/inc -I../src | ||
| 24 | LIBS = | ||
| 25 | |||
| 26 | GNULIBOBJS = $(BLD)/dtoastr.$(O) $(BLD)/getopt.$(O) $(BLD)/getopt1.$(O) | ||
| 27 | |||
| 28 | # | ||
| 29 | # Build the library | ||
| 30 | # | ||
| 31 | $(BLD)/libgnu.$(A): $(GNULIBOBJS) | ||
| 32 | - $(DEL) $@ | ||
| 33 | $(AR) $(AR_OUT)$@ $(ALL_DEPS) | ||
| 34 | |||
| 35 | gnulib: stamp_BLD $(BLD)/libgnu.$(A) | ||
| 36 | |||
| 37 | # | ||
| 38 | # Build everything | ||
| 39 | # | ||
| 40 | all: stamp_BLD $(ALL) | ||
| 41 | |||
| 42 | ### TAGS ### | ||
| 43 | |||
| 44 | TAGS: | ||
| 45 | ../lib-src/$(BLD)/etags.exe *.c *.h | ||
| 46 | |||
| 47 | ### DEPENDENCIES ### | ||
| 48 | |||
| 49 | EMACS_ROOT = .. | ||
| 50 | SRC = . | ||
| 51 | |||
| 52 | $(BLD)/dtoastr.$(O) : \ | ||
| 53 | $(SRC)/dtoastr.c \ | ||
| 54 | $(SRC)/ftoastr.c \ | ||
| 55 | $(SRC)/ftoastr.h \ | ||
| 56 | $(SRC)/intprops.h \ | ||
| 57 | $(EMACS_ROOT)/src/config.h | ||
| 58 | |||
| 59 | $(BLD)/getopt.$(O) : \ | ||
| 60 | $(SRC)/getopt.c \ | ||
| 61 | $(SRC)/getopt.h \ | ||
| 62 | $(SRC)/getopt_int.h \ | ||
| 63 | $(EMACS_ROOT)/src/s/ms-w32.h \ | ||
| 64 | $(EMACS_ROOT)/src/m/intel386.h \ | ||
| 65 | $(EMACS_ROOT)/src/config.h | ||
| 66 | |||
| 67 | $(BLD)/getopt1.$(O) : \ | ||
| 68 | $(SRC)/getopt1.c \ | ||
| 69 | $(SRC)/getopt.h \ | ||
| 70 | $(SRC)/getopt_int.h \ | ||
| 71 | $(EMACS_ROOT)/src/s/ms-w32.h \ | ||
| 72 | $(EMACS_ROOT)/src/m/intel386.h \ | ||
| 73 | $(EMACS_ROOT)/src/config.h | ||
| 74 | |||
| 75 | # The following dependencies are for supporting parallel builds, where | ||
| 76 | # we must make sure $(BLD) exists before any compilation starts. | ||
| 77 | # | ||
| 78 | $(BLD)/dtoastr.$(O) $(BLD)/getopt.$(O) $(BLD)/getopt1.$(O): stamp_BLD | ||
| 79 | |||
| 80 | # | ||
| 81 | # Headers we would preprocess if we could. | ||
| 82 | # | ||
| 83 | getopt.h: getopt_.h | ||
| 84 | $(CP) $(ALL_DEPS) $@ | ||
| 85 | |||
| 86 | # | ||
| 87 | # Maintenance | ||
| 88 | # | ||
| 89 | clean: | ||
| 90 | - $(DEL) $(COMPILER_TEMP_FILES) | ||
| 91 | - $(DEL) getopt.h | ||
| 92 | - $(DEL_TREE) $(OBJDIR) | ||
| 93 | - $(DEL) stamp_BLD | ||
| 94 | |||
| 95 | distclean: cleanall | ||
| 96 | - $(DEL) TAGS | ||
| 97 | - $(DEL) Makefile | ||
| 98 | |||
| 99 | maintainer-clean: distclean | ||
| 100 | - $(DEL) getopt_.h | ||
| 101 | |||
| 102 | cleanall: clean | ||
| 103 | - $(DEL_TREE) obj | ||
| 104 | - $(DEL_TREE) obj-spd | ||
| 105 | - $(DEL_TREE) oo | ||
| 106 | - $(DEL_TREE) oo-spd | ||
| 107 | |||
| 108 | # A dummy target to force other targets to be evaluated. | ||
| 109 | doit: | ||
| 110 | |||
| 111 | getopt_.h: getopt.in.h $(ARG_NONNULL_H) | ||
| 112 | $(MAKE) $(MFLAGS) getopt_.h-$(SHELLTYPE) | ||
| 113 | |||
| 114 | getopt_.h-CMD: doit | ||
| 115 | @echo getopt.in.h or $(ARG_NONNULL_H) is newer than getopt_.h. | ||
| 116 | @echo Run "$(MAKETYPE) getopt_h" in the lib/ subdirectory. | ||
| 117 | @echo You will need GNU Sed to be installed. | ||
| 118 | exit -1 | ||
| 119 | |||
| 120 | getopt_.h-SH: doit | ||
| 121 | @echo getopt.in.h or $(ARG_NONNULL_H) is newer than getopt_.h. | ||
| 122 | @echo Run '"$(MAKETYPE) getopt_h"' in the lib/ subdirectory. | ||
| 123 | @echo You will need GNU Sed to be installed. | ||
| 124 | exit -1 | ||
| 125 | |||
| 126 | # Generating getopt_.h from getopt.in.h. | ||
| 127 | # | ||
| 128 | # To avoid requiring all end users to install Sed, we have below | ||
| 129 | # a maintainer-only target that produces getopt_.h from getopt.in.h. | ||
| 130 | # For easier maintenance, all the strings that replace the @FOO@ | ||
| 131 | # placeholder are defined as Make macros below. | ||
| 132 | |||
| 133 | HAVE_GETOPT_H = HAVE_GETOPT_H | ||
| 134 | INCLUDE_NEXT = include_next | ||
| 135 | PRAGMA_SYSTEM_HEADER = \#pragma GCC system_header | ||
| 136 | PRAGMA_COLUMNS = | ||
| 137 | NEXT_GETOPT_H = <getopt.h> | ||
| 138 | ARG_NONNULL_H = ../arg-nonnull.h | ||
| 139 | |||
| 140 | getopt_h: | ||
| 141 | - $(DEL) getopt_.h-t getopt_.h | ||
| 142 | sed -e "s!@HAVE_GETOPT_H@!$(HAVE_GETOPT_H)!g" \ | ||
| 143 | -e "s!@INCLUDE_NEXT@!$(INCLUDE_NEXT)!g" \ | ||
| 144 | -e "s!@PRAGMA_SYSTEM_HEADER@!$(PRAGMA_SYSTEM_HEADER)!g" \ | ||
| 145 | -e "s!@PRAGMA_COLUMNS@!$(PRAGMA_COLUMNS)!g" \ | ||
| 146 | -e "s!@NEXT_GETOPT_H@!$(NEXT_GETOPT_H)!g" \ | ||
| 147 | -e "/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)" \ | ||
| 148 | -e "/^\# include_next/i # ifndef __GNUC__" \ | ||
| 149 | -e "/^\# include_next/i # include <next_getopt.h>" \ | ||
| 150 | -e "/^\# include_next/i # else" \ | ||
| 151 | -e "/^\# include_next/a # endif" \ | ||
| 152 | < getopt.in.h > getopt_.h-t | ||
| 153 | $(CP) getopt_.h-t getopt_.h | ||
| 154 | - $(DEL) getopt_.h-t | ||