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 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 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
95 rm -rf
*/$$INPATH && \
96 rm -rf solver
/$$INPATH && \
99 ifeq (@BUILD_DMAKE@
,YES
)
101 (if
[ -f dmake
/Makefile
] ; then
$$GNUMAKE -C dmake
clean; fi
) && \
102 rm -f solenv
/*/bin
/dmake
*
104 ifeq (@CROSS_COMPILING@
,YES
)
106 rm -rf
*/$$INPATH_FOR_BUILD && \
107 rm -rf solver
/$$INPATH_FOR_BUILD
110 dmake
/dmake@EXEEXT_FOR_BUILD@
:
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
$@
118 @echo
"Automatic fetching of external tarballs is disabled."
121 fetch
: src.downloaded
123 Makefile
: autogen.lastrun configure.in ooo.lst.in set_soenv.in Makefile.in
127 @. .
/Env.Host.sh
&& \
131 @. .
/Env.Host.sh
&& \
135 @. .
/Env.Host.sh
&& \
136 mkdocs.sh
$$SRC_ROOT/docs
$$SOLARENV/inc
/doxygen.cfg
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
) && \
154 $$WORKDIR/LinkTarget
/*/* \
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
164 subsequentcheck
: dev-install
165 allcheck
: dev-install