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` = Darwin
; then \
50 printf
'open %s/install/LibreOffice.app\n' "@abs_builddir@"; \
52 printf
'cd %s/install/program\n. ./ooenv\n./soffice.bin\n' \
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,$@
)
66 @. .
/Env.Build.sh
&& \
68 build.pl
-P@BUILD_NCPUS@
--all -- -P@BUILD_MAX_JOBS@
72 echo
"Installing in @INSTALLDIR@..." && \
73 ooinstall
"@INSTALLDIR@" && \
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
85 ifeq (@BUILD_DMAKE@
,YES
)
86 -test -f dmake
/Makefile
&& $(MAKE
) -C dmake
distclean
88 rm -rf Env.Host.sh Makefile aclocal.m4 autogen.lastrun autom4te.cache \
89 bin
/repo-list build_env 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: clean-host clean-build
97 rm -rf
*/$$INPATH && \
101 ifeq (@BUILD_DMAKE@
,YES
)
103 (if
[ -f dmake
/Makefile
] ; then
$$GNUMAKE -C dmake
clean; fi
) && \
104 rm -f solenv
/*/bin
/dmake
*
106 ifeq (@CROSS_COMPILING@
,YES
)
108 rm -rf
*/$$INPATH_FOR_BUILD
111 dmake
/dmake@EXEEXT_FOR_BUILD@
:
114 src.downloaded
: ooo.lst download
115 ifeq (@DO_FETCH_TARBALLS@
,YES
)
116 @. .
/Env.Host.sh
&& \
117 $$SRC_ROOT/download
$$SRC_ROOT/ooo.lst
&& touch
$@
119 @echo
"Automatic fetching of external tarballs is disabled."
122 fetch
: src.downloaded
124 ifneq ($(MAKECMDGOALS
),clean)
125 ifneq ($(MAKECMDGOALS
),distclean)
126 Makefile
: autogen.lastrun configure.in ooo.lst.in set_soenv.in Makefile.in
132 @. .
/Env.Host.sh
&& \
136 @. .
/Env.Host.sh
&& \
140 @. .
/Env.Host.sh
&& \
141 mkdocs.sh
$$SRC_ROOT/docs
$$SOLARENV/inc
/doxygen.cfg
144 # experimental callcatcher target
145 # http://www.skynet.ie/~caolan/Packages/callcatcher.html
146 @which callcatcher
> /dev
/null
2>&1 || \
147 (echo
"callcatcher not installed" && false
)
148 @. .
/Env.Host.sh
&& \
149 mkdir
-p
$$SRC_ROOT/solenv
/callcatcher
/bin
&& \
150 ln
-sf
$$SRC_ROOT/solenv
/$$INPATH/bin
/dmake \
151 $$SRC_ROOT/solenv
/callcatcher
/bin
/dmake
&& \
152 source
<(sed
-e s
,$$INPATH,callcatcher
,g .
/Env.Host.sh
) && \
153 . .
/solenv
/bin
/callcatchEnv.Set.sh
&& \
154 cd instsetoo_native
&& \
155 build.pl
-P@BUILD_NCPUS@
--all -- -P@BUILD_MAX_JOBS@
156 @. .
/Env.Host.sh
&& \
157 source
<(sed
-e s
,$$INPATH,callcatcher
,g .
/Env.Host.sh
) && \
159 $$WORKDIR/LinkTarget
/*/* \
161 */$$OUTPATH/lib
/* > unusedcode.
all
162 #because non-c++ symbols could be dlsymed lets make a list of class level
163 #unused methods which don't require much effort to determine if they need
164 #to be just removed, or put behind appropiate platform or debug level ifdefs
165 @grep
::.
*\
( unusedcode.
all | grep
-v ^cppu
:: > unusedcode.easy
167 #as long as we are not completely gbuildified we need to explicitly depend on the build/install
169 subsequentcheck
: dev-install
170 allcheck
: dev-install