[csw-devel] SF.net SVN: gar:[13908] csw/mgar/gar/v2
bdwalton at users.sourceforge.net
bdwalton at users.sourceforge.net
Mon Mar 21 20:14:42 CET 2011
Revision: 13908
http://gar.svn.sourceforge.net/gar/?rev=13908&view=rev
Author: bdwalton
Date: 2011-03-21 19:14:42 +0000 (Mon, 21 Mar 2011)
Log Message:
-----------
change git patching to use PATCHDIR instead of WORKSRC. defafult PATCHDIR to WORKDIR/DISTNAME instead of WORKSRC to make it independent of changes to WORKSRC by default
Modified Paths:
--------------
csw/mgar/gar/v2/gar.lib.mk
csw/mgar/gar/v2/gar.mk
Modified: csw/mgar/gar/v2/gar.lib.mk
===================================================================
--- csw/mgar/gar/v2/gar.lib.mk 2011-03-21 17:31:20 UTC (rev 13907)
+++ csw/mgar/gar/v2/gar.lib.mk 2011-03-21 19:14:42 UTC (rev 13908)
@@ -713,7 +713,7 @@
#################### PATCH RULES ####################
-PATCHDIR ?= $(WORKSRC)
+PATCHDIR ?= $(WORKDIR)/$(DISTNAME)
PATCHDIRLEVEL ?= 1
PATCHDIRFUZZ ?= 2
GARPATCH = gpatch -d$(PATCHDIR) -p$(PATCHDIRLEVEL) -F$(PATCHDIRFUZZ)
@@ -724,7 +724,7 @@
@echo " ==> Applying patch $(DOWNLOADDIR)/$*"
@xz -dc $(DOWNLOADDIR)/$* | $(GARPATCH)
@( if [ -z "$(NOGITPATCH)" ]; then \
- cd $(WORKSRC); git add -A; \
+ cd $(PATCHDIR); git add -A; \
git commit -am "old xz-style patch: $*"; \
fi )
@$(MAKECOOKIE)
@@ -734,7 +734,7 @@
@echo " ==> Applying patch $(DOWNLOADDIR)/$*"
@bzip2 -dc $(DOWNLOADDIR)/$* | $(GARPATCH)
@( if [ -z "$(NOGITPATCH)" ]; then \
- cd $(WORKSRC); git add -A; \
+ cd $(PATCHDIR); git add -A; \
git commit -am "old bz-style patch: $*"; \
fi )
@$(MAKECOOKIE)
@@ -744,7 +744,7 @@
@echo " ==> Applying patch $(DOWNLOADDIR)/$*"
@gzip -dc $(DOWNLOADDIR)/$* | $(GARPATCH)
@( if [ -z "$(NOGITPATCH)" ]; then \
- cd $(WORKSRC); git add -A; \
+ cd $(PATCHDIR); git add -A; \
git commit -am "old gz-style patch: $*"; \
fi )
@$(MAKECOOKIE)
@@ -754,7 +754,7 @@
@echo " ==> Applying patch $(DOWNLOADDIR)/$*"
@( if ggrep -q 'diff --git' $(abspath $(DOWNLOADDIR)/$*); then \
if [ -z "$(NOGITPATCH)" ]; then \
- cd $(WORKSRC);\
+ cd $(PATCHDIR);\
git am --ignore-space-change --ignore-whitespace $(abspath $(DOWNLOADDIR)/$*); \
else \
$(GARPATCH) < $(DOWNLOADDIR)/$*; \
@@ -763,7 +763,7 @@
echo Adding old-style patch...; \
$(GARPATCH) < $(DOWNLOADDIR)/$*; \
if [ -z "$(NOGITPATCH)" ]; then \
- cd $(WORKSRC); \
+ cd $(PATCHDIR); \
git add -A; \
git commit -am "old style patch: $*"; \
fi; \
Modified: csw/mgar/gar/v2/gar.mk
===================================================================
--- csw/mgar/gar/v2/gar.mk 2011-03-21 17:31:20 UTC (rev 13907)
+++ csw/mgar/gar/v2/gar.mk 2011-03-21 19:14:42 UTC (rev 13908)
@@ -428,9 +428,9 @@
@$(MAKECOOKIE)
post-extract-gitsnap: $(EXTRACT_TARGETS)
- @( if [ -d "$(WORKSRC)" ]; then \
+ @( if [ -d "$(PATCHDIR)" ]; then \
echo ' ==> Snapshotting extracted source tree with git'; \
- cd $(WORKSRC); git init; git add .; \
+ cd $(PATCHDIR); git init; git add .; \
git commit -m "Upstream $(VERSION)"; \
git tag -am "Upstream $(VERSION)" upstream-$(VERSION); \
git checkout -b csw; \
@@ -474,9 +474,9 @@
post-patch-gitsnap: $(PATCH_TARGETS)
- @( if [ -d "$(WORKSRC)/.git" ]; then \
+ @( if [ -d "$(PATCHDIR)/.git" ]; then \
echo "Tagging top of current csw patch stack..."; \
- cd $(WORKSRC); \
+ cd $(PATCHDIR); \
git tag -am "CSW $(VERSION)" csw-$(VERSION); \
fi )
@$(MAKECOOKIE)
@@ -490,9 +490,9 @@
# Allow generation of patches from modified work source.
makepatch-modulated: $(FILEDIR)
- @( if [ -d "$(WORKSRC)/.git" ]; then \
+ @( if [ -d "$(PATCHDIR)/.git" ]; then \
echo " ==> Makepatch: Looking for changes in modulation $(MODULATION)"; \
- cd $(WORKSRC); \
+ cd $(PATCHDIR); \
git add -u; \
git diff --cached --quiet; \
if test $$? -eq 0; then \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list