aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Nagaev <bnagaev@gmail.com>2016-07-25 13:49:13 +0400
committerTimothy Gu <timothygu99@gmail.com>2016-07-25 02:49:13 -0700
commite19bf0763a69fef461adc3f133b82eb41ac954de (patch)
tree02b730ccc62538adab1f65a9c03f65653c284c0b
parent00d5cd182732c6bfc431f0e4f38e1b18647ce938 (diff)
downloaddlfcn-win32-e19bf0763a69fef461adc3f133b82eb41ac954de.tar.gz
dlfcn-win32-e19bf0763a69fef461adc3f133b82eb41ac954de.tar.bz2
dlfcn-win32-e19bf0763a69fef461adc3f133b82eb41ac954de.zip
configure: put test.{c,dll} to current directory (#26)
instead of /tmp/ to avoid races when building for multiple targets. Add test files to .gitignore and `make clean`.
-rw-r--r--.gitignore4
-rw-r--r--Makefile6
-rwxr-xr-xconfigure6
3 files changed, 12 insertions, 4 deletions
diff --git a/.gitignore b/.gitignore
index e787664..7c2cf35 100644
--- a/.gitignore
+++ b/.gitignore
@@ -233,3 +233,7 @@ FakesAssemblies/
233 233
234# Visual Studio 6 workspace options file 234# Visual Studio 6 workspace options file
235*.opt 235*.opt
236
237# test files produced by ./configure
238tmptest.c
239tmptest.dll
diff --git a/Makefile b/Makefile
index aec9ba8..c02dce0 100644
--- a/Makefile
+++ b/Makefile
@@ -70,7 +70,11 @@ test: $(TARGETS) test.exe testdll.dll
70 $(WINE) test.exe 70 $(WINE) test.exe
71 71
72clean:: 72clean::
73 rm -f dlfcn.o libdl.dll libdl.a libdl.def libdl.dll.a libdl.lib libdl.exp test.exe testdll.dll 73 rm -f \
74 dlfcn.o \
75 libdl.dll libdl.a libdl.def libdl.dll.a libdl.lib libdl.exp \
76 tmptest.c tmptest.dll \
77 test.exe testdll.dll
74 78
75distclean: clean 79distclean: clean
76 rm -f config.mak 80 rm -f config.mak
diff --git a/configure b/configure
index 91f7d07..78b1e85 100755
--- a/configure
+++ b/configure
@@ -154,13 +154,13 @@ disabled shared && disabled static && {
154} 154}
155 155
156# simple cc test 156# simple cc test
157cat > /tmp/test.c << EOF 157cat > tmptest.c << EOF
158#include <windows.h> 158#include <windows.h>
159void function(void) 159void function(void)
160{ LoadLibrary(NULL); } 160{ LoadLibrary(NULL); }
161EOF 161EOF
162echo testing compiler: $cc -shared -o /tmp/test.dll /tmp/test.c 162echo testing compiler: $cc -shared -o tmptest.dll tmptest.c
163$cc -shared -o /tmp/test.dll /tmp/test.c 163$cc -shared -o tmptest.dll tmptest.c
164 164
165test "$?" != 0 && { 165test "$?" != 0 && {
166 echo "$cc could not create shared file with Windows API functions."; 166 echo "$cc could not create shared file with Windows API functions.";