make: improve cleanup dependency graph
Change-Id: I8a7edd3b49a272cb7bd8bff4d91b189a5856c5c8 Reviewed-on: https://gerrit.libreoffice.org/c/online/+/97647 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Tested-by: Jenkins Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
This commit is contained in:
parent
9f8fdb7bd7
commit
a062581be6
2 changed files with 17 additions and 13 deletions
28
Makefile.am
28
Makefile.am
|
@ -329,14 +329,25 @@ SYSTEM_STAMP = @SYSTEMPLATE_PATH@/system_stamp
|
|||
CAPABILITIES = $(if @ENABLE_SETCAP@,true,false)
|
||||
RUN_GDB = $(if $(GDB_FRONTEND),$(GDB_FRONTEND),gdb --tui --args)
|
||||
|
||||
$(SYSTEM_STAMP) : ${top_srcdir}/loolwsd-systemplate-setup
|
||||
if test -s ./loolwsd; then ./loolwsd --cleanup; fi
|
||||
# Add caps to the binaries that need them.
|
||||
caps_bins: loolforkit loolmount
|
||||
if ENABLE_SETCAP
|
||||
sudo @SETCAP@ cap_fowner,cap_mknod,cap_sys_chroot=ep loolforkit
|
||||
sudo @SETCAP@ cap_sys_admin=ep loolmount
|
||||
else
|
||||
echo "Skipping capability setting"
|
||||
endif
|
||||
|
||||
# Build loolwsd and loolmount first, so we can cleanup before updating
|
||||
# the systemplate directory, which we can't rm if it's mounted.
|
||||
$(SYSTEM_STAMP): ${top_srcdir}/loolwsd-systemplate-setup loolwsd caps_bins
|
||||
$(CLEANUP_COMMAND)
|
||||
if test "z@SYSTEMPLATE_PATH@" != "z"; then rm -rf "@SYSTEMPLATE_PATH@"; fi
|
||||
${top_srcdir}/loolwsd-systemplate-setup "@SYSTEMPLATE_PATH@" "@LO_PATH@" && touch $@
|
||||
|
||||
@JAILS_PATH@ :
|
||||
mkdir -p $@
|
||||
@JAILS_PATH@:
|
||||
$(CLEANUP_COMMAND)
|
||||
mkdir -p $@
|
||||
|
||||
clean-local:
|
||||
$(CLEANUP_COMMAND)
|
||||
|
@ -464,16 +475,7 @@ endif
|
|||
# installing the RPM or Debian package.
|
||||
.PHONY: caps_bins
|
||||
|
||||
caps_bins: loolforkit loolmount
|
||||
if ENABLE_SETCAP
|
||||
sudo @SETCAP@ cap_fowner,cap_mknod,cap_sys_chroot=ep loolforkit
|
||||
sudo @SETCAP@ cap_sys_admin=ep loolmount
|
||||
else
|
||||
echo "Skipping capability setting"
|
||||
endif
|
||||
|
||||
all-local: loolwsd caps_bins @JAILS_PATH@ $(SYSTEM_STAMP)
|
||||
$(CLEANUP_COMMAND)
|
||||
|
||||
# just run the build without any tests
|
||||
build-nocheck: all-am
|
||||
|
|
|
@ -309,3 +309,5 @@ all-local: unittest
|
|||
@echo
|
||||
@fc-cache "@LO_PATH@"/share/fonts/truetype
|
||||
@UNITTEST=1 ${top_builddir}/test/unittest
|
||||
echo "Done test all-local"
|
||||
$(CLEANUP_COMMAND)
|
||||
|
|
Loading…
Reference in a new issue