add some checks for the existence of directories/makefiles to dummy_mk
authorAlexis Ballier <aballier@gentoo.org>
Wed, 2 Nov 2011 22:55:56 +0000 (22:55 +0000)
committerAlexis Ballier <aballier@gentoo.org>
Wed, 2 Nov 2011 22:55:56 +0000 (22:55 +0000)
eclass/bsdmk.eclass

index d46a76bc825a06f376b338f11d9ed78ef47ca1ce..57cf32c50658a908cac4c94985a018533c4393d8 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2008 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/bsdmk.eclass,v 1.9 2008/08/08 21:16:24 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/bsdmk.eclass,v 1.10 2011/11/02 22:55:56 aballier Exp $
 
 # @ECLASS: bsdmk.eclass
 # @MAINTAINER:
@@ -64,6 +64,8 @@ mkinstall() {
 # useful to remove the need for "minimal" patches
 dummy_mk() {
        for dir in $@; do
+               [ -d ${dir} ] || ewarn "dummy_mk called on a non-existing directory: $dir"
+               [ -f ${dir}/Makefile ] || ewarn "dummy_mk called on a directory without Makefile: $dir"
                echo ".include <bsd.lib.mk>" > ${dir}/Makefile
        done
 }