|
From: <ar...@sy...> - 2008-02-26 10:57:26
|
Author: arighi
Date: 2008-02-26 04:57:17 -0600 (Tue, 26 Feb 2008)
New Revision: 4413
Modified:
trunk/Makefile
Log:
- fix: remove README.unstable not present error when building unstable versions
from tar.bz2
The file README.unstable is not present in tar.bz2, it's only in svn
repository, but Makefile always uses it. This fix skips the README replacement
with README.unstable if README.unstable doesn't exist.
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2008-02-25 09:56:58 UTC (rev 4412)
+++ trunk/Makefile 2008-02-26 10:57:17 UTC (rev 4413)
@@ -515,12 +515,14 @@
$(GETSOURCE) $(shell dirname $(LINUX_URL))/linux-$(linux_version).tar.bz2 $(TOPDIR)/tmp/systemimager-$(VERSION)-complete_source/src;)
$(MAKE) -C $(TOPDIR)/tmp/systemimager-$(VERSION)-complete_source clean
ifeq ($(UNSTABLE), 1)
- cd $(TOPDIR)/tmp/systemimager-$(VERSION)-complete_source && cp README README.tmp
- cd $(TOPDIR)/tmp/systemimager-$(VERSION)-complete_source && cp README.unstable README
- cd $(TOPDIR)/tmp/systemimager-$(VERSION)-complete_source && cat README.tmp >> README
- cd $(TOPDIR)/tmp/systemimager-$(VERSION)-complete_source && rm README.tmp
+ if [ -f README.unstable ]; then \
+ cd $(TOPDIR)/tmp/systemimager-$(VERSION)-complete_source && cp README README.tmp; \
+ cd $(TOPDIR)/tmp/systemimager-$(VERSION)-complete_source && cp README.unstable README; \
+ cd $(TOPDIR)/tmp/systemimager-$(VERSION)-complete_source && cat README.tmp >> README; \
+ cd $(TOPDIR)/tmp/systemimager-$(VERSION)-complete_source && rm README.tmp; \
+ fi
endif
- rm $(TOPDIR)/tmp/systemimager-$(VERSION)-complete_source/README.unstable
+ rm -f $(TOPDIR)/tmp/systemimager-$(VERSION)-complete_source/README.unstable
perl -pi -e "s/^%define\s+ver\s+\d+\.\d+\.\d+.*/%define ver $(VERSION)/" \
$(TOPDIR)/tmp/systemimager-$(VERSION)-complete_source/systemimager.spec
find $(TOPDIR)/tmp/systemimager-$(VERSION)-complete_source -type f -exec chmod ug+r {} \;
@@ -546,12 +548,14 @@
(cd $(TOPDIR) && tar --exclude=tmp -cvf - .) | (cd $(TOPDIR)/tmp/systemimager-$(VERSION) && tar -xvf -); \
fi
ifeq ($(UNSTABLE), 1)
- cd $(TOPDIR)/tmp/systemimager-$(VERSION) && cp README README.tmp
- cd $(TOPDIR)/tmp/systemimager-$(VERSION) && cp README.unstable README
- cd $(TOPDIR)/tmp/systemimager-$(VERSION) && cat README.tmp >> README
- cd $(TOPDIR)/tmp/systemimager-$(VERSION) && rm README.tmp
+ if [ -f README.unstable ]; then \
+ cd $(TOPDIR)/tmp/systemimager-$(VERSION) && cp README README.tmp; \
+ cd $(TOPDIR)/tmp/systemimager-$(VERSION) && cp README.unstable README; \
+ cd $(TOPDIR)/tmp/systemimager-$(VERSION) && cat README.tmp >> README; \
+ cd $(TOPDIR)/tmp/systemimager-$(VERSION) && rm README.tmp; \
+ fi
endif
- rm $(TOPDIR)/tmp/systemimager-$(VERSION)/README.unstable
+ rm -f $(TOPDIR)/tmp/systemimager-$(VERSION)/README.unstable
perl -pi -e "s/^%define\s+ver\s+\d+\.\d+\.\d+.*/%define ver $(VERSION)/" \
$(TOPDIR)/tmp/systemimager-$(VERSION)/systemimager.spec
find $(TOPDIR)/tmp/systemimager-$(VERSION) -type f -exec chmod ug+r {} \;
|