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