2 minor glitches
[blender-staging.git] / GNUmakefile
index 9815477dd3931512b301931f215c25db8834fe75..008dfe77eae9fa80e572cf4ce5b36111070ae4b0 100644 (file)
@@ -52,7 +52,7 @@ ifeq ($(OS), Linux)
        NPROCS:=$(shell grep -c ^processor /proc/cpuinfo)
 endif
 ifeq ($(OS), Darwin)
-       NPROCS:=$(shell system_profiler | awk '/Number Of CPUs/{print $4}{next;}')
+       NPROCS:=$(shell sysctl -a | grep "hw.ncpu " | cut -d" " -f3)
 endif
 ifeq ($(OS), FreeBSD)
        NPROCS:=$(shell sysctl -a | grep "hw.ncpu " | cut -d" " -f3 )
@@ -75,7 +75,7 @@ all:
 
        @echo 
        @echo Building Blender ...
-       cd $(BUILD_DIR) ; make -s -j $(NPROCS)
+       cd $(BUILD_DIR) ; make -s -j $(NPROCS) install
        @echo 
        @echo run blender from "$(BUILD_DIR)/bin/blender"
        @echo 
@@ -85,15 +85,29 @@ debug: all
 
 # package types
 package_debian:
-       cd build_files/package_spec ; sh ./build_debian.sh
+       cd build_files/package_spec ; DEB_BUILD_OPTIONS="parallel=$(NPROCS)" sh ./build_debian.sh
 
 package_pacman:
-       cd build_files/package_spec/pacman ; makepkg --asroot
+       cd build_files/package_spec/pacman ; MAKEFLAGS="-j$(NPROCS)" makepkg --asroot
+
+package_archive:
+       cd $(BUILD_DIR) ; make -s package_archive
+       @echo archive in "$(BUILD_DIR)/release"
 
 # forward build targets
 test:
        cd $(BUILD_DIR) ; ctest . --output-on-failure
 
+# run pep8 check check on scripts we distribute.
+test_pep8:
+       python source/tests/pep8.py > test_pep8.log 2>&1
+       @echo "written: test_pep8.log"
+
+# run some checks on our cmakefiles.
+test_cmake:
+       python build_files/cmake/cmake_consistency_check.py > test_cmake_consistency.log 2>&1
+       @echo "written: test_cmake_consistency.log"
+
 clean:
        cd $(BUILD_DIR) ; make clean