Eliminate use of mktemp in Makefile (not always available).

This commit is contained in:
Mark Adler 2012-05-20 11:32:13 -07:00
parent 6a181356bd
commit 0a2c92bc66

View File

@ -83,7 +83,7 @@ check: test
test: all teststatic testshared
teststatic: static
@TMPST=`mktemp fooXXXXXX`; \
@TMPST=tmpst_$$; \
if echo hello world | ./minigzip | ./minigzip -d && ./example $$TMPST ; then \
echo ' *** zlib test OK ***'; \
else \
@ -96,7 +96,7 @@ testshared: shared
LD_LIBRARYN32_PATH=`pwd`:$(LD_LIBRARYN32_PATH) ; export LD_LIBRARYN32_PATH; \
DYLD_LIBRARY_PATH=`pwd`:$(DYLD_LIBRARY_PATH) ; export DYLD_LIBRARY_PATH; \
SHLIB_PATH=`pwd`:$(SHLIB_PATH) ; export SHLIB_PATH; \
TMPSH=`mktemp fooXXXXXX`; \
TMPSH=tmpsh_$$; \
if echo hello world | ./minigzipsh | ./minigzipsh -d && ./examplesh $$TMPSH; then \
echo ' *** zlib shared test OK ***'; \
else \
@ -105,7 +105,7 @@ testshared: shared
rm -f $$TMPSH
test64: all64
@TMP64=`mktemp fooXXXXXX`; \
@TMP64=tmp64_$$; \
if echo hello world | ./minigzip64 | ./minigzip64 -d && ./example64 $$TMP64; then \
echo ' *** zlib 64-bit test OK ***'; \
else \
@ -230,7 +230,7 @@ zlib.3.pdf: zlib.3
groff -mandoc -f H -T ps zlib.3 | ps2pdf - zlib.3.pdf
zconf.h.cmakein: zconf.h.in
-@ TEMPFILE=`mktemp __XXXXXX`; \
-@ TEMPFILE=zconfh_$$; \
echo "/#define ZCONF_H/ a\\\\\n#cmakedefine Z_PREFIX\\\\\n#cmakedefine Z_HAVE_UNISTD_H\n" >> $$TEMPFILE &&\
sed -f $$TEMPFILE zconf.h.in > zconf.h.cmakein &&\
touch -r zconf.h.in zconf.h.cmakein &&\