newlib/winsup/testsuite/Makefile.in

188 lines
4.8 KiB
Makefile
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Makefile.in for Cygwin's testsuite.
# Copyright 2000 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@
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
datadir:=@datadir@
infodir:=@infodir@
includedir:=@includedir@
TESTSUP_INCLUDES:=-I$(libltp_srcdir)/include
INSTALL:=@INSTALL@
INSTALL_PROGRAM:=@INSTALL_PROGRAM@
#
# --enable options from configure
#
CC:=@CC@
# FIXME: Which is it, CC or CC_FOR_TARGET?
CC_FOR_TARGET:=$(CC)
#CFLAGS:=@CFLAGS@ -MD -Wno-write-strings $(TESTSUP_INCLUDES)
ifneq (,$(CFLAGS))
override CFLAGS+= -MD $(TESTSUP_INCLUDES)
else
CFLAGS:=@CFLAGS@ -MD $(TESTSUP_INCLUDES)
endif
CXXFLAGS:=@CXXFLAGS@
AR:=@AR@
AR_FLAGS:=qv
RANLIB:=@RANLIB@
LD:=@LD@
DLLTOOL:=@DLLTOOL@
WINDRES:=@WINDRES@
AS:=@AS@
#
# Include common definitions for winsup directory
#
include $(srcdir)/../Makefile.common
INSTALL_DATA:=$(SHELL) $(updir1)/install-sh -c
# Setup the testing framework, if you have one
EXPECT = `if [ -f $${rootme}/../../expect/expect$(EXEEXT) ] ; then \
echo $${rootme}/../../expect/expect$(EXEEXT) ; \
else echo expect ; fi`
RUNTEST = `if [ -f $${srcdir}/../dejagnu/runtest ] ; then \
echo $${srcdir}/../dejagnu/runtest ; \
else echo runtest; fi`
RUNTESTFLAGS =
ifdef VERBOSE
RUNTESTFLAGS = -v
endif
RUNTIME=$(cygwin_build)/new-cygwin1.dll $(cygwin_build)/new-libcygwin.a $(cygwin_build)/cygrun.exe
TESTSUP_LIB_NAME:=libltp.a
TESTSUP_OFILES:=${sort ${addsuffix .o,${basename ${notdir ${wildcard $(libltp_srcdir)/lib/*.c}}}}}
.PHONY: all force dll_ofiles install all_target install_target all_host install_host
.SUFFIXES:
.SUFFIXES: .c .cc .def .a .o .d
all_host=@all_host@
install_host=@install_host@
all: $(TESTSUP_LIB_NAME)
force:
install:
install_host:
clean:
-rm -f *.o *.dll *.a *.exp junk *.bak *.base *.exe testsuite/*
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 \"\"" >> ./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 new-cygwin1.dll
check: $(TESTSUP_LIB_NAME) $(RUNTIME) testsuite/site.exp
-rootme=`pwd`; export rootme; \
srcdir=`cd ${srcdir}; pwd` ; export srcdir ; \
cd testsuite; \
EXPECT=${EXPECT} ; export EXPECT ; \
if [ -f $${rootme}/../expect/expect ] ; then \
TCL_LIBRARY=`cd .. ; cd ${srcdir}/../tcl/library ; pwd` ; \
export TCL_LIBRARY ; fi ; \
PATH=$${rootme}/../cygwin:$${PATH} ;\
$(RUNTEST) --tool winsup $(RUNTESTFLAGS)
#