Add ipkg option to specify installation directory
[hvlinux.git] / functions / main
index dea3d93..2801230 100644 (file)
@@ -870,6 +870,7 @@ indicate_pkg_build_complete()
 # Options:
 #   -c     Do not decompress package
 #   -d DIR Change to directory DIR before configuring and building.
+#   -i DIR Installation directory (for cross-compilation, stage1)
 #   -j     Disable parallel make for this package
 #   -l     Unique identification label in 'install.log'
 #          (default is package name and version)
@@ -892,11 +893,12 @@ ipkg()
     export SRC_DIR="" # Global variable, source directory
     export BUILD_DIR="" # Global variable, build directory
     export SRC_SUBDIR="" # Global variable
+    export INSTALL_DIR="" # Global variable, installation directory
     export ENABLE_DEPENDENCY_TRACKING="0"
 
     local HVMAKE_ORIG=${HVMAKE}
 
-    while getopts "cd:jl:m:s:t" flag ;do
+    while getopts "cd:i:jl:m:s:t" flag ;do
         case ${flag} in
             c)
                 # Do not decompress package
@@ -905,6 +907,9 @@ ipkg()
             d)
                 SRC_SUBDIR=${OPTARG}
                ;;
+            i)
+                INSTALL_DIR=${OPTARG}
+               ;;
             j)
                 # Disable parallel make only for this package
                 HVMAKE="make"