diff options
author | Shinichiro Hamaji <hamaji@google.com> | 2016-02-29 20:07:39 +0900 |
---|---|---|
committer | Shinichiro Hamaji <hamaji@google.com> | 2016-02-29 20:07:39 +0900 |
commit | 505d0d2b02791d1ab86df0bfa9c8726ba32026f9 (patch) | |
tree | cb2662f728c9eedcd378e6bffdfb437d8dd4d291 /testcase/ninja_mkdir.sh | |
parent | 086b17663573f0d2742c534885a787c6d98216b9 (diff) | |
download | android_build_kati-505d0d2b02791d1ab86df0bfa9c8726ba32026f9.tar.gz android_build_kati-505d0d2b02791d1ab86df0bfa9c8726ba32026f9.tar.bz2 android_build_kati-505d0d2b02791d1ab86df0bfa9c8726ba32026f9.zip |
Revert "Revert "Merge remote-tracking branch 'aosp/upstream'""
This reverts commit 086b17663573f0d2742c534885a787c6d98216b9.
Diffstat (limited to 'testcase/ninja_mkdir.sh')
-rw-r--r-- | testcase/ninja_mkdir.sh | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/testcase/ninja_mkdir.sh b/testcase/ninja_mkdir.sh new file mode 100644 index 0000000..e54298d --- /dev/null +++ b/testcase/ninja_mkdir.sh @@ -0,0 +1,42 @@ +#!/bin/sh +# +# Copyright 2016 Google Inc. All rights reserved +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http:#www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -e + +log=/tmp/log +mk="$@" + +cat <<EOF > Makefile +test: a/b + +a/b: + @mkdir -p \$(dir \$@) + touch \$@ +EOF + +${mk} 2> ${log} +if [ -e ninja.sh ]; then + ./ninja.sh +fi +if [[ ! -d a ]]; then + echo "Created 'a'" +fi +if [ -e ninja.sh ]; then + if grep -q "mkdir -p" build.ninja; then + echo "Should not include 'mkdir -p' in build.ninja" + echo "Ninja will automatically create this directory" + fi +fi |