diff options
author | Boris Nagaev <bnagaev@gmail.com> | 2016-07-25 13:49:13 +0400 |
---|---|---|
committer | Timothy Gu <timothygu99@gmail.com> | 2016-07-25 02:49:13 -0700 |
commit | e19bf0763a69fef461adc3f133b82eb41ac954de (patch) | |
tree | 02b730ccc62538adab1f65a9c03f65653c284c0b | |
parent | 00d5cd182732c6bfc431f0e4f38e1b18647ce938 (diff) | |
download | dlfcn-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-- | .gitignore | 4 | ||||
-rw-r--r-- | Makefile | 6 | ||||
-rwxr-xr-x | configure | 6 |
3 files changed, 12 insertions, 4 deletions
@@ -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 | ||
238 | tmptest.c | ||
239 | tmptest.dll | ||
@@ -70,7 +70,11 @@ test: $(TARGETS) test.exe testdll.dll | |||
70 | $(WINE) test.exe | 70 | $(WINE) test.exe |
71 | 71 | ||
72 | clean:: | 72 | clean:: |
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 | ||
75 | distclean: clean | 79 | distclean: clean |
76 | rm -f config.mak | 80 | rm -f config.mak |
@@ -154,13 +154,13 @@ disabled shared && disabled static && { | |||
154 | } | 154 | } |
155 | 155 | ||
156 | # simple cc test | 156 | # simple cc test |
157 | cat > /tmp/test.c << EOF | 157 | cat > tmptest.c << EOF |
158 | #include <windows.h> | 158 | #include <windows.h> |
159 | void function(void) | 159 | void function(void) |
160 | { LoadLibrary(NULL); } | 160 | { LoadLibrary(NULL); } |
161 | EOF | 161 | EOF |
162 | echo testing compiler: $cc -shared -o /tmp/test.dll /tmp/test.c | 162 | echo 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 | ||
165 | test "$?" != 0 && { | 165 | test "$?" != 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."; |