4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-20 13:29:24 +08:00
newlib-cygwin/winsup/Makefile.in
Jon Turney dc93f7ef2d
Cygwin: Remove recursive configure
There's doesn't seem to be much use in independently distributing these
subdirectories, so allowing them to be independently configured seems
pointless and overcomplicated.

The order in which the subdirectories are built is still a little odd,
as cygwin is linked with libcygserver, and cygserver is then linked with
cygwin. So, we build the cygwin directory first, which invokes a build
of libcygserver in the cygserver directory, and then build in the
cygserver directory to build the cygserver executable.

Drop AC_CONFIGURE_ARGS, since we don't need to recursively call
configure with the same arguments anymore.

Slightly refine when we build utils: Previously we didn't build any
utils if MinGW compiler use was avoided, now we just avoid building
those utils which require that compiler.

Greatly simplify how winsup_srcdir and target_builddir are set, since
we're only configuring from one directory.  (These are still kept
absolute, since we don't adjust them where used for being used in a
subdirectory).

Remove configure.cygwin and put it's (greatly reduced) contents inline
in the one place it's used now.

Remove generated configure and aclocal.m4 in subdirectories.
2020-11-20 15:56:11 +00:00

113 lines
2.3 KiB
Makefile

# Makefile.in for windows stuff
#
# This file is part of Cygwin.
#
# This software is a copyrighted work licensed under the terms of the
# Cygwin license. Please consult the file "CYGWIN_LICENSE" for
# details.
# This makefile requires GNU make.
SHELL:=@SHELL@
VPATH:=@srcdir@
srcdir:=@srcdir@
objdir:=.
target_alias:=@target_alias@
build_alias:=@build_alias@
host_alias:=@host_alias@
prefix:=@prefix@
program_transform_name:=@program_transform_name@
exec_prefix:=@exec_prefix@
bindir:=@bindir@
libdir:=@libdir@
ifeq ($(target_alias),$(host_alias))
ifeq ($(build_alias),$(host_alias))
tooldir:=$(exec_prefix)
else
tooldir:=$(exec_prefix)/$(target_alias)
endif
else
tooldir:=$(exec_prefix)/$(target_alias)
endif
datarootdir:=@datarootdir@
datadir:=@datadir@
infodir:=@infodir@
includedir:=@includedir@
INSTALL:=@INSTALL@
INSTALL_PROGRAM:=@INSTALL_PROGRAM@
INSTALL_DATA:=@INSTALL_DATA@
SUBDIRS=cygwin cygserver doc utils testsuite
INSTALL_SUBDIRS=${patsubst %,install_%,$(SUBDIRS)}
CLEAN_SUBDIRS=${patsubst %,clean_%,$(SUBDIRS)}
.PHONY: all install clean distclean all-info info install-info install-license check \
$(SUBDIRS) $(INSTALL_SUBDIRS) $(CLEAN_SUBDIRS)
.SUFFIXES:
MAKEOVERRIDES_WORKAROUND=${wordlist 2,1,a b c}
ifneq ($(MAKEOVERRIDES_WORKAROUND),)
override MAKE:=$(MAKE) $(MAKEOVERRIDES)
MAKEOVERRIDES:=
export MAKEOVERRIDES
endif
all: Makefile $(SUBDIRS)
install-license: CYGWIN_LICENSE COPYING
${INSTALL} -d $(DESTDIR)$(prefix)/share/doc/Cygwin
for i in $^; do \
${INSTALL} $$i $(DESTDIR)$(prefix)/share/doc/Cygwin ; \
done
install: Makefile install-license $(INSTALL_SUBDIRS)
clean distclean: $(CLEAN_SUBDIRS)
all-info:
install-info:
info:
$(SUBDIRS):
@${MAKE} -C $@ all || ([ "$@" == doc ] && echo "*** error ignored")
$(INSTALL_SUBDIRS):
@${MAKE} -C $(patsubst install_%,%,$@) install || ([ "$@" == install_doc ] && echo "*** error ignored")
$(CLEAN_SUBDIRS):
@if cd $(patsubst clean_%,%,$@) 2>/dev/null; then \
$(MAKE) clean || exit 1; \
fi || exit 0
.PRECIOUS: Makefile
Makefile: Makefile.in ${patsubst %,%/Makefile.in,$(SUBDIRS)} $(srcdir)/configure config.status
$(SHELL) config.status
config.status: configure
$(SHELL) config.status --recheck
check: cygwin
$(MAKE) -C testsuite check
utils: cygwin
cygwin:
cygserver: cygwin
testsuite: cygwin
install_utils: cygwin
install_cygwin:
install_cygserver: cygwin