On Mi Juli 11 2007, Till Maas wrote:
> @$(BUILD_CLIENT) build $(BUILD_FLAGS) $(TARGET) '$(CVS_URL)'
> @$(BUILD_CLIENT) build --scratch $(BUILD_FLAGS) $(TARGET) '$(CVS_URL)'
> @$(BUILD_CLIENT) build --scratch --arch-override=$* $(BUILD_FLAGS)
> $(TARGET) '$(CVS_URL)'
This new patch uses a variable and the $(call ...) to reduce the redundant
code this way:
koji-build = $(BUILD_CLIENT) build $(1) $(BUILD_FLAGS) $(TARGET) '$(CVS_URL)'
koji: koji-check
$(call koji-build)
scratch-build: koji-check
$(call koji-build, --scratch)
scratch-build-%: koji-check
$(call koji-build, --scratch --arch-overwrite=$*)
Regards,
Till
Index: Makefile.common
===================================================================
RCS file: /cvs/pkgs/common/Makefile.common,v
retrieving revision 1.72
diff -u -r1.72 Makefile.common
--- Makefile.common 7 Jul 2007 15:11:29 -0000 1.72
+++ Makefile.common 11 Jul 2007 16:21:12 -0000
@@ -154,7 +154,7 @@
PREP_ARCHES = $(addprefix prep-,$(ARCHES))
## list all our bogus targets
-.PHONY :: $(ARCHES) sources uploadsource upload export check build-check plague koji build cvsurl chain-build test-srpm srpm tag force-tag verrel new clean patch prep compile install-short compile-short FORCE local
+.PHONY :: $(ARCHES) sources uploadsource upload export check build-check plague koji build cvsurl chain-build test-srpm srpm tag force-tag verrel new clean patch prep compile install-short compile-short FORCE local scratch-build scratch-build-% koji-check
# The TARGETS define is meant for local module targets that should be
# made in addition to the SOURCEFILES whenever needed
@@ -399,9 +399,13 @@
@if [ ! -x "$(PLAGUE_CLIENT)" ]; then echo "Must have plague-client installed - see http://fedoraproject.org/wiki/Extras/BuildSystemClientSetup"; exit 1; fi
$(PLAGUE_CLIENT) build $(NAME) $(TAG) $(TARGET)
-koji: build-check $(COMMON_DIR)/branches
+koji-check: build-check $(COMMON_DIR)/branches
@if [ ! -x "$(BUILD_CLIENT)" ]; then echo "Must have koji installed - see http://fedoraproject.org/wiki/BuildSystemClientSetup"; exit 1; fi
- @$(BUILD_CLIENT) build $(BUILD_FLAGS) $(TARGET) '$(CVS_URL)'
+
+koji-build = $(BUILD_CLIENT) build $(1) $(BUILD_FLAGS) $(TARGET) '$(CVS_URL)'
+
+koji: koji-check
+ $(call koji-build)
ifneq (, $(filter devel F-7 OLPC-2, $(BRANCH)))
build: koji
@@ -409,10 +413,18 @@
build: plague
endif
+scratch-build: koji-check
+ $(call koji-build, --scratch)
+
+
+scratch-build-%: koji-check
+ $(call koji-build, --scratch --arch-overwrite=$*)
+
+
cvsurl:
@echo '$(CVS_URL)'
-chain-build: build-check
+chain-build: koji-check
@if [ -z "$(CHAIN)" ]; then \
echo "Missing CHAIN variable, please specify the order of packages to" ; \
echo "chain build. For example: make chain-build CHAIN='foo bar'" ; \
@@ -530,6 +542,10 @@
@echo " in a group must build successfully and populate the repository before"
@echo " the next group will begin building."
@echo " If no groups are defined, packages will be built sequentially."
+ @echo " scratch-build Request scratch build of \"$(TAG)\" for $(TARGET)"
+ @echo " scratch-build-<archs> Request scratch build of \"$(TAG)\" for $(TARGET) and archs <archs>"
+ @echo " examples: make scratch-build-i386,ppc64"
+ @echo " make scratch-build-x86_64"
@echo " mockbuild Local test build using mock"
@echo " verrel Echo \"$(NAME)-$(VERSION)-$(RELEASE)\""
@echo " new Diff against last tag"
--
Fedora-buildsys-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/fedora-buildsys-list