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