summaryrefslogtreecommitdiffstats
path: root/bootstrap
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-06-10 17:39:40 (GMT)
committerBrad King <brad.king@kitware.com>2009-06-10 17:39:40 (GMT)
commit7797237629739cc370c396cf7252996aa3af57bf (patch)
tree0860e1a020a4f34b598c2d95aee944af50820f55 /bootstrap
parenta32754093dfbccbcb05873984ce21711fe1eacdf (diff)
downloadCMake-7797237629739cc370c396cf7252996aa3af57bf.zip
CMake-7797237629739cc370c396cf7252996aa3af57bf.tar.gz
CMake-7797237629739cc370c396cf7252996aa3af57bf.tar.bz2
BUG: Fix bootstrap for Debian Almquist Shell
The Debian Almquist Shell (dash) provides minimal POSIX compliance instead of the power of bash. It converts literal '\n' to a real newline even in a single-quoted string. This works around the problem by avoiding the literal. We can no longer use HEREDOC.
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap4
1 files changed, 2 insertions, 2 deletions
diff --git a/bootstrap b/bootstrap
index 5cc5139..113cbb9 100755
--- a/bootstrap
+++ b/bootstrap
@@ -672,7 +672,7 @@ int main(argc, argv)
int main(int argc, char* argv[])
#endif
{
- printf("%d\n", (argv != 0));
+ printf("%d%c", (argv != 0), (char)0x0a);
return argc-1;
}
' > "${TMPFILE}.c"
@@ -771,7 +771,7 @@ test: test.c
'>"Makefile"
echo '
#include <stdio.h>
-int main(){ printf("1\n"); return 0; }
+int main(){ printf("1%c", (char)0x0a); return 0; }
' > "test.c"
cmake_original_make_flags="${cmake_make_flags}"
if [ "x${cmake_parallel_make}" != "x" ]; then