3 SHELL
=/usr
/bin
/env bash
5 ifeq (@CROSS_COMPILING@
,YES
)
6 CROSS_TOOLSET_RULE
:=cross-build-toolset
11 ifeq ($(filter all check unitcheck
,$(MAKECMDGOALS
)),)
18 .PHONY
: build dev-install
all cross-build-toolset
install distro-pack-install
clean clean-host clean-build
distclean findunusedcode
22 @echo
"LibreOffice build succesfully finished :-)"
24 ifeq (@CROSS_COMPILING@
,YES
)
25 @echo
"Please consult README.cross how to install it."
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"
33 build
: Makefile dmake
/dmake@EXEEXT_FOR_BUILD@ src.downloaded
$(CROSS_TOOLSET_RULE
)
35 cd instsetoo_native
&& \
36 gb_MAKETARGET
=$(gb_MAKETARGET
) build.pl
-P@BUILD_NCPUS@
--all -- -P@BUILD_MAX_JOBS@
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 && \
47 '\nDeveloper installation finished, you can now execute:\n\n' \
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@"; \
54 printf
'cd %s/install/program\n. ./ooenv\n./soffice.bin\n' \
59 @ @GNUMAKE@
-f
$(dir $(realpath
$(firstword $(MAKEFILE_LIST
))))/GNUmakefile.mk debugrun
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,$@
)
71 @. .
/Env.Build.sh
&& \
73 build.pl
-P@BUILD_NCPUS@
--all -- -P@BUILD_MAX_JOBS@
77 echo
"Installing in @INSTALLDIR@..." && \
78 ooinstall
"@INSTALLDIR@" && \
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
90 ifeq (@BUILD_DMAKE@
,YES
)
91 -test -f dmake
/Makefile
&& $(MAKE
) -C dmake
distclean
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
102 rm -rf
*/$$INPATH && \
106 ifeq (@BUILD_DMAKE@
,YES
)
108 (if
[ -f dmake
/Makefile
] ; then
$$GNUMAKE -C dmake
clean; fi
) && \
109 rm -f solenv
/*/bin
/dmake
*
111 ifeq (@CROSS_COMPILING@
,YES
)
113 rm -rf
*/$$INPATH_FOR_BUILD
116 dmake
/dmake@EXEEXT_FOR_BUILD@
:
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
$@
124 @echo
"Automatic fetching of external tarballs is disabled."
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
137 @. .
/Env.Host.sh
&& \
141 @. .
/Env.Host.sh
&& \
145 @. .
/Env.Host.sh
&& \
146 mkdocs.sh
$$SRC_ROOT/docs
$$SOLARENV/inc
/doxygen.cfg
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
) && \
164 $$WORKDIR/LinkTarget
/*/* \
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
174 subsequentcheck
: dev-install
175 allcheck
: dev-install
176 #debugrun : dev-install # disabled for now, this dep seems to poison the debugrun !?