fix smoketest linkage
[LibreOffice.git] / Makefile.in
blob197eb8e84958ab92946be9fe6ab3e549e8722558
1 # @configure_input@
3 SHELL=/usr/bin/env bash
5 ifeq (@CROSS_COMPILING@,YES)
6 CROSS_TOOLSET_RULE:=cross-build-toolset
7 else
8 CROSS_TOOLSET_RULE:=
9 endif
11 ifeq ($(filter all check unitcheck,$(MAKECMDGOALS)),)
12 gb_MAKETARGET=build
13 else
14 # fail early
15 gb_MAKETARGET=all
16 endif
18 .PHONY : build dev-install all cross-build-toolset install distro-pack-install clean distclean findunusedcode
20 all: build unitcheck
21 @echo
22 @echo "LibreOffice build succesfully finished :-)"
23 @echo
24 ifeq (@CROSS_COMPILING@,YES)
25 @echo "Please consult README.cross how to install it."
26 else
27 @echo "To install, issue: @GNUMAKE@ install"
28 @echo "Developers might prefer this way: @GNUMAKE@ dev-install -o build"
29 @echo "To run smoketest, issue: @GNUMAKE@ check"
30 endif
31 @echo
33 build: Makefile dmake/dmake@EXEEXT_FOR_BUILD@ src.downloaded $(CROSS_TOOLSET_RULE)
34 @. ./Env.Host.sh && \
35 cd instsetoo_native && \
36 gb_MAKETARGET=$(gb_MAKETARGET) build.pl -P@BUILD_NCPUS@ --all -- -P@BUILD_MAX_JOBS@
38 dev-install: build
39 @. ./Env.Host.sh && \
40 cd smoketestoo_native && \
41 build.pl -P@BUILD_NCPUS@ -- -P@BUILD_MAX_JOBS@ && \
42 rm -f "@abs_builddir@"/install && \
43 ln -s "$$SOLARVER/$$INPATH"/installation/opt/ \
44 "@abs_builddir@"/install && \
45 printf '\n' && \
46 printf \
47 '\nDeveloper installation finished, you can now execute:\n\n' \
48 && \
49 if test `uname -s` = Darwin; then \
50 printf 'open %s/install/LibreOffice.app\n' "@abs_builddir@"; \
51 else \
52 printf 'cd %s/install/program\n. ./ooenv\n./soffice.bin\n' \
53 "@abs_builddir@"; \
56 check : allcheck
57 @true
59 %check:
60 @. ./Env.Host.sh && $$GNUMAKE -f "$$SRC_ROOT"/GNUmakefile.mk -r \
61 $(if @VERBOSE@,,-s) --jobs="$(if \
62 $(CHECK_PARALLELISM),$(CHECK_PARALLELISM),@GMAKE_PARALLELISM@)" \
63 $(patsubst allcheck,check,$@)
65 cross-build-toolset:
66 @. ./Env.Build.sh && \
67 cd cross_toolset && \
68 build.pl -P@BUILD_NCPUS@ --all -- -P@BUILD_MAX_JOBS@
70 install: build
71 @. ./Env.Host.sh && \
72 echo "Installing in @INSTALLDIR@..." && \
73 ooinstall "@INSTALLDIR@" && \
74 echo "" && \
75 echo "Installation finished, you can now execute:" && \
76 echo "@INSTALLDIR@/program/soffice"
78 distro-pack-install: install
79 ./bin/distro-install-clean-up
80 ./bin/distro-install-desktop-integration
81 ./bin/distro-install-sdk
82 ./bin/distro-install-file-lists
84 distclean: clean
85 ifeq (@BUILD_DMAKE@,YES)
86 -test -f dmake/Makefile && $(MAKE) -C dmake distclean
87 endif
88 rm -rf Env.Host.sh Makefile aclocal.m4 autogen.lastrun autom4te.cache \
89 bin/repo-list config.log config.status configure \
90 desktop/scripts/soffice.sh ooo.lst post_download post_download.log \
91 set_soenv set_soenv.last set_soenv.stamp src.downloaded warn
93 clean:
94 . ./Env.Host.sh && \
95 rm -rf */$$INPATH && \
96 rm -rf solver/$$INPATH && \
97 rm -rf workdir && \
98 rm -rf install
99 ifeq (@BUILD_DMAKE@,YES)
100 . ./Env.Host.sh && \
101 (if [ -f dmake/Makefile ] ; then $$GNUMAKE -C dmake clean; fi) && \
102 rm -f solenv/*/bin/dmake*
103 endif
104 ifeq (@CROSS_COMPILING@,YES)
105 . ./Env.Host.sh && \
106 rm -rf */$$INPATH_FOR_BUILD && \
107 rm -rf solver/$$INPATH_FOR_BUILD
108 endif
110 dmake/dmake@EXEEXT_FOR_BUILD@:
111 ./bootstrap
113 src.downloaded: ooo.lst download
114 ifeq (@DO_FETCH_TARBALLS@,YES)
115 @. ./Env.Host.sh && \
116 $$SRC_ROOT/download $$SRC_ROOT/ooo.lst && touch $@
117 else
118 @echo "Automatic fetching of external tarballs is disabled."
119 endif
121 fetch: src.downloaded
123 Makefile: autogen.lastrun configure.in ooo.lst.in set_soenv.in Makefile.in
124 ./autogen.sh
127 @. ./Env.Host.sh && \
128 create-ids
130 tags:
131 @. ./Env.Host.sh && \
132 create-tags
134 docs:
135 @. ./Env.Host.sh && \
136 mkdocs.sh $$SRC_ROOT/docs $$SOLARENV/inc/doxygen.cfg
138 findunusedcode:
139 # experimental callcatcher target
140 # http://www.skynet.ie/~caolan/Packages/callcatcher.html
141 @which callcatcher > /dev/null 2>&1 || \
142 (echo "callcatcher not installed" && false)
143 @. ./Env.Host.sh && \
144 mkdir -p $$SRC_ROOT/solenv/callcatcher/bin && \
145 ln -sf $$SRC_ROOT/solenv/$$INPATH/bin/dmake \
146 $$SRC_ROOT/solenv/callcatcher/bin/dmake && \
147 source <(sed -e s,$$INPATH,callcatcher,g ./Env.Host.sh) && \
148 . ./solenv/bin/callcatchEnv.Set.sh && \
149 cd instsetoo_native && \
150 build.pl -P@BUILD_NCPUS@ --all -- -P@BUILD_MAX_JOBS@
151 @. ./Env.Host.sh && \
152 source <(sed -e s,$$INPATH,callcatcher,g ./Env.Host.sh) && \
153 callanalyse \
154 $$WORKDIR/LinkTarget/*/* \
155 */$$OUTPATH/bin/* \
156 */$$OUTPATH/lib/* > unusedcode.all
157 #because non-c++ symbols could be dlsymed lets make a list of class level
158 #unused methods which don't require much effort to determine if they need
159 #to be just removed, or put behind appropiate platform or debug level ifdefs
160 @grep ::.*\( unusedcode.all | grep -v ^cppu:: > unusedcode.easy
162 #as long as we are not completely gbuildified we need to explicitly depend on the build/install
163 unitcheck: build
164 subsequentcheck: dev-install
165 allcheck : dev-install