install using fakeroot only when component requests it
authorTimo Savola <tsavola@movial.fi>
Tue, 20 May 2008 12:49:18 +0000 (15:49 +0300)
committerTimo Savola <tsavola@movial.fi>
Tue, 20 May 2008 12:49:18 +0000 (15:49 +0300)
scripts/matrix.mk
scripts/run.sh
scripts/styles/autotools.mk
scripts/styles/custom.mk
scripts/styles/make.mk

index c37b60131f31b14615e684dd38bb96d10b517363..7ba0a9cfe025b10ffdee0c12bb8bf69bbb95c4f2 100644 (file)
@@ -9,6 +9,10 @@
 
 include meta/plug
 
+ifneq ($(FAKEROOT),)
+FAKEROOT_INSTALL       := fakeroot -s $(MATRIX_WORKDIR)/meta/fakedb
+endif
+
 __MATRIX_BUILD_STYLE_FILE := $(MATRIX_SCRIPTDIR)/styles/$(MATRIX_BUILD_STYLE).mk
 __MATRIX_BUILD_STYLES = $(patsubst %.mk,%,$(notdir $(wildcard $(MATRIX_SCRIPTDIR)/styles/*.mk)))
 
index ba127ff01778a35d0aafa9f787b73be2d1d995d2..f0d306feec538f65a321e2ac5dfb0d9c9ea4fed3 100644 (file)
@@ -6,19 +6,12 @@ then
        MAKE="make"
 fi
 
-if [ "$MATRIX_ACTION" = "install" ]
-then
-       FAKEROOT="fakeroot -s $MATRIX_WORKDIR/meta/fakedb"
-else
-       FAKEROOT=
-fi
-
 MAKEFILE="$MATRIX_SCRIPTDIR/matrix.mk"
 TARGET="__matrix_$MATRIX_ACTION"
 
 if [ "$MATRIX_VERBOSE" ]
 then
-       $FAKEROOT $MAKE \
+       $MAKE \
                --no-print-directory \
                -j "$MATRIX_JOBS" \
                -C "$MATRIX_WORKDIR" \
@@ -27,7 +20,7 @@ then
                2>&1 | tee $MATRIX_LOG
        exit ${PIPESTATUS[0]}
 else
-       exec $FAKEROOT $MAKE \
+       exec $MAKE \
                --no-print-directory \
                -j "$MATRIX_JOBS" \
                -C "$MATRIX_WORKDIR" \
index 66d662f47143a738fc17a7f70a7f7b7e8349906c..c9feb76c8b454c805803b2251a1448719428fa07 100644 (file)
@@ -84,9 +84,9 @@ endif
 
 __install:
 ifdef MATRIX_OBJ_DIR
-       @cd $(MATRIX_OBJ_DIR) && $(MATRIX_INSTALL_ENV) $(CCTOOL_INSTALL) $(MAKE) install $(MATRIX_INSTALL_ARGS)
+       @cd $(MATRIX_OBJ_DIR) && $(MATRIX_INSTALL_ENV) $(FAKEROOT_INSTALL) $(CCTOOL_INSTALL) $(MAKE) install $(MATRIX_INSTALL_ARGS)
 else
-       @$(MATRIX_INSTALL_ENV) $(CCTOOL_INSTALL) $(MAKE) install $(MATRIX_INSTALL_ARGS)
+       @$(MATRIX_INSTALL_ENV) $(FAKEROOT_INSTALL) $(CCTOOL_INSTALL) $(MAKE) install $(MATRIX_INSTALL_ARGS)
 endif
 
 
index 6ee2b36c9de60205426a2b37af964683b3dddeaf..0523d7d1682de6db12cbd6e7b6a8117cf4a149af 100644 (file)
@@ -17,4 +17,4 @@ __build: __configure build
 
 # this can't have any requisites as that would trigger a rebuild
 __install:
-       @$(CCTOOL_INSTALL) $(MAKE) -f meta/plug install
+       @$(FAKEROOT_INSTALL) $(CCTOOL_INSTALL) $(MAKE) -f meta/plug install
index bea02ac595e515f134207f184156950bdb3b88fc..7bd898403dcc1ffb2f19d5f1cbe471de1dc3152f 100644 (file)
@@ -11,6 +11,6 @@ __matrix_build:
        @$(CCTOOL_BUILD) $(MAKE) $(MATRIX_BUILD_ARGS)
 
 __matrix_install:
-       @$(CCTOOL_INSTALL) $(MAKE) $(MATRIX_INSTALL_ARGS) install
+       @$(FAKEROOT_INSTALL) $(CCTOOL_INSTALL) $(MAKE) $(MATRIX_INSTALL_ARGS) install
 
 .PHONY: __matrix_build __matrix_install