source: branches/dev-5819/external/build_externals/build/assimulo/makefile @ 13813

Last change on this file since 13813 was 13813, checked in by randersson, 8 weeks ago

#5819 Fixed tab in makefile

File size: 2.8 KB
Line 
1
2include default_config
3include $(USER_CONFIG)
4
5.PHONY: wheel folder
6
7test:
8        nosetests tests/*.pyc tests/solvers/*.pyc
9
10test_wheel: $(INSTALL_DIR_FOLDER)/$(subst test_,,$@)
11        @pip install $(INSTALL_DIR_FOLDER)/$(subst test_,,$@)/*.whl
12        nosetests $(WHEEL_INSTALL_DIR)/tests/*.pyc $(WHEEL_INSTALL_DIR)/tests/solvers/*.pyc
13
14test_folder: $(INSTALL_DIR_FOLDER)/$(subst test_,,$@)
15        nosetests $(ASSIMULO_FOLDER_INSTALL_DIR)/tests/*.pyc $(ASSIMULO_FOLDER_INSTALL_DIR)/tests/solvers/*.pyc
16
17folder: $(PREINSTALL_DIR)
18
19$(PREINSTALL_DIR):
20        @$(eval TARGET_BUILD_DIR=$(BUILD_DIR)/Assimulo_build$(BITNESS))
21        mkdir -p $(TARGET_BUILD_DIR)
22        mkdir -p $@
23
24        cd $(ASSIMULO_SRC) && \
25        find . -type f | grep -v -E '/.svn|.pyc' |tar c -T - | tar x -C $(TARGET_BUILD_DIR)
26        cd $(TARGET_BUILD_DIR); \
27        $(PYTHONHOME)python setup.py $(BUILD_SETUP_EXTRA) install --superlu-home=$(SUPERLU_HOME) --sundials-home=$(SUNDIALS_HOME) --sundials-with-superlu=True --blas-home=$(BLAS_HOME) --lapack-home=$(LAPACK_HOME) $(EXTRA_SETUP_ARGS) --prefix=$@ --mkl-home=$(MKL_HOME)
28
29install: folder
30        @echo "makefile: Got PREINSTALL_DIR=$(PREINSTALL_DIR)"
31        mkdir -p $(INSTALL_DIR_FOLDER)
32        cd $(PREINSTALL_DIR); \
33        find $(PREINSTALL_DIR) -type d -name assimulo -exec cp -r {} $(INSTALL_DIR_FOLDER)/ \;
34
35wheel: $(INSTALL_DIR_FOLDER)/wheel
36
37$(INSTALL_DIR_FOLDER)/wheel:
38        @$(eval TARGET_BUILD_DIR=$(BUILD_DIR)/wheel_build)
39        mkdir -p $(TARGET_BUILD_DIR)
40        mkdir -p $@
41        cd $(ASSIMULO_SRC) && \
42        find . -type f | grep -v -E '/.svn|.pyc' |tar c -T - -f - | tar x -C $(TARGET_BUILD_DIR)
43        cd $(TARGET_BUILD_DIR); \
44        $(PYTHONHOME)python setup.py $(BUILD_SETUP_EXTRA) bdist_wheel --superlu-home=$(SUPERLU_HOME) --sundials-home=$(SUNDIALS_HOME) --sundials-with-superlu=True --blas-home=$(BLAS_HOME) --lapack-home=$(LAPACK_HOME) --mkl-home=$(MKL_HOME) $(EXTRA_SETUP_ARGS); \
45        find -type f -name Assimulo*.whl -exec cp {} $@/ \;
46
47clean:
48        @$(eval TARGET_BUILD_DIR=$(BUILD_DIR)/Assimulo_build$(BITNESS))
49        rm -rf $(TARGET_BUILD_DIR) $(INSTALL_DIR_FOLDER)
50
51#
52#       Copyright (C) 2018 Modelon AB
53#
54#       This program is free software: you can redistribute it and/or modify
55#       it under the terms of the GNU General Public License version 3 as published
56#       by the Free Software Foundation, or optionally, under the terms of the
57#       Common Public License version 1.0 as published by IBM.
58#
59#       This program is distributed in the hope that it will be useful,
60#       but WITHOUT ANY WARRANTY; without even the implied warranty of
61#       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
62#       GNU General Public License, or the Common Public License, for more details.
63#
64#       You should have received copies of the GNU General Public License
65#       and the Common Public License along with this program.  If not,
66#       see <http://www.gnu.org/licenses/> or
67#       <http://www.ibm.com/developerworks/library/os-cpl.html/> respectively.
Note: See TracBrowser for help on using the repository browser.