Fix bug after commit I6886adac598a3eec0a9a99d166926bec99728a0f (missing dquotes)
[scilab.git] / scilab / Makefile.am
1 #
2 # Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
3 # Copyright (C) INRIA - 2006-2008 - Sylvestre Ledru
4 # Copyright (C) DIGITEO - 2009 - Sylvestre Ledru
5 #
6 # This file must be used under the terms of the CeCILL.
7 # This source file is licensed as described in the file COPYING, which
8 # you should have received as part of this distribution.  The terms
9 # are also available at
10 # http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
11 #
12
13 ## Process this file with automake to produce Makefile.in (which will be changed by the ./configure)
14
15 AUTOMAKE_OPTIONS = 1.11 dist-zip dist-bzip2
16
17 SUBDIRS= modules \
18         contrib \
19         desktop
20
21 ACLOCAL_AMFLAGS = -I m4/
22
23 # Set AM_* SCI detected settings
24 AM_CPPFLAGS = $(SCI_CPPFLAGS)
25 AM_CFLAGS   = $(SCI_CFLAGS)
26 AM_CXXFLAGS = $(SCI_CXXFLAGS)
27 AM_FFLAGS   = $(SCI_FFLAGS)
28 AM_LDFLAGS  = $(SCI_LDFLAGS)
29
30 changelogs = CHANGES CHANGES_5.1.X CHANGES_5.2.X CHANGES_5.3.X CHANGES_5.4.X  CHANGES_5.5.X
31
32 bin_PROGRAMS            = scilab-bin scilab-cli-bin
33
34 bin_SCRIPTS                     = bin/scilab bin/scilab-adv-cli bin/scilab-cli \
35 bin/scinotes bin/xcos
36
37 if IS_MACOSX
38 bin_SCRIPTS             += bin/checkmacosx.applescript
39 endif
40
41 scilab_bin_LDFLAGS          = $(AM_LDFLAGS) $(OPENMPI_LIBS)
42 scilab_cli_bin_LDFLAGS  = $(AM_LDFLAGS) $(OPENMPI_LIBS)
43
44 if USE_STATIC_SYSTEM_LIB
45 scilab_bin_LDFLAGS += -static-libstdc++ -static-libgcc
46 # -static-libgfortran
47 scilab_cli_bin_LDFLAGS += -static-libstdc++ -static-libgcc
48 #-static-libgfortran
49 else
50 # Clang (for example) needs an explicit reference to the lib
51 scilab_bin_LDFLAGS += -lstdc++
52 # -static-libgfortran
53 scilab_cli_bin_LDFLAGS += -lstdc++
54 #-static-libgfortran
55 endif
56
57
58 if IS_MACOSX
59 scilab_bin_LDFLAGS              += -framework Cocoa
60 endif
61
62 scilab_bin_CPPFLAGS = -I$(top_srcdir)/modules/io/includes/ \
63                     -I$(top_srcdir)/modules/console/includes/ \
64                     -I$(top_srcdir)/modules/localization/includes/ \
65                     $(AM_CPPFLAGS)
66 # --no-undefined --relax
67
68 # Localization dep already exists because of the `exportLocaleToSystem' symbol
69 # (causing issues on some platform)
70 COMMON_LIBS = $(LTLIBINTL)
71
72 scilab_bin_SOURCES              = $(top_srcdir)/modules/console/src/c/others/mainscic.cpp
73
74 scilab_bin_LDADD                = $(COMMON_LIBS) $(top_builddir)/modules/libscilab.la $(FLIBS)
75
76 # Match scilab -nwni (ie command line without graphics)
77 scilab_cli_bin_SOURCES  = $(top_srcdir)/modules/console/src/c/others/mainscic.cpp
78
79 scilab_cli_bin_CPPFLAGS = -DWITHOUT_GUI $(scilab_bin_CPPFLAGS)
80 scilab_cli_bin_LDADD    = $(COMMON_LIBS) $(top_builddir)/modules/libscilab-cli.la $(FLIBS)
81
82 if MPI
83 CXX = $(OPENMPI_CXX)
84 scilab_bin_SOURCES += $(top_srcdir)/modules/console/src/c/others/initMPI.c
85 scilab_bin_CPPFLAGS += $(OPENMPI_CXXFLAGS)
86 scilab_cli_bin_SOURCES += $(top_srcdir)/modules/console/src/c/others/initMPI.c
87 scilab_cli_bin_CPPFLAGS += $(OPENMPI_CXXFLAGS)
88 endif
89
90
91 if NEED_JAVA
92 # Don't do it for scilab_cli_bin. We want to be able to call it without
93 # the java libs
94         scilab_bin_LDADD += $(JAVA_JNI_LIBS)
95 endif
96
97 if IS_SOLARIS
98 # The binary itself needs this dep
99         scilab_bin_LDADD += $(BLAS_LIBS)
100 endif
101
102 LANG_DOMAIN=scilab
103
104 TARGETS_ALL=macros
105
106 #  The user wants to compile the localization files
107 if GENERATE_LOCALIZATION_FILES
108 TARGETS_ALL+=localization
109 endif
110
111 if COMPILATION_TESTS
112 TARGETS_ALL+=check-java
113 endif
114
115 # check is performed with scilab, so use the serial-tests on purpose
116 TESTS_ENVIRONMENT = LANG=C $(top_builddir)/bin/scilab-cli -nb -noatomsautoload -f
117 TESTS = $(top_builddir)/modules/development_tools/tests/unit_tests/test_run_level_1.tst
118
119 all-local: $(TARGETS_ALL)
120
121 rootdir=$(pkgdatadir)/etc/
122 root_DATA = $(top_srcdir)/etc/scilab.start \
123 $(top_srcdir)/etc/scilab.quit \
124 $(top_srcdir)/etc/toolboxes.xml \
125 $(top_builddir)/etc/jvm_options.xml \
126 $(top_builddir)/etc/modules.xml \
127 $(top_builddir)/etc/classpath.xml \
128 $(top_builddir)/etc/logging.properties \
129 $(top_builddir)/etc/librarypath.xml
130
131 infofilesdir=$(pkgdatadir)/
132 infofiles_DATA = $(top_srcdir)/CHANGES_2.X \
133 $(top_srcdir)/CHANGES_3.X \
134 $(top_srcdir)/CHANGES_4.X \
135 $(top_srcdir)/CHANGES_5.0.X \
136 $(top_srcdir)/CHANGES_5.1.X \
137 $(top_srcdir)/CHANGES_5.2.X \
138 $(top_srcdir)/CHANGES_5.3.X \
139 $(top_srcdir)/CHANGES_5.4.X \
140 $(top_srcdir)/CHANGES_5.5.X \
141 $(top_srcdir)/ACKNOWLEDGEMENTS \
142 $(top_srcdir)/COPYING \
143 $(top_srcdir)/COPYING-BSD \
144 $(top_srcdir)/COPYING-FR \
145 $(top_srcdir)/README_Unix \
146 $(top_srcdir)/RELEASE_NOTES_5.0.X \
147 $(top_srcdir)/RELEASE_NOTES_5.1.X \
148 $(top_srcdir)/RELEASE_NOTES_5.2.X \
149 $(top_srcdir)/RELEASE_NOTES_5.3.X \
150 $(top_srcdir)/Readme_Visual.txt \
151 $(top_srcdir)/README_Windows.txt \
152 $(top_builddir)/license.txt \
153 $(top_builddir)/Version.incl
154
155 valgrinddir=$(pkgdatadir)/tools/profiling
156 valgrind_DATA = $(top_srcdir)/tools/profiling/valgrind.supp
157
158 macros: $(top_builddir)/scilab-cli-bin $(top_builddir)/bin/scilab-cli check-jvm-dep check-libstdcpp-dep
159         -@( cd $(top_builddir) ; \
160         echo "$(top_builddir)/bin/scilab-cli -ns -noatomsautoload -f modules/functions/scripts/buildmacros/buildmacros.sce" ; \
161         $(top_builddir)/bin/scilab-cli -ns -noatomsautoload -f modules/functions/scripts/buildmacros/buildmacros.sce) || exit 1
162
163
164 check-jvm-dep:
165 # Check that scilab-cli does not have a dependency on libjvm
166 if !IS_MACOSX
167         @ldd .libs/scilab-cli-bin|grep libjvm > /dev/null; \
168         if test $$? == 0; then \
169                 echo "Found dependency from scilab-cli-bin to libjvm found"; exit 2;\
170         fi
171 endif
172
173
174 check-libstdcpp-dep:
175 if USE_STATIC_SYSTEM_LIB
176 # Check that scilab-cli does not have a dependency on libstdc++ (should be static)
177         @ldd .libs/scilab-bin .libs/scilab-cli-bin modules/.libs/libscilab*0 |grep libstdc++ > /dev/null; \
178         if test $$? == 0; then \
179                 echo "Found dependency from scilab-cli-bin to libstdc++ found"; exit 2;\
180         fi
181 else
182         echo "libstdc++ presence test skipped"
183 endif
184
185 # Build the public Javadoc (javasci v2 and Java/Scilab types)
186 # This is not done in the module itself because its needs also the "types"
187 # module
188 javadoc:
189         $(JAVADOC) -noindex -nohelp -nonavbar -notree \
190         -d $(top_builddir)/modules/javasci/javadoc \
191         -sourcepath $(top_srcdir)/modules/javasci/src/java:$(top_srcdir)/modules/types/src/java::$(top_srcdir)/modules/localization/src/java \
192         org.scilab.modules.javasci org.scilab.modules.types
193
194 javadoc-all:
195         MASK="$(top_srcdir)/modules/*/src/java/"; \
196         MODULES=`ls -d $$MASK`; \
197         for M in $$MODULES; do \
198                 LISTMODULES="$$M:$$LISTMODULES"; \
199                 MODULE=$$(echo $$M|cut -d/ -f3); \
200                 LISTPKG="$$LISTPKG org.scilab.modules.$$MODULE"; \
201         done; \
202         $(JAVADOC) \
203         -d $(top_builddir)/javadocall \
204         -sourcepath $$LISTMODULES \
205         $$LISTPKG
206
207 doc-fr_FR:
208         @$(MAKE) $(AM_MAKEFLAGS) doc ALL_LINGUAS_DOC=fr_FR
209
210 doc-en_US:
211         @$(MAKE) $(AM_MAKEFLAGS) doc ALL_LINGUAS_DOC=en_US
212
213 doc-pt_BR:
214         @$(MAKE) $(AM_MAKEFLAGS) doc ALL_LINGUAS_DOC=pt_BR
215
216 doc-ru_RU:
217         @$(MAKE) $(AM_MAKEFLAGS) doc ALL_LINGUAS_DOC=ru_RU
218
219 doc-ja_JP:
220         @$(MAKE) $(AM_MAKEFLAGS) doc ALL_LINGUAS_DOC=ja_JP
221
222 # Regenerate all images
223 doc-images:
224         rm -rf $(top_srcdir)/modules/helptools/images/
225         mkdir $(top_srcdir)/modules/helptools/images/
226         $(MAKE) doc
227
228 doc: javadoc $(top_builddir)/scilab-bin $(top_builddir)/bin/scilab-adv-cli
229 if BUILD_HELP
230         @if test -x $(top_builddir)/scilab-bin; then \
231                 cd $(top_builddir);\
232                 for l in $(ALL_LINGUAS_DOC); do \
233                         echo "-- Building documentation ($$l) --"; \
234                         COMMAND="try xmltojar([],[],'$$l');catch disp(lasterror()); exit(-1);end;exit(0);"; \
235                         echo "LANG=C SCI_DISABLE_TK=1 SCI_JAVA_ENABLE_HEADLESS=1 $(top_builddir)/bin/scilab-adv-cli -noatomsautoload -nb -nouserstartup -e \"$$COMMAND\"";\
236                         LANG=C SCI_DISABLE_TK=1 SCI_JAVA_ENABLE_HEADLESS=1 $(top_builddir)/bin/scilab-adv-cli -noatomsautoload -nb -l $$l -nouserstartup -e "$$COMMAND" || exit 1;\
237                 done; \
238         else \
239                 echo "Cannot find Scilab-adv-cli binary"; \
240         fi
241 else
242         @echo "Cannot buid help. Add --enable-build-help to the ./configure if you want to build it."
243 endif
244
245 doc-web: javadoc $(top_builddir)/scilab-bin $(top_builddir)/bin/scilab-adv-cli
246 if BUILD_HELP
247         @if test -x $(top_builddir)/scilab-bin; then \
248                 cd $(top_builddir);\
249                 for l in $(ALL_LINGUAS_DOC); do \
250                         echo "-- Building documentation ($$l) --"; \
251                         COMMAND="try xmltoweb([],[],'$$l');catch exit(-1);end;exit(0);";\
252                         echo "LANG=C SCI_DISABLE_TK=1 SCI_JAVA_ENABLE_HEADLESS=1 $(top_builddir)/bin/scilab-adv-cli -nb -l $$l -noatomsautoload -nouserstartup -e \"$$COMMAND\"";\
253                         LANG=C SCI_DISABLE_TK=1 SCI_JAVA_ENABLE_HEADLESS=1 $(top_builddir)/bin/scilab-adv-cli -nb -l $$l -noatomsautoload -nouserstartup -e "$$COMMAND" || exit 1;\
254                         JAVADOC_TARGET=$(top_builddir)/modules/helptools/web/$$l/javasci; \
255                         if test ! -d $$JAVADOC_TARGET; then \
256                                 mkdir $$JAVADOC_TARGET; \
257                                 ln -s ../../../../javasci/javadoc/ $$JAVADOC_TARGET/; \
258                         fi; \
259                 done; \
260         else \
261                 echo "Cannot find Scilab-adv-cli binary"; \
262         fi
263 else
264         @echo "Cannot buid help. Add --enable-build-help to the ./configure if you want to build it."
265 endif
266
267 doxygen: modules/development_tools/etc/doxyfile
268 if DOXYGEN
269         mkdir $(top_builddir)/reports/
270         $(DOXYGEN_BIN) modules/development_tools/etc/doxyfile
271 endif
272
273 check-help:$(top_builddir)/scilab-cli-bin $(top_builddir)/bin/scilab-cli
274         @if test -x $(top_builddir)/scilab-cli-bin; then \
275                 for l in $(ALL_LINGUAS_DOC); do \
276                         echo "-- Checking documentation ($$l) --"; \
277                         COMMAND="try check_help();catch exit(-1);end;exit(0);";\
278                         echo "$(top_builddir)/bin/scilab-cli -nb -l $$l -noatomsautoload -e \"$$COMMAND\"";\
279                         $(top_builddir)/bin/scilab-cli -nb -l $$l -noatomsautoload -e "$$COMMAND" || exit 1;\
280                 done; \
281         else \
282                 echo "Cannot find Scilab binary"; \
283         fi
284
285 code-coverage:
286 if CODE_COVERAGE
287         @if test ! -d $(top_builddir)/coverage/; then \
288                 mkdir $(top_builddir)/coverage/; \
289         fi; \
290         touch $(top_srcdir)/modules/differential_equations/callinter.h.f $(top_srcdir)/modules/linear_algebra/callinter.h.f $(top_srcdir)/modules/scicos/callinter.h.f $(top_srcdir)/modules/scicos_blocks/callinter.h.f $(top_srcdir)/modules/optimization/callinter.h.f $(top_srcdir)/modules/signal_processing/callinter.h.f; \
291         $(LCOV) --directory $(top_builddir) --capture --ignore-errors source --output-file $(top_builddir)/coverage/scilab-code-coverage.info; \
292         if test ! -f ~/.lcovrc; then echo -e "genhtml_hi_limit = 85\ngenhtml_med_limit = 70" > ~/.lcovrc; fi; \
293         $(GENHTML) -o $(top_builddir)/coverage/results/ --show-details --highlight --legend $(top_builddir)/coverage/scilab-code-coverage.info; \
294         rm -f $(top_builddir)/coverage/lcovrc; \
295         echo "To open the result: firefox  $(top_builddir)/coverage/results/index.html"; \
296         rm -f $(top_srcdir)/modules/differential_equations/callinter.h.f $(top_srcdir)/modules/linear_algebra/callinter.h.f $(top_srcdir)/modules/scicos/callinter.h.f $(top_srcdir)/modules/scicos_blocks/callinter.h.f $(top_srcdir)/modules/optimization/callinter.h.f $(top_srcdir)/modules/signal_processing/callinter.h.f
297 #--frames is disable because of : http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=607206
298 else
299         @echo "Cannot start the code coverage. Add --enable-code-coverage to the ./configure and 'make clean all'."
300 endif
301
302 distclean-recursive: distclean-generated clean-recursive
303
304 clean-recursive: clean-help clean-localization clean-macros clean-generated
305
306 clean-macros:
307 # Find is necessary because of subdirs...
308         -@echo "-- Cleaning macros (*.bin) --"; \
309         find $(top_builddir) -name "*.bin" | xargs --no-run-if-empty rm 2> /dev/null; \
310         echo "-- Cleaning names files (names) --"; \
311         find $(top_builddir)/modules/*/macros -name "names" | xargs --no-run-if-empty rm 2> /dev/null; \
312         echo "-- Cleaning lib files (lib) --"; \
313         find $(top_builddir)/modules/*/macros -name "lib" | xargs --no-run-if-empty rm 2> /dev/null
314
315 # To ensure previous compatibility
316 clean-doc: clean-help
317
318 clean-help:
319         -@if test -x $(top_builddir)/scilab-cli-bin; then \
320                 COMMAND="try clean_help();catch exit(-1);end;exit(0)"; \
321                 for l in $(ALL_LINGUAS_DOC); do \
322                         echo "$(top_builddir)/bin/scilab-cli -nb -l $$l -noatomsautoload -e '$$COMMAND'"; \
323                         $(top_builddir)/bin/scilab-cli -nb -l $$l -noatomsautoload -e "$$COMMAND" || exit 1; \
324                 done; \
325         else \
326                 echo "Cannot find Scilab binary"; \
327         fi; \
328         echo "rmdir $(top_builddir)/modules/helptools/javaHelp/"; \
329         rm -rf $(top_builddir)/modules/helptools/javaHelp/; \
330         echo "rm -rf $(top_builddir)/modules/scicos/help/*/scilab_*_help"; \
331         rm -rf $(top_builddir)/modules/scicos/help/*/scilab_*_help; \
332         echo "rm -f $(top_builddir)/modules/scicos/help/en_US/master_help.xml"; \
333         rm -f $(top_builddir)/modules/scicos/help/en_US/master_help.xml; \
334         echo "rm -f $(top_builddir)/modules/scicos/jar/"; \
335         rm -rf $(top_builddir)/modules/scicos/jar/; \
336         echo "rm -rf $(top_builddir)/modules/javasci/javadoc"; \
337         rm -rf $(top_builddir)/modules/javasci/javadoc; \
338         echo "rm -rf $(top_builddir)/html"; \
339         rm -rf $(top_builddir)/html;
340
341 clean-tests:
342         @if test -x $(top_builddir)/scilab-cli-bin; then \
343                 $(top_builddir)/bin/scilab-cli -nb -noatomsautoload -l fr -e 'try test_clean();catch exit(-1);end;exit(0);' || exit 1; \
344         else \
345                 echo "Cannot find Scilab binary"; \
346         fi
347
348 clean-localization:
349         rm -rf $(top_srcdir)/locale/*
350
351 clean-generated:
352 # Deleted junit + code coverage
353         rm -rf $(top_builddir)/reports/
354         rm -rf $(top_builddir)/modules/scicos_blocks/build/ 2> /dev/null
355
356 distclean-generated:
357         rm -f $(top_builddir)/modules/core/includes/stack.h 2> /dev/null
358
359
360 if IS_MACOSX
361 # Used for mac os x because it needs to remove the charset=UTF-8 because it is breaking the accents.
362 MACOSX=1
363 endif
364
365 clean-reports:
366         rm -f reports/xml/TEST-org.scilab.*.xml
367
368 # For each module, build and call Java unitary tests
369 # If fails, stops the call
370 check-java: clean-reports
371         @echo "-- Launch all Junit (Java) unitary tests"; \
372         MASK="$(top_srcdir)/modules/*/tests/java/"; \
373         MODULES=`ls -d $$MASK`; \
374         for M in $$MODULES; do \
375                 BASE=`echo $$M|sed -e "s|tests/java/$$||g"`; \
376                 $(ANT) -buildfile $$BASE/build.xml test || exit $$?; \
377         done
378         rm -f reports/xml/TEST-org.scilab.*.xml
379
380 codecoverage-java: clean-reports
381         @echo "Check if --enable-debug-java has been set"; \
382         grep "build.debug=on" $(top_srcdir)/scilab.properties > /dev/null || exit 10; \
383         echo "-- Launch all Junit (Java) unitary tests + code coverage"; \
384         MASK="$(top_srcdir)/modules/*/tests/java/"; \
385         MODULES=`ls -d $$MASK`; \
386         for M in $$MODULES; do \
387                 BASE=`echo $$M|sed -e "s|tests/java/$$||g"`; \
388                 $(ANT) -buildfile $$BASE/build.xml codecoverage || exit $$?; \
389         done
390         rm -f reports/xml/TEST-org.scilab.*.xml
391
392 # The user wants to compile the localization files
393 # Please note that ALL_LINGUAS is defined in configure.ac
394 if GENERATE_LOCALIZATION_FILES
395 localization:
396         @echo "-- Build localization (.mo from .po) --"; \
397         MASK="modules/*/locales/"; \
398         LC="LC_MESSAGES"; \
399         MSGFMT_OPTS="$MSGFMT_OPTS --check"; \
400         EXTENSION="*.po"; \
401         rm modules/*/locales/*~ 2> /dev/null; \
402         for LOCALE in $(ALL_LINGUAS); do \
403                 echo "        -- Building for $$LOCALE --"; \
404                 if test "$$LOCALE" == "en_US"; then \
405                         LOCFILE=$$MASK/*.pot; \
406                 else \
407                         LOCFILE=$$MASK/$$LOCALE$$EXTENSION; \
408                 fi; \
409                 FILES=`ls $$LOCFILE`; \
410                 PATHTO=$(top_builddir)/locale/$$LOCALE/$$LC/; \
411                 if test ! -d $$PATHTO; then \
412                         echo "        Creating $$PATHTO"; \
413                         mkdir -p $$PATHTO; \
414                 fi; \
415                 POFILE=$$PATHTO/$(LANG_DOMAIN).po; \
416                 $(MSGCAT) --use-first -o $$POFILE $$FILES || exit 2; \
417                 if test "$(MACOSX)" = "1"; then sed -i -e '/charset=UTF-8/d' $$POFILE; fi; \
418                 $(MSGFMT) $(MSGFMT_OPTS) --statistics -o $$PATHTO/$(LANG_DOMAIN).mo $$POFILE || exit 2; \
419         done;
420
421
422 localization-status:
423         @for LOCALE in $(ALL_LINGUAS_DOC); do \
424                 if test "$$LOCALE" != "en_US"; then \
425                         PATHTO=$(top_builddir)/locale-status/$$LOCALE/; \
426                         if test ! -d $$PATHTO; then \
427                                 echo "        Creating $$PATHTO"; \
428                                 mkdir -p $$PATHTO; \
429                         fi; \
430                         echo "Building status for $$LOCALE"; \
431                         echo "SCI=$(top_srcdir) php tools/localization/revcheck.php $$LOCALE > $$PATHTO/index.html"; \
432                         SCI=$(top_srcdir) php tools/localization/revcheck.php $$LOCALE > $$PATHTO/index.html; \
433                 fi; \
434         done;
435
436 endif
437
438 # Misc variable for the documentation installation
439
440 # How help files look like.
441 DOCMASK=scilab_*_help.jar
442 DOCIMAGES=scilab_images.jar
443
444 # Path to built files
445 PATHTOHELPFILES = modules/helptools/jar/
446
447 # Path to scirenderer jar
448 PATHTOSCIRENDERER = modules/scirenderer/jar/
449 SCIRENDERERJAR = scirenderer.jar
450
451 # Path javasci to built files
452 PATHTOJAVASCIDOC = modules/javasci/javadoc/
453 JAVASCI_DIRS = . resources \
454         org/scilab/modules/javasci/ \
455         org/scilab/modules/types/
456
457 if GENERATE_LOCALIZATION_FILES
458 install-data-local:
459         @$(mkinstalldirs) $(DESTDIR)$(localedir); \
460         echo $(mkinstalldirs) $(DESTDIR)$(localedir); \
461         for lang in $(ALL_LINGUAS); do \
462                 LANG_PATH_DIST=$(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/; \
463                 echo $(mkinstalldirs) $$LANG_PATH_DIST; \
464                 $(mkinstalldirs) $$LANG_PATH_DIST; \
465                 echo $(INSTALL_DATA) $(top_builddir)/locale/$$lang/LC_MESSAGES/$(LANG_DOMAIN).mo $$LANG_PATH_DIST/; \
466                 $(INSTALL_DATA) $(top_builddir)/locale/$$lang/LC_MESSAGES/$(LANG_DOMAIN).mo $$LANG_PATH_DIST/; \
467         done
468 endif
469
470 ################ INSTALL DOCUMENTATION #################
471 # Starting from Scilab 5, documentation file are provided by Docbook
472 # In the Scilab application we are generating a JavaHelp file.
473 if BUILD_HELP
474         @$(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/$(PATHTOHELPFILES); \
475         echo $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/$(PATHTOHELPFILES); \
476         if ls -lLd $(top_builddir)/$(PATHTOHELPFILES)/$(DOCMASK) >/dev/null 2>&1; then \
477                 for file in $(top_builddir)/$(PATHTOHELPFILES)/$(DOCMASK) $(top_builddir)/$(PATHTOHELPFILES)/$(DOCIMAGES); do \
478                     echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdatadir)/$(PATHTOHELPFILES)" ; \
479                 $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdatadir)/$(PATHTOHELPFILES) ; \
480                 done; \
481         fi
482 ## Install Javasci documentation (javadoc)
483 ## See target javadoc in this file to see how it is build
484         @if test -d $(PATHTOJAVASCIDOC); then \
485         $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/$(PATHTOJAVASCIDOC); \
486         echo $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/$(PATHTOJAVASCIDOC); \
487         for dir in $(JAVASCI_DIRS) ; do \
488                 $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/$(PATHTOJAVASCIDOC)/$$dir; \
489                 echo $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/$(PATHTOJAVASCIDOC)/$$dir; \
490                         for file in $(top_builddir)/$(PATHTOJAVASCIDOC)/$(dir)/*; do \
491                             echo "$(INSTALL_DATA) $$file $(DESTDIR)$(pkgdatadir)/$(PATHTOJAVASCIDOC)/$$dir" ; \
492                                 $(INSTALL_DATA) "$$file" $(DESTDIR)$(pkgdatadir)/$(PATHTOJAVASCIDOC)/$$dir ; \
493                         done; \
494         done; \
495         fi
496 endif
497 if !EXTERNAL_SCIRENDERER
498 # Also install scirenderer.jar
499         $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/$(PATHTOSCIRENDERER)
500         $(INSTALL_DATA) $(top_builddir)/$(PATHTOSCIRENDERER)/$(SCIRENDERERJAR) $(DESTDIR)$(pkgdatadir)/$(PATHTOSCIRENDERER)/
501 endif
502
503 # Pkgconfig directory
504 pkgconfigdir = $(libdir)/pkgconfig
505
506 # Files to install in Pkgconfig directory
507 pkgconfig_DATA = scilab.pc
508
509 .PHONY: macros localization doc
510
511 .NOTPARALLEL: macros doc
512
513 include $(top_srcdir)/Makefile.call_scilab.am