rework the default make target
The current default target ('all') was a confusing mess, it did run some tests, but it did run just some of them and it also depended on some factors (toplevel 'make' vs module 'make'). And running tests on plain 'make' also makes the developer cycle longer, which is annoying, and now there's Jenkins which will do checks. This commit makes the default make target to be 'build'. All the other targets should work the same way, with the exception of 'all', which I've removed (given that it was confusing, it's probably better not to try to keep any kind of backwards compatibility there). The 'build-nocheck' target is now equal to 'build' and thus pointless, but I've kept it for backwards compatibility. Change-Id: I874b7ae8d26e95efa86a00dd32cfa7fd19599b9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89820 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
This commit is contained in:
17
Makefile.in
17
Makefile.in
@@ -9,13 +9,12 @@
|
||||
|
||||
gb_Top_MODULE_CHECK_TARGETS := slowcheck unitcheck subsequentcheck perfcheck uicheck screenshot
|
||||
|
||||
.PHONY : all check-if-root bootstrap gbuild build build-non-l10n-only build-l10n-only check clean clean-build clean-host test-install distclean distro-pack-install docs download etags fetch get-submodules id install install-gdb-printers install-strip tags debugrun help showmodules translations packageinfo internal.clean $(gb_Top_MODULE_CHECK_TARGETS)
|
||||
.PHONY : check-if-root bootstrap gbuild build build-non-l10n-only build-l10n-only check clean clean-build clean-host test-install distclean distro-pack-install docs download etags fetch get-submodules id install install-gdb-printers install-strip tags debugrun help showmodules translations packageinfo internal.clean $(gb_Top_MODULE_CHECK_TARGETS)
|
||||
|
||||
MAKECMDGOALS?=all
|
||||
build_goal:=$(if $(filter build check,$(MAKECMDGOALS)),all)\
|
||||
$(if $(filter build-nocheck slowcheck uicheck,$(MAKECMDGOALS)),build)\
|
||||
$(if $(filter check,$(MAKECMDGOALS)),subsequentcheck $(if $(filter Linux, $(shell uname)), uicheck))\
|
||||
$(filter all build-l10n-only build-non-l10n-only debugrun help showmodules translations $(gb_Top_MODULE_CHECK_TARGETS) check packageinfo gbuildtojson,$(MAKECMDGOALS))
|
||||
MAKECMDGOALS?=build
|
||||
build_goal:=$(if $(filter build build-nocheck slowcheck uicheck,$(MAKECMDGOALS)),build)\
|
||||
$(if $(filter check,$(MAKECMDGOALS)),unitcheck slowcheck subsequentcheck $(if $(filter Linux, $(shell uname)), uicheck))\
|
||||
$(filter build-l10n-only build-non-l10n-only debugrun help showmodules translations $(gb_Top_MODULE_CHECK_TARGETS) check packageinfo gbuildtojson,$(MAKECMDGOALS))
|
||||
|
||||
SRCDIR := @SRC_ROOT@
|
||||
BUILDDIR := @BUILDDIR@
|
||||
@@ -57,7 +56,7 @@ $(BUILDDIR)/config_host.mk : $(wildcard \
|
||||
|
||||
else # MAKE_RESTARTS
|
||||
|
||||
all: build
|
||||
.DEFAULT_GOAL := build
|
||||
|
||||
check-if-root:
|
||||
@if test ! `uname` = 'Haiku' -a `id -u` = 0 && ! grep -q 'lxc\|docker' /proc/self/cgroup && ! grep -q 'libpod_parent' /proc/self/cgroup; then \
|
||||
@@ -90,7 +89,7 @@ iwyudummy.generate:
|
||||
# Partial Build
|
||||
#
|
||||
define gb_Top_GbuildModuleRules
|
||||
.PHONY: $(1) $(1).all $(1).build $(1).check $(1).clean $(1).showdeliverables $(foreach target,$(gb_Top_MODULE_CHECK_TARGETS),$(1).$(target))
|
||||
.PHONY: $(1) $(1).build $(1).all $(1).check $(1).clean $(1).showdeliverables $(foreach target,$(gb_Top_MODULE_CHECK_TARGETS),$(1).$(target))
|
||||
|
||||
$(1): bootstrap fetch
|
||||
cd $(SRCDIR)/$(2) && $$(MAKE) $(IWYU_OPTION) $(PARALLELISM_OPTION) $(GMAKE_OPTIONS)
|
||||
@@ -274,7 +273,7 @@ bootstrap: check-if-root compilerplugins
|
||||
# Build
|
||||
#
|
||||
# Note: this will pipe through all gbuild targets to ... gbuild
|
||||
# with some translations like "build"->"all" for historic reasons
|
||||
# with some translations like "check"->"unitcheck subsequentcheck uicheck" for historic reasons
|
||||
#
|
||||
build: bootstrap fetch $(if $(CROSS_COMPILING),cross-toolset) \
|
||||
$(if $(filter check,$(MAKECMDGOALS)),$(if $(COMPILER_PLUGINS),$(if $(LODE_HOME),clang-format-check))) \
|
||||
|
@@ -37,7 +37,6 @@
|
||||
# subsequentcheck (global) run system tests top-level Module/subsequentcheck
|
||||
# perfcheck (global) run performance unit tests top-level Module/perfcheck
|
||||
# uicheck (global) run the uitests run all uitests
|
||||
# all (global) default goal build unitcheck
|
||||
|
||||
|
||||
# Module class
|
||||
@@ -149,10 +148,8 @@ $(call gb_Module_get_target,%) :
|
||||
mkdir -p $(dir $@) && \
|
||||
touch $@)
|
||||
|
||||
.PHONY : all build build-l10n-only build-non-l10n-only unitcheck slowcheck screenshot subsequentcheck stagingcheck perfcheck uicheck clean check debugrun help showmodules translations
|
||||
.DEFAULT_GOAL := all
|
||||
|
||||
all : build $(if $(CROSS_COMPILING),,unitcheck $(if $(gb_PARTIAL_BUILD),,slowcheck))
|
||||
.PHONY : build build-l10n-only build-non-l10n-only unitcheck slowcheck screenshot subsequentcheck stagingcheck perfcheck uicheck clean check debugrun help showmodules translations
|
||||
.DEFAULT_GOAL := build
|
||||
|
||||
ifeq ($(gb_Side),build)
|
||||
build-tools : $(gb_BUILD_TOOLS)
|
||||
@@ -199,7 +196,7 @@ screenshot :
|
||||
$(call gb_Output_announce_bell)
|
||||
|
||||
# removing the dependency on build for now until we can make a full build with gbuild
|
||||
#subsequentcheck : all
|
||||
#subsequentcheck : build
|
||||
subsequentcheck :
|
||||
$(if $(gb_VERBOSE),$(call gb_Output_announce,loaded modules: $(sort $(gb_Module_ALLMODULES)),$(true),SCK,6))
|
||||
$(call gb_Output_announce_title,all subsequent tests checked.)
|
||||
|
@@ -27,7 +27,7 @@ IMPORTANT OPTIONS
|
||||
(descriptions from GNU make man page)
|
||||
|
||||
AVAILABLE TARGETS
|
||||
all build product and run unit tests (default goal)
|
||||
build build product (default goal)
|
||||
clean remove all generated files
|
||||
debugrun starts the INSTDIR instance and allows tests to
|
||||
be run against it. You can provide additional
|
||||
@@ -51,8 +51,8 @@ AVAILABLE TARGETS
|
||||
NOTE: needs graphviz to work
|
||||
showmodules shows all registered modules
|
||||
|
||||
<module> build the named module
|
||||
<module>.build build the named module without running unittests
|
||||
<module> build the named module (without running unittests)
|
||||
<module>.build an alias for the above
|
||||
<module>.check run unittests of the named module
|
||||
<module>.clean clean the named module
|
||||
<module>.all build the named module and the pre-requisite modules for it
|
||||
|
Reference in New Issue
Block a user