Debian Codegraph @

Makefile

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 DESTDIR =
2 EYES17_ONLY = $(shell ls build_eyes17_only 2>/dev/null)
3 SUBDIRS = po clib/expeyes-clib
4 ifeq ($(EYES17_ONLY), build_eyes17_only)
5 SUBDIRS =
6 endif
7
8 SUBDIRS_INDEP = expeyes-web \
9 microhope microhope/po microhope/microhope-doc \
10 eyes17 eyes17/lang eyes17/layouts eyes17/helpFiles \
11 eyesjunior/lang eyesjunior/layouts eyesjunior/helpFiles \
12 bin
13 ifeq ($(EYES17_ONLY), build_eyes17_only)
14 SUBDIRS_INDEP = eyes17 eyes17/lang eyes17/layouts eyes17/helpFiles
15 endif
16
17 LANGS = ${wildcard eyes17/helpFiles| grep '^..$$'}
18 THIS_DIR = ${shell pwd}
19
20 all: all_arch all_indep all_firmware
21
22 all_arch:
23 python3 setup.py build
24 for d in $(SUBDIRS); do \
25 if [ -f $$d/configure.ac ]; then \
26 (cd $$d; autoreconf --install;) \
27 fi; \
28 if [ -x $$d/configure ]; then \
29 (cd $$d; ./configure --prefix=/usr; $(MAKE) all;) \
30 else \
31 $(MAKE) -C $$d all; \
32 fi; \
33 done
34
35 all_indep:
36 for d in $(SUBDIRS_INDEP); do \
37 $(MAKE) -C $$d all; \
38 done
39
40 all_firmware:
41 if [ -z "$(EYES17_ONLY)" ]; then \
42 for d in firmware kuttyPy/firmware microhope/firmware; do \
43 $(MAKE) -C $$d all; \
44 done; \
45 fi
46
47 clean_firmware: clean
48 # clean the bootloader hex file
49 make -C microhope/firmware clean
50
51 install: install_arch install_indep
52
53 install_arch: all_arch
54 # for python3-expeyes
55 if grep -Eq "Debian|Ubuntu" /etc/issue; then \
56 python3 setup.py install --install-layout=deb \
57 --root=$(DESTDIR)/ --prefix=/usr; \
58 else \
59 python3 setup.py install --root=$(DESTDIR)/ --prefix=/usr; \
60 fi
61 install -d $(DESTDIR)/lib/udev/rules.d/
62 install -m 644 99-phoenix.rules $(DESTDIR)/lib/udev/rules.d/
63 ## for expeyes
64 #install -d $(DESTDIR)/usr/share/expeyes
65 #cp -a eyes $(DESTDIR)/usr/share/expeyes
66 ## icons
67 install -d $(DESTDIR)/usr/share/icons
68 #install -m 644 pixmaps/expeyes-logo.png \
69 # $(DESTDIR)/usr/share/icons/expeyes.png
70 #install -m 644 pixmaps/expeyes-junior-icon.png \
71 # $(DESTDIR)/usr/share/icons
72 install -m 644 pixmaps/eyes17-logo.png \
73 $(DESTDIR)/usr/share/icons
74 #install -m 644 pixmaps/expeyes-progman-jr-doc.png \
75 # $(DESTDIR)/usr/share/icons
76 #install -m 644 pixmaps/expeyes-progman-jr-doc.svg \
77 # $(DESTDIR)/usr/share/icons
78 #install -m 644 pixmaps/nuclear-icon.png \
79 # $(DESTDIR)/usr/share/icons
80 ## desktop files
81 install -d $(DESTDIR)/usr/share/applications
82 #install -m 644 desktop/expeyes.desktop \
83 # desktop/expeyes-junior.desktop desktop/Phoenix-ASM.desktop
84 install -m644 desktop/expeyes-17.desktop \
85 $(DESTDIR)/usr/share/applications
86 #$(MAKE) -C po install DESTDIR=$(DESTDIR)
87 # for expeyes-doc-common
88 install -d $(DESTDIR)/usr/share/icons
89 # install -m 644 pixmaps/*doc.png $(DESTDIR)/usr/share/icons
90 install -d $(DESTDIR)/usr/share/applications
91 install -m 644 desktop/eyes17-doc.desktop $(DESTDIR)/usr/share/applications
92 # subdirs stuff
93 for d in $(SUBDIRS); do \
94 [ ! -f $$d/Makefile ] || $(MAKE) -C $$d install DESTDIR=$(DESTDIR); \
95 done
96 ## fix permissions in /usr/share/expeyes
97 #find $(DESTDIR)/usr/share/expeyes -type f -exec chmod 644 {} \;
98 ## for expeyes-clib
99 #rm -f $(DESTDIR)/usr/share/expeyes/clib
100 #ln -s /usr/lib/expeyes $(DESTDIR)/usr/share/expeyes/clib
101
102 DOCDIR_17 = $(DESTDIR)/usr/share/eyes17/doc
103 DEBIAN_DOCDIR = $(DESTDIR)/usr/share/doc/eyes17
104
105 install_indep: all_indep
106 for d in $(SUBDIRS_INDEP); do \
107 [ ! -f $$d/Makefile ] || $(MAKE) -C $$d install DESTDIR=$(DESTDIR); \
108 done
109 # copy eyes17 docs' locations expEYES-17.{pdf|epub} to eyes17.{pdf|epub}
110 mkdir -p $(DOCDIR_17)
111 for lang in en fr es ml; do \
112 mkdir -p $(DEBIAN_DOCDIR)/$${lang}; \
113 ln -s ../../doc/eyes17/$${lang} $(DOCDIR_17); \
114 install -m 644 \
115 eyes17/helpFiles/$${lang}/build/latex/expEYES-17.pdf \
116 $(DEBIAN_DOCDIR)/$${lang}/eyes17.pdf; \
117 install -m 644 \
118 eyes17/helpFiles/$${lang}/build/epub/expEYES-17.epub \
119 $(DEBIAN_DOCDIR)/$${lang}/eyes17.epub; \
120 done
121 # fix a few permission
122 find $(DESTDIR) -name "*.pdf" -exec chmod -x {} \;
123 ## PO files for expeyes
124 #make -C po install DESTDIR=$(DESTDIR)
125 ## PO files for microhope
126 #make -C microhope/po install DESTDIR=$(DESTDIR)
127 ## files from eyesjunior
128 #mkdir -p $(DESTDIR)/usr/share/eyesj
129 #cp -a eyesjunior/* $(DESTDIR)/usr/share/eyesj
130
131 # files from eyes17
132 mkdir -p $(DESTDIR)/usr/share/eyes17
133 for f in eyes17/server*.html eyes17/*.py ; do \
134 cp $$f $(DESTDIR)/usr/share/eyes17; \
135 done
136 for d in code examples eyes17 html images lang layouts blockly screenshots; do \
137 cp -a eyes17/$$d $(DESTDIR)/usr/share/eyes17; \
138 done
139 # help files for eyes17s help popup
140 mkdir -p $(DESTDIR)/usr/share/eyes17/helpFiles
141 for d in pics schematics; do \
142 cp -a eyes17/helpFiles/$$d $(DESTDIR)/usr/share/eyes17/helpFiles; \
143 done
144 for l in $(LANGS); do \
145 mkdir -p $(DESTDIR)/usr/share/eyes17/helpFiles/$$l; \
146 cd $(THIS_DIR)/eyes17/helpFiles/$$l; \
147 cp -a *.html pics schematics \
148 $(DESTDIR)/usr/share/eyes17/helpFiles/$$l; \
149 done
150 # clean VCS files
151 find $(DESTDIR) -name .gitignore | xargs rm -f
152 # remove doctrees
153 find $(DESTDIR) -type d -name 'doctrees' | xargs rm -rf
154 # remove useless Makefiles
155 find $(DESTDIR) -name "Makefile*" | xargs rm -f
156 # remove aj-arrange-files.sh
157 rm -f $(DESTDIR)/usr/share/eyesj/helpFiles/aj-arrange-files.sh
158 # remove stale symlinks which break py3compile's work
159 for f in conf.py prettyLaTeX.py; do \
160 find $(DESTDIR)/usr/share/eyes17/helpFiles -name $$f | xargs rm -f; \
161 done
162
163 clean:
164 rm -rf *~ *.pyc build/ eyes/*~ eyes/*.pyc eyes-junior/*~ eyes-junior/*.pyc doc/fr/Docs/eyes.out
165 for d in $(SUBDIRS) $(SUBDIRS_INDEP); do \
166 [ ! -f $$d/Makefile ] || $(MAKE) -C $$d distclean || \
167 $(MAKE) -C $$d clean EYES17_ONLY=$(EYES17_ONLY); \
168 done
169 [ ! -d clib ] || (cd clib/expeyes-clib && sh clean-all.sh)
170 # fix compiles Python files created by the clean scripts above
171 find . -name __pycache__ | xargs rm -rf
172
173
174 .PHONY: all all_arch all_indep all_firmware install install_arch install_indep clean clean_firmware