1 # Makefile.in for windows stuff
2 # Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2006
5 # This file is part of Cygwin.
7 # This software is a copyrighted work licensed under the terms of the
8 # Cygwin license. Please consult the file "CYGWIN_LICENSE" for
11 # This makefile requires GNU make.
18 target_alias:=@target_alias@
19 build_alias:=@build_alias@
20 host_alias:=@host_alias@
23 program_transform_name:=@program_transform_name@
24 exec_prefix:=@exec_prefix@
27 ifeq ($(target_alias),$(host_alias))
28 ifeq ($(build_alias),$(host_alias))
29 tooldir:=$(exec_prefix)
31 tooldir:=$(exec_prefix)/$(target_alias)
34 tooldir:=$(exec_prefix)/$(target_alias)
38 includedir:=@includedir@
41 INSTALL_PROGRAM:=@INSTALL_PROGRAM@
42 INSTALL_DATA:=@INSTALL_DATA@
45 INSTALL_SUBDIRS=${patsubst %,install_%,$(SUBDIRS)}
46 CLEAN_SUBDIRS=${patsubst %,clean_%,$(SUBDIRS)}
47 ZLIB=${findstring zlib,$(SUBDIRS)}
49 INSTALL_LICENSE:=@INSTALL_LICENSE@
51 .PHONY: all install clean all-info info install-info install-license check \
52 $(SUBDIRS) $(INSTALL_SUBDIRS) $(CLEAN_SUBDIRS)
56 MAKEOVERRIDES_WORKAROUND=${wordlist 2,1,a b c}
58 ifneq ($(MAKEOVERRIDES_WORKAROUND),)
59 override MAKE:=$(MAKE) $(MAKEOVERRIDES)
64 all: Makefile $(SUBDIRS)
66 install-license: CYGWIN_LICENSE COPYING
67 ${INSTALL} -d $(prefix)/share/doc/Cygwin
69 ${INSTALL} $$i $(prefix)/share/doc/Cygwin ; \
72 install: Makefile $(INSTALL_LICENSE) $(INSTALL_SUBDIRS)
74 clean: $(CLEAN_SUBDIRS)
83 @if cd $@ 2>/dev/null; then \
84 test "$@" = "mingw" && export DISTCC_HOSTS=localhost;\
85 $(MAKE) all || exit 1; \
89 @if cd ${patsubst install_%,%,$@} 2>/dev/null; then \
90 $(MAKE) install || exit 1; \
94 @if cd ${patsubst clean_%,%,$@} 2>/dev/null; then \
95 $(MAKE) clean || exit 1; \
100 Makefile: Makefile.in $(srcdir)/configure.in config.status
101 $(SHELL) config.status
103 config.status: configure
104 $(SHELL) config.status --recheck
106 # The below rule is intended to run configure only when "make check" is
107 # actually specified, i.e., not in a cross-compilation environment. The
108 # cygwin configuration is copied and modified to ensure that the same configuration
109 # parameters are passed when the testsuite is configured as when cygwin was configured.
111 @if [ -f testsuite/config.status ]; then \
114 (mkdir testsuite 2>/dev/null || exit 0); \
116 sed -e 's%winsup/cygwin\>%winsup/testsuite%g' ../cygwin/config.status > config.status; \
117 chmod a+x config.status; \
118 sh ./config.status --recheck; \
119 sh ./config.status; \
131 install_utils: cygwin mingw
133 install_mingw: w32api
135 install_cygwin: w32api
137 install_cygserver: cygwin
139 lsaauth: mingw cygwin