dr78: #i26822# remove draw shell if selected object is removed by undo
[LibreOffice.git] / Makefile.in
blob8ea483d95afad20b20d05e18d974b1673b8ab343
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 clean-host clean-build 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` = Linux; then \
50 printf 'make debugrun\n'; \
51 elif test `uname -s` = Darwin; then \
52 printf 'open %s/install/LibreOffice.app\n' "@abs_builddir@"; \
53 else \
54 printf 'cd %s/install/program\n. ./ooenv\n./soffice.bin\n' \
55 "@abs_builddir@"; \
58 debugrun:
59 @ @GNUMAKE@ -f $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/GNUmakefile.mk debugrun
61 check : allcheck
62 @true
64 %check:
65 @ @GNUMAKE@ -f $(dir $(realpath $(firstword $(MAKEFILE_LIST))))/GNUmakefile.mk -r \
66 $(if @VERBOSE@,,-s) --jobs="$(if \
67 $(CHECK_PARALLELISM),$(CHECK_PARALLELISM),@GMAKE_PARALLELISM@)" \
68 $(patsubst allcheck,check,$@)
70 cross-build-toolset:
71 @. ./Env.Build.sh && \
72 cd cross_toolset && \
73 build.pl -P@BUILD_NCPUS@ --all -- -P@BUILD_MAX_JOBS@
75 install: build
76 @. ./Env.Host.sh && \
77 echo "Installing in @INSTALLDIR@..." && \
78 ooinstall "@INSTALLDIR@" && \
79 echo "" && \
80 echo "Installation finished, you can now execute:" && \
81 echo "@INSTALLDIR@/program/soffice"
83 distro-pack-install: install
84 ./bin/distro-install-clean-up
85 ./bin/distro-install-desktop-integration
86 ./bin/distro-install-sdk
87 ./bin/distro-install-file-lists
89 distclean: clean
90 ifeq (@BUILD_DMAKE@,YES)
91 -test -f dmake/Makefile && $(MAKE) -C dmake distclean
92 endif
93 rm -rf Env.Host.sh Makefile aclocal.m4 autogen.lastrun autom4te.cache \
94 bin/repo-list build_env config.log config.status configure \
95 desktop/scripts/soffice.sh ooo.lst post_download post_download.log \
96 set_soenv set_soenv.last set_soenv.stamp src.downloaded warn
98 clean: clean-host clean-build
100 clean-host:
101 . ./Env.Host.sh && \
102 rm -rf */$$INPATH && \
103 rm -rf install
105 clean-build:
106 ifeq (@BUILD_DMAKE@,YES)
107 . ./Env.Host.sh && \
108 (if [ -f dmake/Makefile ] ; then $$GNUMAKE -C dmake clean; fi) && \
109 rm -f solenv/*/bin/dmake*
110 endif
111 ifeq (@CROSS_COMPILING@,YES)
112 . ./Env.Host.sh && \
113 rm -rf */$$INPATH_FOR_BUILD
114 endif
116 dmake/dmake@EXEEXT_FOR_BUILD@:
117 ./bootstrap
119 src.downloaded: ooo.lst download
120 ifeq (@DO_FETCH_TARBALLS@,YES)
121 @. ./Env.Host.sh && \
122 $$SRC_ROOT/download $$SRC_ROOT/ooo.lst && touch $@
123 else
124 @echo "Automatic fetching of external tarballs is disabled."
125 endif
127 fetch: src.downloaded
129 ifneq ($(MAKECMDGOALS),clean)
130 ifneq ($(MAKECMDGOALS),distclean)
131 Makefile: autogen.lastrun configure.in ooo.lst.in set_soenv.in Makefile.in
132 ./autogen.sh
133 endif
134 endif
137 @. ./Env.Host.sh && \
138 create-ids
140 tags:
141 @. ./Env.Host.sh && \
142 create-tags
144 docs:
145 @. ./Env.Host.sh && \
146 mkdocs.sh $$SRC_ROOT/docs $$SOLARENV/inc/doxygen.cfg
148 findunusedcode:
149 # experimental callcatcher target
150 # http://www.skynet.ie/~caolan/Packages/callcatcher.html
151 @which callcatcher > /dev/null 2>&1 || \
152 (echo "callcatcher not installed" && false)
153 @. ./Env.Host.sh && \
154 mkdir -p $$SRC_ROOT/solenv/callcatcher/bin && \
155 ln -sf $$SRC_ROOT/solenv/$$INPATH/bin/dmake \
156 $$SRC_ROOT/solenv/callcatcher/bin/dmake && \
157 source <(sed -e s,$$INPATH,callcatcher,g ./Env.Host.sh) && \
158 . ./solenv/bin/callcatchEnv.Set.sh && \
159 cd instsetoo_native && \
160 build.pl -P@BUILD_NCPUS@ --all -- -P@BUILD_MAX_JOBS@
161 @. ./Env.Host.sh && \
162 source <(sed -e s,$$INPATH,callcatcher,g ./Env.Host.sh) && \
163 callanalyse \
164 $$WORKDIR/LinkTarget/*/* \
165 */$$OUTPATH/bin/* \
166 */$$OUTPATH/lib/* > unusedcode.all
167 #because non-c++ symbols could be dlsymed lets make a list of class level
168 #unused methods which don't require much effort to determine if they need
169 #to be just removed, or put behind appropiate platform or debug level ifdefs
170 @grep ::.*\( unusedcode.all | grep -v ^cppu:: > unusedcode.easy
172 #as long as we are not completely gbuildified we need to explicitly depend on the build/install
173 unitcheck: build
174 subsequentcheck: dev-install
175 allcheck : dev-install
176 #debugrun : dev-install # disabled for now, this dep seems to poison the debugrun !?