summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2005-09-13 02:51:08 +0000
committerwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2005-09-13 02:51:08 +0000
commit6daaf17051709b374a4078f350e16291c5e320da (patch)
tree310c85759007c943faaf32379cc9a1b02694a5c3
parent3f5342189c1fbe0438456d8ed5126da8b3622707 (diff)
downloadlibapr-6daaf17051709b374a4078f350e16291c5e320da.tar.gz
Backport: rev 280467
It's not possible anymore to keep these in sync, we've already thrown away compatibility by becoming addicted to libtool. Give it up already, and insist that the libtool addicts keep our Makefile.win in sync. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/branches/1.2.x@280468 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--test/MakeWin32Make.awk53
-rw-r--r--test/Makefile.win133
-rw-r--r--test/aprtest.dsp4
3 files changed, 75 insertions, 115 deletions
diff --git a/test/MakeWin32Make.awk b/test/MakeWin32Make.awk
deleted file mode 100644
index c5529f8ff..000000000
--- a/test/MakeWin32Make.awk
+++ /dev/null
@@ -1,53 +0,0 @@
-{
-
- if (match($0, /\@INCLUDE_RULES\@/ ) ) {
- print "ALL: \$(TARGETS)";
- print "";
- print "CL = cl.exe";
- print "LINK = link.exe /nologo /debug /machine:I386 /subsystem:console /incremental:no ";
- print "";
- print "CFLAGS = /nologo /c /MDd /W3 /Gm /GX /Zi /Od /D _DEBUG /D WIN32 /D APR_DECLARE_STATIC /FD ";
- print "";
- print ".c.obj::";
- $0 = "\t\$(CL) -c \$< \$(CFLAGS) \$(INCLUDES)";
- }
- if ( match( $0, /^ALL_LIBS=/ ) ) {
- $0 = "";
- }
- if ( match( $0, /^LOCAL_LIBS=/ ) ) {
- print "LOCAL_LIBS= ../LibD/apr.lib ";
- print "ALL_LIBS= kernel32\.lib user32\.lib advapi32\.lib Rpcrt4\.lib ws2_32\.lib wsock32\.lib ole32\.lib ";
- $0 = ""
- }
- if ( match( $0, /\@CFLAGS\@/ ) ) {
- $0 = "";
- }
- gsub( /\$\([^\)]* [^\)]*\)/, "", $0 );
- gsub( /\$\{LD_FLAGS\}/, "", $0 );
- gsub( /\.\.\/libapr\.la/, "../LibD/apr.lib", $0 );
- gsub( /\@RM\@/, "del", $0 );
- if (gsub( /\$\(RM\) -f/, "del" ) ) {
- gsub( /\*\.a/, "*.lib *.exp *.idb *.ilk *.pdb", $0 );
- gsub( /Makefile/, "Makefile *.ncb *.opt", $0 );
- }
- gsub( /\@CC\@/, "cl", $0);
- gsub( /\@RANLIB\@/, "", $0);
- gsub( /-I\$\(INCDIR\)/, "/I \"$(INCDIR)\"", $0);
-
- gsub( /\.\.\/libapr\.a/, "../LibD/apr.lib", $0 );
- if ( gsub( /\@EXEEXT\@/, ".exe", $0 ) ) {
- gsub( /\$\(CC\) \$\(CFLAGS\)/, "\$\(LINK\) /subsystem:console", $0 );
- gsub( /-o (\S+)/, "/out:\"$1\"", $0 );
- gsub( /--export-dynamic /, "", $0 );
- gsub( /-fPIC /, "", $0 );
- }
- if ( gsub( /-shared/, "/subsystem:windows /dll", $0 ) ) {
- gsub( /-o (\S+)/ "/out:\"$1\"", $0 );
- }
- gsub( /\$\(NONPORTABLE\)/, "", $0 );
- gsub( /\.a /, ".lib ", $0 );
- gsub( /\.o /, ".obj ", $0 );
- gsub( /\.lo /, ".obj ", $0 );
-
- print $0;
-}
diff --git a/test/Makefile.win b/test/Makefile.win
index 7e5644e9b..c1a352d21 100644
--- a/test/Makefile.win
+++ b/test/Makefile.win
@@ -1,101 +1,118 @@
-
-LINK=link /nologo
-
-PROGRAMS = \
- globalmutexchild.exe \
- sendfile.exe \
- proc_child.exe \
- tryread.exe \
- occhild.exe \
- readchild.exe \
- sockchild.exe \
+# PROGRAMS includes all test programs built on this platform.
+# STDTEST_PORTABLE
+# test programs invoked via standard user interface, run on all platforms
+# STDTEST_NONPORTABLE
+# test programs invoked via standard user interface, not portable
+# OTHER_PROGRAMS
+# programs such as sendfile, that have to be invoked in a special sequence
+# or with special parameters
+
+STDTEST_PORTABLE = \
testlockperf.exe \
testshmproducer.exe \
testshmconsumer.exe \
testmutexscope.exe \
- testall.exe \
- mod_test.so
+ testall.exe
+
+OTHER_PROGRAMS = sendfile.exe
+PROGRAMS = $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE) $(OTHER_PROGRAMS)
TARGETS = $(PROGRAMS)
-LOCAL_LIBS=..\LibD\apr-1.lib
-ALL_LIBS=kernel32.lib advapi32.lib ws2_32.lib mswsock.lib ole32.lib shell32.lib rpcrt4.lib
+# bring in rules.mk for standard functionality
+ALL: $(TARGETS)
-CLEAN_TARGETS = mod_test.lib mod_test.exp
+CL = cl.exe
-INCDIR=../include
-INCLUDES=/I "$(INCDIR)"
+CFLAGS = /nologo /c /MDd /W3 /Gm /GX /Zi /Od /D _DEBUG /D WIN32 /D APR_DECLARE_STATIC /FD
-all: $(TARGETS)
+.c.obj::
+ $(CL) -c $< $(CFLAGS) $(INCLUDES)
-clean:
- -del $(CLEAN_TARGETS) $(PROGRAMS) *.obj *.pdb *.ilk 2>NUL
+LOCAL_LIBS= ../LibD/apr-1.lib
+ALL_LIBS= kernel32.lib user32.lib advapi32.lib Rpcrt4.lib ws2_32.lib wsock32.lib ole32.lib
-.c.obj:
- cl /nologo /c /MDd /W3 /GX /Zi /Od /DWIN32 /D_DEBUG /D_WINDOWS /DAPR_DECLARE_STATIC $(INCLUDES) $<
-tryread.exe: tryread.obj $(LOCAL_LIBS)
- $(LINK) tryread.obj $(LOCAL_LIBS) $(ALL_LIBS)
+CLEAN_TARGETS = testfile.tmp mod_test.dll proc_child.exe occhild.exe \
+ readchild.exe tryread.exe sockchild.exe \
+ globalmutexchild.exe lfstests/large.bin \
+ data/testputs.txt data/testbigfprintf.dat data/testwritev.txt \
+ data/testwritev_full.txt
+CLEAN_SUBDIRS = internal
+
+INCDIR=../include
+INCLUDES=/I "$(INCDIR)"
+
+# link programs using -no-install to get real executables not
+# libtool wrapper scripts which link an executable when first run.
+LINK_PROG = link.exe /nologo /debug /machine:I386 /subsystem:console /incremental:no
+LINK_LIB = link.exe /nologo /dll /debug /machine:I386 /subsystem:windows /incremental:no
+
+check: $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE)
+ for prog in $(STDTEST_PORTABLE) $(STDTEST_NONPORTABLE); do \
+ ./$$prog; \
+ if test $$? = 255; then \
+ echo "$$prog failed"; \
+ break; \
+ fi; \
+ done
occhild.exe: occhild.obj $(LOCAL_LIBS)
- $(LINK) occhild.obj $(LOCAL_LIBS) $(ALL_LIBS)
+ $(LINK_PROG) occhild.obj $(LOCAL_LIBS) $(ALL_LIBS)
+
+sockchild.exe: sockchild.obj $(LOCAL_LIBS)
+ $(LINK_PROG) sockchild.obj $(LOCAL_LIBS) $(ALL_LIBS)
readchild.exe: readchild.obj $(LOCAL_LIBS)
- $(LINK) readchild.obj $(LOCAL_LIBS) $(ALL_LIBS)
+ $(LINK_PROG) readchild.obj $(LOCAL_LIBS) $(ALL_LIBS)
+
+globalmutexchild.exe: globalmutexchild.obj $(LOCAL_LIBS)
+ $(LINK_PROG) globalmutexchild.obj $(LOCAL_LIBS) $(ALL_LIBS)
+
+tryread.exe: tryread.obj $(LOCAL_LIBS)
+ $(LINK_PROG) tryread.obj $(LOCAL_LIBS) $(ALL_LIBS)
proc_child.exe: proc_child.obj $(LOCAL_LIBS)
- $(LINK) /debug /subsystem:console /machine:I386 \
- proc_child.obj $(LOCAL_LIBS) $(ALL_LIBS)
+ $(LINK_PROG) proc_child.obj $(LOCAL_LIBS) $(ALL_LIBS)
-# FIXME: This is BS ... we should deal with namespace decoration within the
-# apr_dso_sym() function or within the test (take y'r pick) since many platforms
-# have decoration and decoration issues.
-mod_test.so: mod_test.obj
- $(LINK) mod_test.obj /dll /out:mod_test.so $(LOCAL_LIBS) $(ALL_LIBS) \
- /export:print_hello /export:count_reps
+# FIXME: -prefer-pic is only supported with libtool-1.4+
+mod_test.dll: mod_test.obj
+ $(LINK_LIB) mod_test.obj /export:print_hello /export:count_reps $(LOCAL_LIBS) $(ALL_LIBS)
testlockperf.exe: testlockperf.obj $(LOCAL_LIBS)
- $(LINK) testlockperf.obj $(LOCAL_LIBS) $(ALL_LIBS)
-
-sockchild.exe: sockchild.obj $(LOCAL_LIBS)
- $(LINK) sockchild.obj $(LOCAL_LIBS) $(ALL_LIBS)
+ $(LINK_PROG) testlockperf.obj $(LOCAL_LIBS) $(ALL_LIBS)
sendfile.exe: sendfile.obj $(LOCAL_LIBS)
- $(LINK) sendfile.obj $(LOCAL_LIBS) $(ALL_LIBS)
-
-testshm.exe: testshm.obj $(LOCAL_LIBS) testshmproducer.exe testshmconsumer.exe
- $(LINK) testshm.obj $(LOCAL_LIBS) $(ALL_LIBS)
+ $(LINK_PROG) sendfile.obj $(LOCAL_LIBS) $(ALL_LIBS)
testshmproducer.exe: testshmproducer.obj $(LOCAL_LIBS)
- $(LINK) testshmproducer.obj $(LOCAL_LIBS) $(ALL_LIBS)
+ $(LINK_PROG) testshmproducer.obj $(LOCAL_LIBS) $(ALL_LIBS)
testshmconsumer.exe: testshmconsumer.obj $(LOCAL_LIBS)
- $(LINK) testshmconsumer.obj $(LOCAL_LIBS) $(ALL_LIBS)
+ $(LINK_PROG) testshmconsumer.obj $(LOCAL_LIBS) $(ALL_LIBS)
testprocmutex.exe: testprocmutex.obj $(LOCAL_LIBS)
- $(LINK) testprocmutex.obj $(LOCAL_LIBS) $(ALL_LIBS)
-
-globalmutexchild.exe: globalmutexchild.obj $(LOCAL_LIBS)
- $(LINK) globalmutexchild.obj $(LOCAL_LIBS) $(ALL_LIBS)
+ $(LINK_PROG) testprocmutex.obj $(LOCAL_LIBS) $(ALL_LIBS)
testmutexscope.exe: testmutexscope.obj $(LOCAL_LIBS)
- $(LINK) testmutexscope.obj $(LOCAL_LIBS) $(ALL_LIBS)
+ $(LINK_PROG) testmutexscope.obj $(LOCAL_LIBS) $(ALL_LIBS)
-TESTS = abts.obj testtime.obj teststr.obj testvsn.obj testipsub.obj \
+TESTS = testutil.obj testtime.obj teststr.obj testvsn.obj testipsub.obj \
testmmap.obj testud.obj testtable.obj testsleep.obj testpools.obj \
testfmt.obj testfile.obj testdir.obj testfileinfo.obj testrand.obj \
testdso.obj testoc.obj testdup.obj testsockets.obj testproc.obj \
testpoll.obj testlock.obj testsockopt.obj testpipe.obj testthread.obj \
testhash.obj testargs.obj testnames.obj testuser.obj testpath.obj \
testenv.obj testprocmutex.obj testrand2.obj testfnmatch.obj \
- testatomic.obj testflock.obj testshm.obj testsock.obj \
- testglobalmutex.obj teststrnatcmp.obj testfilecopy.obj \
- testtemp.obj testlfs.obj testutil.obj
-
-testall.exe: $(TESTS) $(LOCAL_LIBS)
- $(LINK) /debug /subsystem:console /machine:I386 /out:$@ $(TESTS) \
- $(LOCAL_LIBS) $(ALL_LIBS)
+ testatomic.obj testflock.obj testshm.obj testsock.obj testglobalmutex.obj \
+ teststrnatcmp.obj testfilecopy.obj testtemp.obj testlfs.obj
+
+testall.exe: $(TESTS) mod_test.dll occhild.exe \
+ readchild.exe abts.obj proc_child.exe \
+ tryread.exe sockchild.exe globalmutexchild.exe \
+ $(LOCAL_LIBS)
+ $(LINK_PROG) /out:testall.exe $(TESTS) abts.obj $(LOCAL_LIBS) $(ALL_LIBS)
# DO NOT REMOVE
diff --git a/test/aprtest.dsp b/test/aprtest.dsp
index e31b898d0..9d6994f5f 100644
--- a/test/aprtest.dsp
+++ b/test/aprtest.dsp
@@ -191,9 +191,5 @@ SOURCE=.\Makefile
SOURCE=.\Makefile.in
# End Source File
-# Begin Source File
-
-SOURCE=.\MakeWin32Make.awk
-# End Source File
# End Target
# End Project