office-gobmx/dmake/tests/misc-5
Jens-Heiner Rechtien 29987d2fd2 INTEGRATION: CWS dmake43p01 (1.1.2); FILE ADDED
2005/10/11 17:48:48 vq 1.1.2.1: #i54938# Add testcase for .INCLUDE generation in parallel builds.
2006-04-20 11:16:51 +00:00

49 lines
1,004 B
Bash
Executable file

#!/bin/sh
# 06.10.2005 Volker Quetschke
# Test if infered makefile generation works.
# (issue 54938)
: ${DMAKEPROG:=dmake}
file1="mymakefile.mk"
file2="incfile.mk"
file3="incfiledepend"
tmpfiles="$file1 $file2 $file3"
trap '{ echo "trapped signal - removing temporary files" ; rm -rf $tmpfiles ; }' 1 2 3 15
# Remove files from prior failed run
rm -rf $tmpfiles
# Remember to quote variables in generated makefiles( $ -> \$ ).
cat > $file1 <<EOT
# Verify that makefile generation is finished when using it
SHELL*:=/bin/sh
SHELLFLAGS*:=-ce
incfile.mk : incfiledepend
+@echo AA:=123 > \$@
incfiledepend :
+@sleep 1
+@echo 1234 > \$@
.INCLUDE : incfile.mk
all :
+@echo aa:\$(AA):bb
EOT
output=$(${DMAKEPROG} -r -P2 -f $file1 all)
result=$?
# The space between aaa and bbb comes from the +=
if test "$output" != "aa:123:bb"; then
echo "Wrong result"
result=1
fi
test $result -eq 0 && echo "Success - Cleaning up" && rm -f ${tmpfiles}
test $result -ne 0 && echo "Failure!"
exit $result