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

Last change on this file since 13975 was 13975, checked in by randersson, 5 weeks ago

#5819 Added missing space

File size: 2.9 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        cd $(ASSIMULO_SRC) && \
24        find . -type f | grep -v -E '/.svn|.pyc' |tar c -T - | tar x -C $(TARGET_BUILD_DIR)
25        cd $(TARGET_BUILD_DIR); \
26        $(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)
27
28install: folder
29        @echo "makefile: Got PREINSTALL_DIR=$(PREINSTALL_DIR)"
30        mkdir -p $(INSTALL_DIR_FOLDER)
31        cd $(PREINSTALL_DIR); \
32        find $(PREINSTALL_DIR) -type d -name assimulo -exec cp -r {} $(INSTALL_DIR_FOLDER)/ \;
33
34wheel: $(INSTALL_DIR_FOLDER)/wheel
35
36$(INSTALL_DIR_FOLDER)/wheel:
37        @$(eval TARGET_BUILD_DIR=$(BUILD_DIR)/wheel_build)
38        mkdir -p $(TARGET_BUILD_DIR)
39        mkdir -p $@
40        cd $(ASSIMULO_SRC) && \
41        find . -type f | grep -v -E '/.svn|.pyc' |tar c -T - -f - | tar x -C $(TARGET_BUILD_DIR)
42        cd $(TARGET_BUILD_DIR); \
43        $(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); \
44        find -type f -name Assimulo*.whl -exec cp {} $@/ \;
45
46clean:
47        @$(eval TARGET_BUILD_DIR=$(BUILD_DIR)/Assimulo_build*)
48        rm -rf $(TARGET_BUILD_DIR) $(INSTALL_DIR_FOLDER)
49        ifeq ($(REMOVE_PREINSTALL_DIR), yes)
50                @echo "Removing $(PREINSTALL_DIR)" && rm -rf $(PREINSTALL_DIR)
51        endif
52
53#
54#       Copyright (C) 2018 Modelon AB
55#
56#       This program is free software: you can redistribute it and/or modify
57#       it under the terms of the GNU General Public License version 3 as published
58#       by the Free Software Foundation, or optionally, under the terms of the
59#       Common Public License version 1.0 as published by IBM.
60#
61#       This program is distributed in the hope that it will be useful,
62#       but WITHOUT ANY WARRANTY; without even the implied warranty of
63#       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
64#       GNU General Public License, or the Common Public License, for more details.
65#
66#       You should have received copies of the GNU General Public License
67#       and the Common Public License along with this program.  If not,
68#       see <http://www.gnu.org/licenses/> or
69#       <http://www.ibm.com/developerworks/library/os-cpl.html/> respectively.
Note: See TracBrowser for help on using the repository browser.