[PATCH] build userfriendly targets from toplevel

Peter Foley (via Code Review) gerrit at gerrit.libreoffice.org
Sat Mar 2 10:05:57 PST 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/2518

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/18/2518/1

build userfriendly targets from toplevel

Change-Id: Iffbe6d4570bf4d4bdd7347260a6bb4160af24515
---
M Makefile.in
M solenv/gbuild/Module.mk
2 files changed, 38 insertions(+), 8 deletions(-)



diff --git a/Makefile.in b/Makefile.in
index 208f619..6164f8a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -74,7 +74,7 @@
 	cd $(SRCDIR)/$(1) && $(GNUMAKE) -j $(CHECK_PARALLELISM) $(GMAKE_OPTIONS) subsequentcheck
 
 $(1).all: bootstrap fetch
-	$(GNUMAKE) -j $(PARALLELISM) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.build $(WORKDIR)/Module/$(1) $(WORKDIR)/Module/check/$(1) $(WORKDIR)/Module/slowcheck/$(1)
+	$(GNUMAKE) -j $(PARALLELISM) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.build Module_$(1) Module_$(1).check Module_$(1).slowcheck
 
 endef
 
@@ -84,13 +84,42 @@
 
 $(eval $(call gbuild_modules_rules,$(filter-out Module%,$(subst /, ,$(subst $(SRCDIR)/,,$(wildcard $(SRCDIR)/*/Module_*.mk))))))
 
-# run a JunitTest - relies on naming convention (module prefix)
-$(WORKDIR)/JunitTest/%/done :
-	cd $(firstword $(subst _, ,$*)) && $(GNUMAKE) $(GMAKE_OPTIONS) $@
-
-# run a CppunitTest - relies on naming convention (module prefix)
-$(WORKDIR)/CppunitTest/%.test :
-	cd $(firstword $(subst _, ,$*)) && $(GNUMAKE) $(GMAKE_OPTIONS) $@
+gbuild_TARGETS := AllLangHelp \
+	AllLangResTarget \
+	AllLangZip \
+	AutoInstallLibs \
+	CliLibrary \
+	CliNativeLibrary \
+	CliUnoApiTarget \
+	Configuration \
+	CppunitTest \
+	CustomTarget \
+	Dictionary \
+	Executable \
+	Extension \
+	ExternalPackage \
+	ExternalProject \
+	InstallModule \
+	InstallScript \
+	InternalUnoApi \
+	Jar \
+	JunitTest \
+	Library \
+	Module \
+	Package \
+	Pagein \
+	Pyuno \
+	Rdb \
+	StaticLibrary \
+	UI \
+	UnoApi \
+	UnoApiMerge \
+	UnpackedTarball \
+	WinResTarget \
+	Zip
+# build a generic gbuild target
+$(foreach target,$(gbuild_TARGETS),$(target)_%):
+	$(GNUMAKE) -j $(PARALLELISM) $(GMAKE_OPTIONS) -f $(SRCDIR)/Makefile.build $@
 
 #
 # Clean
diff --git a/solenv/gbuild/Module.mk b/solenv/gbuild/Module.mk
index 9f545a4..4952651 100644
--- a/solenv/gbuild/Module.mk
+++ b/solenv/gbuild/Module.mk
@@ -164,6 +164,7 @@
 gb_Module_CLEANTARGETSTACK := $(call gb_Module_get_clean_target,$(1)) $(gb_Module_CLEANTARGETSTACK)
 gb_Module_CURRENTMODULE_DEBUG_ENABLED := $(call gb_Module__debug_enabled,$(1))
 gb_Module_CURRENTMODULE_NAME := $(1)
+$(call gb_Helper_make_userfriendly_targets,$(1),Module)
 
 endef
 

-- 
To view, visit https://gerrit.libreoffice.org/2518
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iffbe6d4570bf4d4bdd7347260a6bb4160af24515
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Peter Foley <pefoley2 at verizon.net>



More information about the LibreOffice mailing list