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