made src_compile modular
authorMatthias Schwarzott <zzam@gentoo.org>
Fri, 28 Oct 2005 08:58:19 +0000 (08:58 +0000)
committerMatthias Schwarzott <zzam@gentoo.org>
Fri, 28 Oct 2005 08:58:19 +0000 (08:58 +0000)
eclass/vdr-plugin.eclass

index 5a28bd412554ed31aa70c82cce7cb70ea6fd51a5..2f38aeb93bbf4132088ec5fc944cf37e0a661926 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/vdr-plugin.eclass,v 1.6 2005/10/22 20:39:21 zzam Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/vdr-plugin.eclass,v 1.7 2005/10/28 08:58:19 zzam Exp $
 #
 # Author:
 #   Matthias Schwarzott <zzam@gentoo.org>
@@ -155,11 +155,23 @@ vdr-plugin_install_source_tree() {
 }
 
 vdr-plugin_src_compile() {
-       [[ -n "${VDRSOURCE_DIR}" ]] && vdr-plugin_copy_source_tree
+       [ -z "$1" ] && vdr-plugin_src_compile prepare compile
 
-       cd ${S}
+       while [ "$1" ]; do
+
+               case "$1" in
+               prepare)
+                       [[ -n "${VDRSOURCE_DIR}" ]] && vdr-plugin_copy_source_tree
+                       ;;
+               compile)
+                       cd ${S}
 
-       emake ${VDRPLUGIN_MAKE_TARGET:-all} || die "emake failed"
+                       emake ${VDRPLUGIN_MAKE_TARGET:-all} || die "emake failed"
+                       ;;
+               esac
+
+               shift
+       done
 }
 
 vdr-plugin_src_install() {