[csw-devel] SF.net SVN: gar:[9841] csw/mgar/gar/v2-bwalton
bdwalton at users.sourceforge.net
bdwalton at users.sourceforge.net
Sat May 8 17:59:08 CEST 2010
Revision: 9841
http://gar.svn.sourceforge.net/gar/?rev=9841&view=rev
Author: bdwalton
Date: 2010-05-08 15:59:08 +0000 (Sat, 08 May 2010)
Log Message:
-----------
gar/v2-bwalton: add git handling of per-modulation makepatch
Modified Paths:
--------------
csw/mgar/gar/v2-bwalton/gar.conf.mk
csw/mgar/gar/v2-bwalton/gar.lib.mk
csw/mgar/gar/v2-bwalton/gar.mk
Modified: csw/mgar/gar/v2-bwalton/gar.conf.mk
===================================================================
--- csw/mgar/gar/v2-bwalton/gar.conf.mk 2010-05-08 07:51:11 UTC (rev 9840)
+++ csw/mgar/gar/v2-bwalton/gar.conf.mk 2010-05-08 15:59:08 UTC (rev 9841)
@@ -50,6 +50,10 @@
GIT_PROXY_SCRIPT ?= $(abspath $(GARBIN))/gitproxy
GIT_DEFAULT_TRACK = +refs/heads/master:refs/remotes/origin/master
+# if a user always wants --signoff, for example. used in makepatch
+# by default, the -v will show the diff being committed...
+GIT_COMMIT_OPTS ?= -v
+
# For parallel builds
PARALLELMODULATIONS ?=
MULTITAIL ?= /opt/csw/bin/multitail
Modified: csw/mgar/gar/v2-bwalton/gar.lib.mk
===================================================================
--- csw/mgar/gar/v2-bwalton/gar.lib.mk 2010-05-08 07:51:11 UTC (rev 9840)
+++ csw/mgar/gar/v2-bwalton/gar.lib.mk 2010-05-08 15:59:08 UTC (rev 9841)
@@ -475,7 +475,6 @@
normal-patch-%:
@echo " ==> Applying patch $(DOWNLOADDIR)/$*"
@( if ggrep -q 'Subject:' $(abspath $(DOWNLOADDIR)/$*); then \
- echo Adding git-style patch...; \
cd $(WORKSRC); git am $(abspath $(DOWNLOADDIR)/$*); \
else \
echo Adding old-style patch...; \
Modified: csw/mgar/gar/v2-bwalton/gar.mk
===================================================================
--- csw/mgar/gar/v2-bwalton/gar.mk 2010-05-08 07:51:11 UTC (rev 9840)
+++ csw/mgar/gar/v2-bwalton/gar.mk 2010-05-08 15:59:08 UTC (rev 9841)
@@ -144,6 +144,7 @@
define _modulate_do
$(call _modulate_target,extract,$(2),$(4))
$(call _modulate_target,patch,$(2),$(4))
+$(call _modulate_target_nocookie,makepatch,$(2),$(4))
$(call _modulate_target,configure,$(2),$(4))
$(call _modulate_target_nocookie,reset-configure,$(2),$(4))
$(call _modulate_target,build,$(2),$(4))
@@ -458,25 +459,33 @@
@$(foreach COOKIEFILE,$(PATCH_TARGETS), test -e $(COOKIEDIR)/$(COOKIEFILE) ;)
post-patch-gitsnap: $(WORKSRC) $(PATCH_TARGETS)
+ @echo "Tagging top of current csw patch stack..."
@( cd $(WORKSRC); git tag -am "CSW $(GARVERSION)" csw-$(GARVERSION) )
@$(MAKECOOKIE)
+makepatch: $(addprefix patch-,$(MODULATIONS)) $(addprefix makepatch-,$(MODULATIONS))
+ @$(DONADA)
+
# Allow generation of patches from modified work source.
-makepatch: $(FILEDIR)
- @echo Makepatch: Checking for changes in work tree...
- @( cd $(WORKSRC_FIRSTMOD); \
+makepatch-modulated: $(FILEDIR)
+ @echo " ==> Makepatch: Looking for changes in modulation $(MODULATION)"
+ @( cd $(WORKSRC); \
git add -A; \
git diff --cached --quiet; \
- if test $$? -eq 0; then echo "No changes."; exit 1; fi )
- @echo Makepatch: Capturing changes...
- @(cd $(WORKSRC_FIRSTMOD); \
- git commit; \
- git format-patch HEAD~1; \
- echo Add the following to your recipe and then; \
- echo rerun: gmake makesums; \
- echo PATCHFILES += 0001*; \
- mv 0001* $(abspath $(FILEDIR)) )
+ if test $$? -eq 0; then \
+ echo "No changes."; \
+ else \
+ echo "Capturing changes..."; \
+ git commit $(GIT_COMMIT_OPTS) && \
+ ( git format-patch csw-$(GARVERSION); \
+ echo Add the following to your recipe and then; \
+ echo rerun: gmake makesums; \
+ echo PATCHFILES += 0001*; \
+ echo "(or maybe PATCHFILES_$(MODULATION) ??)"; \
+ mv 0001* $(abspath $(FILEDIR)); ) \
+ fi )
+
# XXX: Allow patching of pristine sources separate from ISA directories
# XXX: Use makepatch on global/
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