2000-09-03 11:58:18 +08:00
|
|
|
|
# Makefile.in for Cygwin's testsuite.
|
|
|
|
|
#
|
|
|
|
|
# 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
|
2020-10-29 03:11:02 +08:00
|
|
|
|
target_builddir:=@target_builddir@
|
2000-09-03 11:58:18 +08:00
|
|
|
|
|
|
|
|
|
target_alias:=@target_alias@
|
|
|
|
|
build_alias:=@build_alias@
|
|
|
|
|
host_alias:=@host_alias@
|
2008-11-27 00:42:27 +08:00
|
|
|
|
|
|
|
|
|
DESTDIR=
|
|
|
|
|
prefix:=${DESTDIR}@prefix@
|
2000-09-03 11:58:18 +08:00
|
|
|
|
|
|
|
|
|
program_transform_name:=@program_transform_name@
|
2008-11-27 00:42:27 +08:00
|
|
|
|
exec_prefix:=${DESTDIR}@exec_prefix@
|
|
|
|
|
bindir:=${DESTDIR}@bindir@
|
|
|
|
|
libdir:=${DESTDIR}@libdir@
|
2000-09-03 11:58:18 +08:00
|
|
|
|
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
|
2020-11-03 22:50:40 +08:00
|
|
|
|
datarootdir:=@datarootdir@
|
2008-11-27 00:42:27 +08:00
|
|
|
|
datadir:=${DESTDIR}@datadir@
|
|
|
|
|
infodir:=${DESTDIR}@infodir@
|
|
|
|
|
includedir:=${DESTDIR}@includedir@
|
2000-09-03 11:58:18 +08:00
|
|
|
|
|
|
|
|
|
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)
|
2000-09-05 03:04:53 +08:00
|
|
|
|
ifneq (,$(CFLAGS))
|
|
|
|
|
override CFLAGS+= -MD $(TESTSUP_INCLUDES)
|
|
|
|
|
else
|
|
|
|
|
CFLAGS:=@CFLAGS@ -MD $(TESTSUP_INCLUDES)
|
|
|
|
|
endif
|
2000-09-03 11:58:18 +08:00
|
|
|
|
|
|
|
|
|
AR:=@AR@
|
|
|
|
|
AR_FLAGS:=qv
|
2009-11-02 01:22:44 +08:00
|
|
|
|
MINGW_FE:=$(dir ${srcdir})/utils/mingw
|
2000-09-03 11:58:18 +08:00
|
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Include common definitions for winsup directory
|
|
|
|
|
#
|
|
|
|
|
include $(srcdir)/../Makefile.common
|
|
|
|
|
|
2020-10-29 00:42:09 +08:00
|
|
|
|
VPATH+=$(libltp_srcdir)/lib
|
|
|
|
|
|
2003-03-10 03:46:29 +08:00
|
|
|
|
override CC:=$(CC) $(GCC_INCLUDE)
|
|
|
|
|
export CC
|
|
|
|
|
|
2000-09-03 11:58:18 +08:00
|
|
|
|
RUNTESTFLAGS =
|
|
|
|
|
|
|
|
|
|
ifdef VERBOSE
|
|
|
|
|
RUNTESTFLAGS = -v
|
|
|
|
|
endif
|
|
|
|
|
|
2003-03-10 01:03:05 +08:00
|
|
|
|
RUNTIME=$(cygwin_build)/cygwin0.dll $(cygwin_build)/libcygwin0.a
|
2000-09-03 11:58:18 +08:00
|
|
|
|
|
|
|
|
|
TESTSUP_LIB_NAME:=libltp.a
|
|
|
|
|
TESTSUP_OFILES:=${sort ${addsuffix .o,${basename ${notdir ${wildcard $(libltp_srcdir)/lib/*.c}}}}}
|
|
|
|
|
|
2003-02-08 10:56:49 +08:00
|
|
|
|
override ALL_CFLAGS:=${filter-out -O%,$(ALL_CFLAGS)}
|
|
|
|
|
override COMPILE_CC:=${filter-out -O%,$(COMPILE_CC)}
|
|
|
|
|
override CFLAGS:=${filter-out -O%,$(CFLAGS)}
|
2003-03-10 03:46:29 +08:00
|
|
|
|
export CFLAGS
|
2003-02-08 10:56:49 +08:00
|
|
|
|
|
2020-10-19 21:34:35 +08:00
|
|
|
|
.PHONY: all force dll_ofiles install all_target
|
2000-09-03 11:58:18 +08:00
|
|
|
|
|
|
|
|
|
.SUFFIXES:
|
|
|
|
|
.SUFFIXES: .c .cc .def .a .o .d
|
|
|
|
|
|
2001-11-04 13:14:16 +08:00
|
|
|
|
all: $(TESTSUP_LIB_NAME)
|
2000-09-03 11:58:18 +08:00
|
|
|
|
|
|
|
|
|
force:
|
|
|
|
|
|
|
|
|
|
install:
|
|
|
|
|
|
|
|
|
|
clean:
|
2003-07-07 03:25:40 +08:00
|
|
|
|
-rm -f *.o *.dll *.a *.exp junk *.bak *.base *.exe testsuite/* *.d *.dat
|
2000-09-03 11:58:18 +08:00
|
|
|
|
|
|
|
|
|
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.
|
2003-01-24 05:14:56 +08:00
|
|
|
|
@echo "set CFLAGS \"$(ALL_CFLAGS)\"" >> ./tmp0
|
2000-09-03 11:58:18 +08:00
|
|
|
|
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
|
|
|
|
|
|
2003-03-10 01:03:05 +08:00
|
|
|
|
# Note: we set the PATH so that we can pick up cygwin0.dll
|
2000-09-03 11:58:18 +08:00
|
|
|
|
|
2003-01-24 09:30:43 +08:00
|
|
|
|
check: $(TESTSUP_LIB_NAME) $(RUNTIME) cygrun.exe testsuite/site.exp
|
2012-11-23 22:52:07 +08:00
|
|
|
|
cd testsuite; runtest --tool winsup $(RUNTESTFLAGS)
|
2003-01-22 23:18:58 +08:00
|
|
|
|
|
|
|
|
|
cygrun.o: cygrun.c
|
2009-11-02 01:22:44 +08:00
|
|
|
|
${MINGW_FE} $(CC) $(MINGW_CFLAGS) -o $@ -c $<
|
2003-01-22 23:18:58 +08:00
|
|
|
|
|
|
|
|
|
cygrun.exe : cygrun.o
|
2009-11-02 01:22:44 +08:00
|
|
|
|
${MINGW_FE} $(CC) ${MINGW_LDFLAGS} -o $@ $<
|
2020-11-03 05:53:37 +08:00
|
|
|
|
|
|
|
|
|
Makefile: Makefile.in $(srcdir)/configure config.status
|
|
|
|
|
$(SHELL) config.status
|