[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

devel/common Makefile.common,1.53,1.54



Author: katzj

Update of /cvs/pkgs/devel/common
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv30324

Modified Files:
	Makefile.common 
Log Message:
patch from Joe Orton for support for the following:
1) make patch CVE=xxxx-yyyy
2) add unused patches target; usage is make unused-patches | xargs cvs rm -f



Index: Makefile.common
===================================================================
RCS file: /cvs/pkgs/devel/common/Makefile.common,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- Makefile.common	4 May 2007 15:36:38 -0000	1.53
+++ Makefile.common	4 May 2007 15:39:29 -0000	1.54
@@ -407,7 +407,13 @@
 FILTERDIFF := cat
 endif
 
+ifdef CVE
+PATCHFILE := $(NAME)-$(VERSION)-CVE-$(CVE).patch
+SUFFIX := cve$(shell echo $(CVE) | sed s/.*-//)
+else
 PATCHFILE := $(NAME)-$(VERSION)-$(SUFFIX).patch
+endif
+
 patch:
 	@if test -z "$(SUFFIX)"; then echo "Must specify SUFFIX=whatever" ; exit 1; fi
 	(cd $(RPM_BUILD_DIR)/.. && gendiff $(NAME)-$(VERSION) .$(SUFFIX) | $(FILTERDIFF)) > $(PATCHFILE) || true
@@ -452,11 +458,15 @@
 	@echo "	clean			Remove srcs ($(SOURCEFILES)), export dir (cvs-$(TAG)) and srpm ($(NAME)-$(VERSION)-$(RELEASE).src.rpm)"
 	@echo "	patch SUFFIX=<suff>	Create and add a gendiff patch file"
 	@echo "	rediff SUFFIX=<suff>	Recreates a gendiff patch file, retaining comments"
+	@echo "	unused-patches		Print list of patches not referenced by name in specfile"
 	@echo "	gimmespec		Print the name of the specfile"
 
 gimmespec:
 	@echo "$(SPECFILE)"
 
+unused-patches:
+	@for f in *.patch; do if [ -e $$f ]; then grep -q $$f $(SPECFILE) || echo $$f; fi; done
+
 ##################### EXPERIMENTAL ##########################
 # this stuff is very experimental in nature and should not be
 # relied upon until these targets are moved above this line


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]