Salome HOME
debug intempestif
[tools/eficas.git] / config / GNUmakefile.env
1 ############# ENVIRONEMENT DE CONSTRUCTION VIMMP Traning ################
2
3 ifndef SHELL
4 SHELL=bash
5 endif
6
7 ifndef confdir
8 $(error "La variable confdir doit être définie pour utiliser GNUmakefile.env"
9 endif
10 ifndef tooldir
11 $(error "La variable confdir doit être définie pour utiliser GNUmakefile.env"
12 endif
13
14 # " pour emacs beautifying
15 define _SCRIPT_ENV
16 cat <<EOF > $1
17 $(QTDEF)
18 export PYTHONPATH=${PYTHONPATH}:\$${PYTHONPATH}
19 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:\$${LD_LIBRARY_PATH}
20 export PATH=${PYXB_ROOT_DIR}/bin:${PATH}:\$${PATH}
21 \$$*
22 EOF
23 endef
24 export SCRIPT_ENV = $(call _SCRIPT_ENV,environ.sh)
25
26 ## Création d'un fichier avec l'environement minimal utilisé au moment de la construction pour lancer ./qtEficas
27 #  Ce fichier peut être utilisé pour lancer un binaire ds le même environement
28 #   sans charger l'ensemble des pre-requis SALOME
29 define _SCRIPT_EXEC
30 cat <<EOF > $1
31 $(QTDEF)
32 export PYTHONPATH=${PYTHONPATH}
33 export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
34 export PATH=${PYXB_ROOT_DIR}/bin:${PATH}
35 \$$*
36 EOF
37 endef
38 #export SCRIPT_EXEC = $(value _SCRIPT_EXEC)
39 #On veut l'évaluation des variables ds le shell pour avoir le contenu identique à la construction.
40 export SCRIPT_EXEC = $(call _SCRIPT_EXEC,exec.sh)
41
42 define _SCRIPT_EFI
43 cat <<EOF > $1
44 DIR="\$$( cd "\$$( dirname "\$$0" )" && pwd )"
45
46 \$${DIR}/exec.sh $(realpath $(tooldir))/qtEficasGui.py \$$*
47
48 #./exec.sh $(realpath $(tooldir))/qtEficasGui.py \$$*
49 EOF
50 endef
51 export SCRIPT_EFI = $(call _SCRIPT_EFI,qtEficas.sh)
52
53 exec.sh: $(confdir)/GNUmakefile.env $(confdir)/GNUmakefile.mdm
54         @eval "$$SCRIPT_EXEC" && chmod +x $@
55         @echo "You may use source exec.sh to launch a command using the minimal prerequisites without modifying your environement, thanks."
56 #       @echo "-----------------> $(QTDEF)" | cat -A -
57
58 environ.sh: $(confdir)/GNUmakefile.env $(confdir)/GNUmakefile.mdm
59         @eval "$$SCRIPT_ENV" && chmod +x $@
60         @echo "You may use source environ.sh to get the minimal prerequisites in your environement, thanks."
61
62 qtEficas.sh: $(confdir)/GNUmakefile.env $(confdir)/GNUmakefile.mdm $(confdir)/../UiQT5/eficas_en.qm $(confdir)/../UiQT5/eficas_fr.qm
63         @eval "$$SCRIPT_EFI" && chmod +x $@
64         @echo "You may use qtEficas.sh -c /abs/path/to/your/catalog to launch Eficas GUI from your current directory, thanks."
65
66 $(confdir)/../UiQT5/eficas_en.qm $(confdir)/../UiQT5/eficas_fr.qm:
67         make -C $(confdir)/../UiQT5