1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-25 07:28:20 +00:00
emacs/nt/Makefile.in
Paul Eggert 65faa7bcb5 Switch from Automake to GNU Make
Emacs assumes GNU Make, and GNU Make has much of the functionality of
Automake built-in.  The Emacs build process uses Automake primarily
because Emacs uses some Gnulib code and Gnulib formerly required
Automake.  Now that Gnulib no longer requires Automake, Emacs can
stop using Automake and this should simplify Emacs maintenance
in the future (Bug#26100).  Although this patch may look long, most of
it is generated automatically: the changes to build-aux/config.guess,
build-aux/config.sub, build-aux/install-sh, and lib/gnulib.mk.in are
all done by admin/merge-gnulib.
* .gitignore: Remove build-aux/ar-lib, build-aux/compile,
build-aux/config.guess, build-aux/config.sub, build-aux/depcomp,
build-aux/install-sh, build-aux/missing, and lib/Makefile.in,
as they are no longer built by autogen.sh.
Add lib/gnulib.mk, as it is now built by 'configure'.
Remove nt/gnulib.mk, as it is no longer built by 'make'.
* INSTALL.REPO, README, admin/make-tarball.txt:
Remove mention of Automake.
* Makefile.in (AUTOCONF, AUTOMAKE, AUTOHEADER, ACLOCAL, lib)
(AUTOCONF_INPUTS, ACLOCAL_PATH, ACLOCAL_INPUTS)
($(srcdir)/aclocal.m4, AUTOMAKE_INPUTS)
($(srcdir)/lib/Makefile.in, $(srcdir)/nt/gnulib.mk, am--refresh):
Remove.
($(MAKEFILE_NAME)): Depend on lib/gnulib.mk.in.
($(srcdir)/configure, $(srcdir)/src/stamp-h.in)
($(srcdir)/src/config.in):
Use autogen.sh instead of doing it by hand.
* admin/merge-gnulib (AVOIDED_MODULES, avoided_flags)):
New vars, to simplify processing of avoided modules.
(GNULIB_TOOL_FLAGS): Move --avoid flags into AVOIDED_MODULES.
Add --gnu-make, and change makefile name to gnulib.mk.in.
Copy config.guess, config.sub, and install-sh too, since
Automake no longer does that for us.
* admin/notes/copyright:
* admin/update_autogen (genfiles):
Update list of files.
Remove hack for nt/gnulib.mk, a file that is no longer needed.
* autogen.sh (progs): Remove Automake.
(automake_min): Remove.
Build aclocal.m4 so that autoreconf need not use aclocal.
* build-aux/config.guess, build-aux/config.sub:
* build-aux/install-sh:
New files, copied from Gnulib.  These are now updated by
admin/merge-gnulib instead by autogen.sh.
* configure.ac (AC_PROG_MAKE_SET, ACLOCAL_PATH, AM_CONDITIONAL):
Remove.
(AM_INIT_AUTOMAKE, AM_SILENT_RULES): Remove call.
(AC_PROG_CC_C_O): Call this instead of AM_PROG_CC_C_O.
(BUILDING_FOR_WINDOWSNT, HYBRID_MALLOC_LIB): Remove; no longer needed.
(--disable-silent-rules): New option, since Automake no longer
does this for us.
(AM_V, AM_DEFAULT_V): Set unconditionally, and do not bother
with AM_SUBST_NOTMAKE.
(AC_PROG_INSTALL): Add call.
(MAKEINFO): Do not bother with the 'missing' program.
(MAKEINFO, SYSTEM_TYPE): AC_SUBST.
(AC_CONFIG_FILES): Add Makefile, lib/gnulib.mk.
(SUBDIR_MAKEFILES): Remove duplication.
* lib/Makefile.am: Remove, replacing with:
* lib/Makefile.in: New file, with the old Makefile.am contents
and with the following changes:
(AUTOMAKE_OPTIONS, BUILT_SOURCES, CLEANFILES, EXTRA_DIST)
(MOSTLYCLEANDIRS, MOSTLYCLEANFILES, noinst_LIBRARIES, SUFFIXES)
(AM_CFLAGS, DEFAULT_INCLUDES, libegnu_a_SOURCES, libegnu_a_LIBADD)
(EXTRA_libegnu_a_SOURCES, libegnu_a_SHORTNAME, libegnu_a_CPPFLAGS):
Remove.
(VPATH, abs_top_builddir, top_builddir, top_srcdir, all, AM_V_AR)
(AM_V_CC, AM_V_GEN, AM_V_at, DEPDIR, DEPFLAGS, MKDEPDIR, SYSTEM_TYPE)
(libgnu.a, libegnu.a, ETAGS, $(ETAGS), tags, TAGS, clean)
(mostlyclean, distclean, bootstrap-clean, maintainer-clean):
New macros and rules, since Automake no longer does them.
Include ../nt/gnulib-cfg.mk if SYSTEM_TYPE is windows-nt,
instead of including ../nt/gnulib.mk if BUILDING_FOR_WINDOWS_NT.
Include dependency files if AUTO_DEPEND.
(ALL_CFLAGS, AUTOCONF_INPUTS, libgnu_a_OBJECTS, libegnu_a_OBJECTS):
New macros.
(bootstrap-clean): Depend on distclean, not maintainer-clean,
and remove gnulib.mk.
(AUTOCONF_INPUTS, $(top_srcdir)/configure, ../config.status, Makefile):
New macros and rules, copied from ../Makefile.in.
($(libegnu_a_OBJECTS), $(libgnu_a_OBJECTS)): Depend on BUILT_SOURCES.
(.c.o, e-%.o): New generic rules.
* lib/gnulib.mk: Remove.
* lib/gnulib.mk.in: New file, which is built by autogen.sh
and contains much of what used to be in lib/gnulib.mk.
* m4/gnulib-common.m4: Copy from gnulib.
* make-dist: Do not distribute build-aux/compile, build-aux/depcomp,
build-aux/missing, build-aux/ar-lib, lib/Makefile.am, nt/gnulib.mk,
nt/gnulib-modules-to-delete.cfg.  Distribute lib/Makefile.in,
lib/gnulib.mk.in, and nt/gnulib-cfg.mk instead.
* nt/Makefile.in (AM_V_GEN, am__v_GEN_, am__v_GEN_0)
(am__v_GEN_1, ${srcdir}/gnulib.mk): Remove.
* nt/gnulib-cfg.mk: New file, which supersedes ...
* nt/gnulib-modules-to-delete.cfg: ... this file, which is removed.
* src/Makefile.in (ACLOCAL_INPUTS): Remove.
(AUTOCONF_INPUTS): Merge ACLOCAL_INPUTS into it.
($(top_srcdir)/configure, ../config.status, config.in Makefile):
Defer to parent Makefile.
2017-03-17 11:42:34 -07:00

258 lines
8.1 KiB
Makefile

### @configure_input@
# Copyright (C) 2013-2017 Free Software Foundation, Inc.
# This file is part of GNU Emacs.
# GNU Emacs is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# GNU Emacs is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
# Avoid trouble on systems where the `SHELL' variable might be
# inherited from the environment.
SHELL = /bin/sh
# ==================== Things `configure' will edit ====================
CC=@CC@
CFLAGS=@CFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
version=@version@
## Used in $archlibdir.
configuration=@configuration@
EXEEXT=@EXEEXT@
C_SWITCH_SYSTEM=@C_SWITCH_SYSTEM@
C_SWITCH_MACHINE=@C_SWITCH_MACHINE@
PROFILING_CFLAGS = @PROFILING_CFLAGS@
WARN_CFLAGS = @WARN_CFLAGS@
WERROR_CFLAGS = @WERROR_CFLAGS@
# Program name transformation.
TRANSFORM = @program_transform_name@
# 'make' verbosity.
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
AM_V_CC = $(am__v_CC_@AM_V@)
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
am__v_CC_0 = @echo " CC " $@;
am__v_CC_1 =
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
AM_V_RC = $(am__v_RC_@AM_V@)
am__v_RC_ = $(am__v_RC_@AM_DEFAULT_V@)
am__v_RC_0 = @echo " RC " $@;
am__v_RC_1 =
# ==================== Where To Install Things ====================
# The default location for installation. Everything is placed in
# subdirectories of this directory. The default values for many of
# the variables below are expressed in terms of this one, so you may
# not need to change them. This is set with the --prefix option to
# `../configure'.
prefix=@prefix@
# Like `prefix', but used for architecture-specific files. This is
# set with the --exec-prefix option to `../configure'.
exec_prefix=@exec_prefix@
# Where to install Emacs and other binaries that people will want to
# run directly (like etags). This is set with the --bindir option
# to `../configure'.
bindir=@bindir@
# The root of the directory tree for read-only architecture-independent
# data files. ${datadir}, ${infodir} and ${mandir} are based on this.
datarootdir=@datarootdir@
# Where to install architecture-independent data files. ${lispdir}
# and ${etcdir} are subdirectories of this. This is set with the
# --datadir option to `../configure'.
datadir=@datadir@
# Where to install and expect executable files to be run by Emacs
# rather than directly by users, and other architecture-dependent
# data. ${archlibdir} is usually below this. This is set with the
# --libexecdir option to `../configure'.
libexecdir=@libexecdir@
# Directory for local state files for all programs.
localstatedir=@localstatedir@
# Where to find the source code. This is set by the configure
# script's `--srcdir' option. However, the value of ${srcdir} in
# this makefile is not identical to what was specified with --srcdir,
# since the variable here has `/lib-src' added at the end.
# We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
srcdir=@srcdir@
VPATH=@srcdir@
# The top-level source directory, also set by configure.
top_srcdir=@top_srcdir@
# MinGW CPPFLAGS may use this.
abs_top_srcdir=@abs_top_srcdir@
# ==================== Emacs-specific directories ====================
# These variables hold the values Emacs will actually use. They are
# based on the values of the standard Make variables above.
# Where to put executables to be run by Emacs rather than the user.
# This path usually includes the Emacs version and configuration name,
# so that multiple configurations for multiple versions of Emacs may
# be installed at once. This can be set with the --archlibdir option
# to `../configure'.
archlibdir=@archlibdir@
# ==================== Utility Programs for the Build =================
# ../configure figures out the correct values for these.
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
# By default, we uphold the dignity of our programs.
INSTALL_STRIP =
MKDIR_P = @MKDIR_P@
# ========================== Lists of Files ===========================
# Things that a user might actually run, which should be installed in bindir.
INSTALLABLES = runemacs${EXEEXT} addpm${EXEEXT}
# Things that Emacs runs internally, which should not be installed in bindir.
UTILITIES = cmdproxy${EXEEXT} ddeclient${EXEEXT}
# Things that Emacs runs during the build process.
DONT_INSTALL =
# All files that are created by the linker, i.e., whose names end in ${EXEEXT}.
EXE_FILES = ${INSTALLABLES} ${UTILITIES} ${DONT_INSTALL}
# =========================== Configuration ===========================
# MS-Windows resource files and resource compiler
EMACSRES = @EMACSRES@
EMACS_MANIFEST = @EMACS_MANIFEST@
WINDRES = @WINDRES@
## Extra libraries to use when linking addpm.
LIBS_ADDPM = -lole32 -luuid
## Compilation and linking flags
BASE_CFLAGS = $(C_SWITCH_SYSTEM) $(C_SWITCH_MACHINE) \
$(WARN_CFLAGS) $(WERROR_CFLAGS) \
-I. -I${srcdir}
ALL_CFLAGS = ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${LDFLAGS} ${CPPFLAGS} ${CFLAGS}
## Unused.
LINK_CFLAGS = ${BASE_CFLAGS} ${LDFLAGS} ${CFLAGS}
## Unused.
CPP_CFLAGS = ${BASE_CFLAGS} ${PROFILING_CFLAGS} ${CPPFLAGS} ${CFLAGS}
all: ${EXE_FILES}
.PHONY: all
## Install the internal utilities. Until they are installed, we can
## just run them directly from nt/.
$(DESTDIR)${archlibdir}: all
@echo
@echo "Installing utilities run internally by Emacs."
umask 022; ${MKDIR_P} "$(DESTDIR)${archlibdir}"
exp_archlibdir=`cd "$(DESTDIR)${archlibdir}" && /bin/pwd`; \
if [ "$$exp_archlibdir" != "`/bin/pwd`" ]; then \
for file in ${UTILITIES}; do \
$(INSTALL_PROGRAM) $(INSTALL_STRIP) $$file "$(DESTDIR)${archlibdir}/$$file" ; \
done ; \
fi
.PHONY: install uninstall mostlyclean clean distclean maintainer-clean
.PHONY: bootstrap-clean extraclean check tags
install: $(DESTDIR)${archlibdir}
@echo
@echo "Installing utilities for users to run."
umask 022; ${MKDIR_P} "$(DESTDIR)${bindir}"
for file in ${INSTALLABLES} ; do \
$(INSTALL_PROGRAM) $(INSTALL_STRIP) $${file} "$(DESTDIR)${bindir}"/`echo $${file} | sed -e 's/${EXEEXT}$$//' -e '$(TRANSFORM)'`${EXEEXT} ; \
done
${MKDIR_P} "$(DESTDIR)${datadir}/emacs/$(version)"
$(INSTALL_DATA) ${srcdir}/README.W32 "$(DESTDIR)${datadir}/emacs/$(version)"
uninstall:
rm -f "$(DESTDIR)${datadir}/emacs/$(version)/README.W32"
for file in ${INSTALLABLES}; do \
rm -f "$(DESTDIR)${bindir}"/`echo $${file} | sed -e 's/${EXEEXT}$$//' -e '$(TRANSFORM)'`${EXEEXT} ; \
done
if [ -d "$(DESTDIR)${archlibdir}" ]; then \
(cd "$(DESTDIR)${archlibdir}" && rm -f ${UTILITIES}) \
fi
mostlyclean:
-rm -f core *.o *.res
clean: mostlyclean
-rm -f ${EXE_FILES}
distclean: clean
-rm -f TAGS Makefile *.rc
bootstrap-clean maintainer-clean: distclean
true
extraclean: maintainer-clean
-rm -f *~ \#*
## Test the contents of the directory.
check:
@echo "We don't have any tests for the nt/ directory yet."
ETAGS = ../lib-src/etags${EXEEXT}
${ETAGS}: FORCE
${MAKE} -C ../lib-src $(notdir $@)
tagsfiles= $(wildcard ${srcdir}/*.[ch])
FORCE:
.PHONY: tags FORCE
tags: TAGS
TAGS: ${ETAGS} ${tagsfiles}
${ETAGS} ${tagsfiles}
## Build the programs
addpm${EXEEXT}: ${srcdir}/addpm.c ../src/epaths.h
$(AM_V_CCLD)$(CC) ${ALL_CFLAGS} $< $(LIBS_ADDPM) -o $@
ddeclient${EXEEXT}: ${srcdir}/ddeclient.c
$(AM_V_CCLD)$(CC) ${ALL_CFLAGS} $< -o $@
cmdproxy${EXEEXT}: ${srcdir}/cmdproxy.c
$(AM_V_CCLD)$(CC) ${ALL_CFLAGS} $< -o $@
runemacs${EXEEXT}: ${srcdir}/runemacs.c $(EMACSRES)
$(AM_V_CCLD)$(CC) ${ALL_CFLAGS} $^ -mwindows -o $@
## Also used in ../src/Makefile.
emacs.res ../src/emacs.res: emacs.rc ${srcdir}/icons/emacs.ico \
${srcdir}/icons/hand.cur ${srcdir}/$(EMACS_MANIFEST)
$(AM_V_RC)${WINDRES} -I ${srcdir} -O coff -o $@ $<