Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Makefile.in « testsuite « winsup - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 04ff99bc07bcd825753923f9b3d6d862d25ed215 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# Makefile.in for Cygwin's testsuite.
# Copyright 2000, 2001, 2002, 2003, 2005, 2006, 2009, 2012 Red Hat, Inc.
#
# 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@
srcdir:=@srcdir@
objdir:=.
libltp_srcdir=$(srcdir)/libltp

VPATH:=$(srcdir):$(libltp_srcdir)/lib

target_alias:=@target_alias@
build_alias:=@build_alias@
host_alias:=@host_alias@

DESTDIR=
prefix:=${DESTDIR}@prefix@

program_transform_name:=@program_transform_name@
exec_prefix:=${DESTDIR}@exec_prefix@
bindir:=${DESTDIR}@bindir@
libdir:=${DESTDIR}@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
datadir:=${DESTDIR}@datadir@
infodir:=${DESTDIR}@infodir@
includedir:=${DESTDIR}@includedir@

TESTSUP_INCLUDES:=-I$(libltp_srcdir)/include

#
# --enable options from configure
#

CC:=@CC@
# FIXME: Which is it, CC or CC_FOR_TARGET?
CC_FOR_TARGET:=$(CC)
ifneq (,$(CFLAGS))
  override CFLAGS+= -MD $(TESTSUP_INCLUDES)
else
  CFLAGS:=@CFLAGS@ -MD $(TESTSUP_INCLUDES)
endif

AR:=@AR@
AR_FLAGS:=qv
MINGW_FE:=$(dir ${srcdir})/utils/mingw

#
# Include common definitions for winsup directory
#
include $(srcdir)/../Makefile.common

override CC:=$(CC) $(GCC_INCLUDE)
export CC

RUNTESTFLAGS =

ifdef VERBOSE
    RUNTESTFLAGS = -v
endif

RUNTIME=$(cygwin_build)/cygwin0.dll $(cygwin_build)/libcygwin0.a

TESTSUP_LIB_NAME:=libltp.a
TESTSUP_OFILES:=${sort ${addsuffix .o,${basename ${notdir ${wildcard $(libltp_srcdir)/lib/*.c}}}}}

override ALL_CFLAGS:=${filter-out -O%,$(ALL_CFLAGS)}
override COMPILE_CC:=${filter-out -O%,$(COMPILE_CC)}
override CFLAGS:=${filter-out -O%,$(CFLAGS)}
export CFLAGS

.PHONY: all force dll_ofiles install all_target install_target install_host

.SUFFIXES:
.SUFFIXES: .c .cc .def .a .o .d

all: $(TESTSUP_LIB_NAME)

force:

install:

install_host:

clean:
	-rm -f *.o *.dll *.a *.exp junk *.bak *.base *.exe testsuite/* *.d *.dat

maintainer-clean realclean: clean
	@echo "This command is intended for maintainers to use;"
	@echo "it deletes files that may require special tools to rebuild."
	-rm -fr configure

# Rule to build libltp.a

$(TESTSUP_LIB_NAME): $(TESTSUP_OFILES)
	$(AR) rcv temp.a $(TESTSUP_OFILES)
	mv temp.a $(TESTSUP_LIB_NAME)

$(RUNTIME) : $(cygwin_build)/Makefile
	@$(MAKE) --no-print-dir -C $(@D) $(@F)

# Rule to make stub library used by "make check"

#

# These targets are for the dejagnu testsuites. The file site.exp
# contains global variables that all the testsuites will use.

# Set to $(target_alias)/ for cross.
target_subdir = @target_subdir@

site.exp: ./config.status Makefile
	@echo "Making a new config file..."
	-@rm -f ./tmp?
	@touch site.exp
	-@mv site.exp site.bak
	@echo "## these variables are automatically generated by make ##" > ./tmp0
	@echo "# Do not edit here. If you wish to override these values" >> ./tmp0
	@echo "# add them to the last section" >> ./tmp0
	@echo "set rootme \"`pwd`\"" >> ./tmp0
	@echo "set runtime_root \"\$$rootme/../cygwin\"" >> ./tmp0
	@echo "set srcdir \"`cd ${srcdir}; pwd`\"" >> ./tmp0
	@echo "set host_triplet $(host_canonical)" >> ./tmp0
	@echo "set build_triplet $(build_canonical)" >> ./tmp0
	@echo "set target_triplet $(target)" >> ./tmp0
	@echo "set target_alias $(target_alias)" >> ./tmp0
	@echo "set CC \"$(CC)\"" >> ./tmp0
# CFLAGS is set even though it's empty to show we reserve the right to set it.
	@echo "set CFLAGS \"$(ALL_CFLAGS)\"" >> ./tmp0
	echo "set tmpdir $(objdir)/testsuite" >> ./tmp0
	@echo "set ltp_includes \"$(libltp_srcdir)/include\"" >> ./tmp0
	@echo "## All variables above are generated by configure. Do Not Edit ##" >> ./tmp0
	@cat ./tmp0 > site.exp
	@cat site.bak | sed \
		-e '1,/^## All variables above are.*##/ d' >> site.exp
	-@rm -f ./tmp?

testsuite/site.exp: site.exp
	if [ -d testsuite ]; then \
	  true; \
	else \
	  mkdir testsuite; \
	fi
	rm -rf testsuite/site.exp
	cp site.exp testsuite/site.exp

# Note: we set the PATH so that we can pick up cygwin0.dll

check: $(TESTSUP_LIB_NAME) $(RUNTIME) cygrun.exe testsuite/site.exp
	cd testsuite; runtest --tool winsup $(RUNTESTFLAGS)

cygrun.o: cygrun.c
	${MINGW_FE} $(CC) $(MINGW_CFLAGS) -o $@ -c $<

cygrun.exe : cygrun.o
	${MINGW_FE} $(CC) ${MINGW_LDFLAGS} -o $@ $<