mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-21 06:55:39 +00:00
6b5accdc05
* etc/NEWS: Update correspondingly. * exec/Makefile.in (config-mips.m4): Don't define rule or predicate $(LOADOBJS) on it elsewhere than on MIPS. * exec/README: Direct developers to GDB. * exec/trace.c (finish_exec): Resume the tracee after reporting an error in `exec'. (after_fork): If seccomp is enabled on Android, and the kernel is 4.7 or earlier, detect whether revisions to the sequencing of seccomp events have been backported from 4.8. (exec_waitpid): Resume the process with PTRACE_CONT after receiving an unknown signal. (exec_init): Cease disabling seccomp on Android kernels earlier than 4.8.
153 lines
3.6 KiB
Makefile
153 lines
3.6 KiB
Makefile
### @configure_input@
|
|
|
|
# Copyright (C) 2023-2024 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 <https://www.gnu.org/licenses/>.
|
|
|
|
# Configure build directory information.
|
|
|
|
srcdir = @srcdir@
|
|
VPATH = @srcdir@
|
|
builddir = @builddir@
|
|
|
|
# Set up compilation tools.
|
|
|
|
CC = @CC@
|
|
AS = @AS@
|
|
LD = @LD@
|
|
M4 = @M4@
|
|
CPP = @CPP@
|
|
ASFLAGS = @ASFLAGS@
|
|
ARFLAGS = @ARFLAGS@
|
|
CFLAGS = @CFLAGS@
|
|
CPPFLAGS = @CPPFLAGS@
|
|
LDFLAGS = @LDFLAGS@
|
|
LOADERFLAGS = @LOADERFLAGS@
|
|
FIND_DELETE = @FIND_DELETE@
|
|
|
|
# Set up object files.
|
|
|
|
LOADER = @exec_loader@
|
|
OBJS = @OBJS@
|
|
LOADOBJS = $(patsubst %.s,%.o,$(LOADER))
|
|
|
|
# Compilation parameters.
|
|
is_mips = @is_mips@
|
|
|
|
# Set up automatic dependency tracking.
|
|
|
|
AUTO_DEPEND = @AUTO_DEPEND@
|
|
DEPDIR = deps
|
|
ifeq ($(AUTO_DEPEND),yes)
|
|
DEPFLAGS = -MMD -MF $(DEPDIR)/$*.d -MP
|
|
-include $(OBJS:%.o=$(DEPDIR)/%.d)
|
|
-include $(DEPDIR)/test.d
|
|
-include $(DEPDIR)/exec1.d
|
|
else
|
|
DEPFLAGS =
|
|
include $(srcdir)/deps.mk
|
|
endif
|
|
|
|
# Set up the appropriate targets.
|
|
|
|
all: libexec.a loader
|
|
|
|
# Set up automatic Makefile regeneration.
|
|
|
|
$(srcdir)/configure: $(srcdir)/configure.ac
|
|
cd $(srcdir) && autoreconf
|
|
|
|
config.status: $(srcdir)/configure
|
|
if [ -x config.status ]; then \
|
|
./config.status --recheck; \
|
|
else \
|
|
$(srcdir)/configure; \
|
|
fi
|
|
|
|
Makefile: config.status Makefile.in
|
|
MAKE="$(MAKE)" ./config.status
|
|
|
|
# Set up rules to build targets.
|
|
|
|
.SUFFIXES: .c .s
|
|
.c.o:
|
|
$(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEPFLAGS) -I. -I$(srcdir) $< -o $@
|
|
|
|
ifeq ($(is_mips),yes)
|
|
.s.o:
|
|
$(M4) $< > $(notdir $<).s
|
|
$(AS) $(ASFLAGS) $(notdir $<).s -o $@
|
|
|
|
# Set up dependencies for config-mips.m4.
|
|
|
|
config-mips.m4: config-mips.m4.in
|
|
cd $(srcdir) && ./config.status $@
|
|
$(LOADOBJS): config-mips.m4
|
|
else
|
|
.s.o:
|
|
$(AS) $(ASFLAGS) $< -o $@
|
|
endif
|
|
|
|
# Set up rules to build libexec.a.
|
|
|
|
libexec.a: $(OBJS)
|
|
$(AR) cru $(ARFLAGS) $@ $^
|
|
|
|
# And loader.
|
|
|
|
loader: $(LOADOBJS)
|
|
$(LD) -o $@ $(LOADERFLAGS) $(LOADOBJS)
|
|
|
|
# And test.
|
|
|
|
test: test.o libexec.a
|
|
$(CC) $(LDFLAGS) $< libexec.a -o $@
|
|
|
|
# And exec1.
|
|
|
|
exec1: exec1.o libexec.a
|
|
$(CC) $(LDFLAGS) $< libexec.a -o $@
|
|
|
|
# Set up targets for cleaning.
|
|
|
|
.PHONY: clean distclean maintainer-clean extraclean bootstrap-clean
|
|
clean:
|
|
rm -f *.o *.a loader test exec1 *.s.s
|
|
ifeq ($(AUTO_DEPEND),yes)
|
|
rm -rf deps/*.d
|
|
endif
|
|
|
|
distclean: clean
|
|
rm -f Makefile config.status config.h config-mips.m4
|
|
|
|
maintainer-clean: distclean
|
|
|
|
### This doesn't actually appear in the coding standards, but Karl
|
|
### says GCC supports it, and that's where the configuration part of
|
|
### the coding standards seem to come from. It's like distclean, but
|
|
### it deletes backup and autosave files too.
|
|
|
|
# config.* and install-sh are copied from build-aux in the root of
|
|
# this repository by autogen.sh.
|
|
extraclean: maintainer-clean
|
|
-rm -f config-tmp-* $(srcdir)/aclocal.m4 $(srcdir)/configure \
|
|
$(srcdir)/src/config.in $(srcdir)/config.guess \
|
|
$(srcdir)/config.sub $(srcdir)/install-sh
|
|
-[ "$(srcdir)" = "." ] || \
|
|
find $(srcdir) '(' -name '*~' -o -name '#*' ')' $(FIND_DELETE)
|
|
-find . '(' -name '*~' -o -name '#*' ')' $(FIND_DELETE)
|
|
bootstrap-clean: extraclean
|