common Makefile.common,1.107,1.108

Dennis Gilmore (ausil) fedora-extras-commits at redhat.com
Tue Jul 29 15:42:22 UTC 2008


Author: ausil

Update of /cvs/extras/common
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv16670

Modified Files:
	Makefile.common 
Log Message:
add lint as a target,  thanks ajax



Index: Makefile.common
===================================================================
RCS file: /cvs/extras/common/Makefile.common,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -r1.107 -r1.108
--- Makefile.common	28 Jul 2008 22:36:27 -0000	1.107
+++ Makefile.common	29 Jul 2008 15:41:52 -0000	1.108
@@ -35,6 +35,7 @@
 
 BUILD_FLAGS ?= $(KOJI_FLAGS)
 
+LOCALARCH := $(if $(shell grep -i '^BuildArch:.*noarch' $(SPECFILE)), noarch, $(shell uname -m))
 
 ## a base directory where we'll put as much temporary working stuff as we can
 ifndef WORKDIR
@@ -314,6 +315,11 @@
 mockbuild : srpm
 	mock $(MOCKARGS) -r $(MOCKCFG) --resultdir=$(MOCKDIR)/$(TAG) rebuild $(SRCRPMDIR)/$(NAME)-$(VERSION)-$(RELEASE).src.rpm
 
+# check the build with rpmlint
+lint:
+	@test -e $(NAME)-$(VERSION)-$(RELEASE).src.rpm || (echo "run 'make local' first" ; exit 1 )
+	rpmlint $(NAME)-$(VERSION)-$(RELEASE).src.rpm $(LOCALARCH)/*-$(VERSION)-$(RELEASE).$(LOCALARCH).rpm
+
 # build for a particular arch
 $(ARCHES) : sources $(TARGETS)
 	$(RPM_WITH_DIRS) --target $@ -ba $(SPECFILE) 2>&1 | tee .build-$(VERSION)-$(RELEASE).log ; exit $${PIPESTATUS[0]}
@@ -322,7 +328,7 @@
 FORCE:
 
 # build whatever's appropriate for the local architecture
-local: $(if $(shell grep -i '^BuildArch:.*noarch' $(SPECFILE)), noarch, $(shell uname -m))
+local: $(LOCALARCH)
 
 # attempt to apply all the patches, optionally only for a particular arch
 ifdef PREPARCH
@@ -585,6 +591,7 @@
 	@echo "	install			Local test rpmbuild install"
 	@echo "	compile-short		Local test rpmbuild short-circuit compile"
 	@echo "	install-short		Local test rpmbuild short-circuit install"
+	@echo " lint			Run rpmlint against local build output"
 	@echo "	export			Create clean export in \"cvs-$(TAG)\""
 	@echo "	check			Check test srpm preps on all archs"
 	@echo "	srpm			Create a srpm"




More information about the scm-commits mailing list