summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichael Palimaka <kensington@gentoo.org>2014-01-18 01:17:04 +1100
committerMichael Palimaka <kensington@gentoo.org>2014-01-18 01:17:04 +1100
commitbf6612f410dd0a62f85b61c17f7b0610203ed09c (patch)
tree2599f93a7edc7ce25c8db696d93991e3605e95a1 /eclass
parent151a46abf3b1191b64ec9a908852f25fdbc1c715 (diff)
downloadkde-bf6612f410dd0a62f85b61c17f7b0610203ed09c.tar.gz
kde-bf6612f410dd0a62f85b61c17f7b0610203ed09c.tar.bz2
kde-bf6612f410dd0a62f85b61c17f7b0610203ed09c.zip
[eclass] Only try to sed CMakeLists.txt if it exists.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/kde4-functions.eclass7
1 files changed, 4 insertions, 3 deletions
diff --git a/eclass/kde4-functions.eclass b/eclass/kde4-functions.eclass
index 64f26df6262..830dcf68777 100644
--- a/eclass/kde4-functions.eclass
+++ b/eclass/kde4-functions.eclass
@@ -133,9 +133,10 @@ comment_add_subdirectory() {
die "comment_add_subdirectory must be passed the directory name to comment"
fi
- sed -e "/add_subdirectory[[:space:]]*([[:space:]]*${1}[[:space:]]*)/s/^/#DONOTCOMPILE /" \
- -i CMakeLists.txt || die "failed to comment add_subdirectory(${1})"
-
+ if [[ -a "CMakeLists.txt" ]]; then
+ sed -e "/add_subdirectory[[:space:]]*([[:space:]]*${1}[[:space:]]*)/s/^/#DONOTCOMPILE /" \
+ -i CMakeLists.txt || die "failed to comment add_subdirectory(${1})"
+ fi
}
# @FUNCTION: comment_all_add_subdirectory