Hello, please apply the attached patch. It makes the 'patch' and 'rediff' targets work when $(RPM_BUILD_DIR) was set to another directory. Enrico
2005-05-01 Enrico Scholz <enrico scholz informatik tu-chemnitz de>
* common/Makefile.common: make the 'patch' and 'rediff'
targets work when RPM_BUILD_DIR was set locally. This is
solved by executing the 'diff' commands in an own subshell
with a modified pwd while the output is redirected into
the actual working directory.
Index: Makefile.common
===================================================================
RCS file: /cvs/extras/common/Makefile.common,v
retrieving revision 1.10
diff -u -p -r1.10 Makefile.common
--- Makefile.common 13 Apr 2005 19:55:11 -0000 1.10
+++ Makefile.common 1 May 2005 13:07:50 -0000
@@ -328,7 +328,7 @@ endif
PATCHFILE := $(NAME)-$(VERSION)-$(SUFFIX).patch
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
+ (cd $(RPM_BUILD_DIR)/.. && gendiff $(NAME)-$(VERSION) .$(SUFFIX) | $(FILTERDIFF)) > $(PATCHFILE) || true
@if ! test -s $(PATCHFILE); then echo "Patch is empty!"; exit 1; fi
@echo "Created $(PATCHFILE)"
@grep "$(PATCHFILE)" CVS/Entries >&/dev/null || cvs add -ko $(PATCHFILE) || true
@@ -341,7 +341,7 @@ rediff:
@if ! test -f "$(PATCHFILE)"; then echo "$(PATCHFILE) not found"; exit 1; fi
@mv -f $(PATCHFILE) $(PATCHFILE)\~
@sed '/^--- /,$$d' < $(PATCHFILE)\~ > $(PATCHFILE)
- @cd $(RPM_BUILD_DIR)/.. && gendiff $(NAME)-$(VERSION) .$(SUFFIX) | $(FILTERDIFF) >> $(PATCHFILE) || true
+ @(cd $(RPM_BUILD_DIR)/.. && gendiff $(NAME)-$(VERSION) .$(SUFFIX) | $(FILTERDIFF)) >> $(PATCHFILE) || true
clog: $(SPECFILE)
@sed -n '/^%changelog/,/^$$/{/^%/d;/^$$/d;s/%%/%/g;p}' $(SPECFILE) | tee $@
Attachment:
pgpD9e0vIHeII.pgp
Description: PGP signature