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

[Xen-changelog] [xen-unstable] Use new 'hg parents --template' support instead of awk scraping.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID b99d11877ba194fb3336d78aff28e028a0ed9fa5
# Parent  317e71a06828aa729be7e9fbd371fff1c50e9d65
Use new 'hg parents --template' support instead of awk scraping.
Also avoid use of non-portable 'whoami'. Use the USER env var instead.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -r 317e71a06828 -r b99d11877ba1 xen/Makefile
--- a/xen/Makefile      Tue Oct 17 19:04:46 2006 +0100
+++ b/xen/Makefile      Wed Oct 18 11:37:45 2006 +0100
@@ -93,14 +93,14 @@ include/xen/compile.h: include/xen/compi
 include/xen/compile.h: include/xen/compile.h.in
        @sed -e 's/@@date@@/$(shell LC_ALL=C date)/g' \
            -e 's/@@time@@/$(shell LC_ALL=C date +%T)/g' \
-           -e 's/@@whoami@@/$(shell whoami)/g' \
+           -e 's/@@whoami@@/$(USER)/g' \
            -e 's/@@domain@@/$(shell ([ -x /bin/dnsdomainname ] && 
/bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo 
[unknown]))/g' \
            -e 's/@@hostname@@/$(shell hostname)/g' \
            -e 's|@@compiler@@|$(shell $(CC) $(CFLAGS) -v 2>&1 | tail -n 1 | 
sed -e "s;|;/;")|g' \
            -e 's/@@version@@/$(XEN_VERSION)/g' \
            -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
            -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
-           -e 's!@@changeset@@!$(shell ((hg parents || head -n 7 ../ChangeLog 
|| echo date: unavailable) | awk '{FS="changeset:[ 
]+"}/^changeset/{CS=$$2};{FS="date:[ ]+"}/^date/{D=$$2}; END {print D, CS}') 
2>/dev/null)!g' \
+           -e 's!@@changeset@@!$(shell ((hg parents --template "{date|date} 
{rev}:{node|short}" >/dev/null && hg parents --template "{date|date} 
{rev}:{node|short}") || echo "unavailable") 2>/dev/null)!g' \
            < include/xen/compile.h.in > $@.new
        tools/figlet/figlet -d tools/figlet Xen $(XEN_FULLVERSION) >> $@.new
        @mv -f $@.new $@

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.