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

[Xen-devel] 12: xen-banner.patch



===
Name: xen-banner.patch
Depends: INSTALL.patch, parallel-make.patch, prefix-DESTDIR.patch,
proper-depends.patch
Description: split banner.h
 Split banner.h, to make it easier to edit, and more properly fit in with
 normal build systems.
 .
 Also, inline the rules to actually build figlet.
DiffStat:
 xen/Makefile                 |   50 +++++++++++++++++++++++--------------------
 xen/include/xen/banner.h     |   12 ++++++++++
 xen/include/xen/compile.h.in |   13 +++++++++++
 3 files changed, 52 insertions(+), 23 deletions(-)

===
Depends: INSTALL.patch, parallel-make.patch, prefix-DESTDIR.patch, 
proper-depends.patch
Description: split banner.h
 Split banner.h, to make it easier to edit, and more properly fit in with
 normal build systems.
 .
 Also, inline the rules to actually build figlet.

--- xen-2.0.3.orig/xen/include/xen/compile.h.in
+++ xen-2.0.3/xen/include/xen/compile.h.in
@@ -0,0 +1,13 @@
+#define XEN_COMPILE_DATE       "@@date@@"
+#define XEN_COMPILE_TIME       "@@time@@"
+#define XEN_COMPILE_BY         "@@whoami@@"
+#define XEN_COMPILE_DOMAIN     "@@domain@@"
+#define XEN_COMPILE_HOST       "@@hostname@@"
+#define XEN_COMPILER           "@@compiler@@"
+
+#define XEN_VERSION            @@version@@
+#define XEN_SUBVERSION         @@subversion@@
+#define XEN_EXTRAVERSION       @@extraversion@@
+
+#define XEN_CHANGESET          "@@changeset@@"
+#define XEN_BANNER             \
--- xen-2.0.3.orig/xen/include/xen/banner.h
+++ xen-2.0.3/xen/include/xen/banner.h
@@ -0,0 +1,12 @@
+"\040\137\137\040\040\137\137\040\040\040\040\040\040\040\040\040\040\040" \
+"\040\137\137\137\137\040\040\040\040\137\137\137\040\040\012\040\134\040" \
+"\134\057\040\057\137\137\137\040\137\040\137\137\040\040\040\174\137\137" \
+"\137\040\134\040\040\057\040\137\040\134\040\012\040\040\134\040\040\057" \
+"\057\040\137\040\134\040\047\137\040\134\040\040\040\040\137\137\051\040" \
+"\174\174\040\174\040\174\040\174\012\040\040\057\040\040\134\040\040\137" \
+"\137\057\040\174\040\174\040\174\040\040\057\040\137\137\057\040\174\040" \
+"\174\137\174\040\174\012\040\057\137\057\134\137\134\137\137\137\174\137" \
+"\174\040\174\137\174\040\174\137\137\137\137\137\050\137\051\137\137\137" \
+"\057\040\012\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040" \
+"\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\040\012" \
+
--- xen-2.0.3.orig/xen/Makefile
+++ xen-2.0.3/xen/Makefile
@@ -35,14 +35,13 @@
 clean: tools.clean common.clean drivers.clean arch/$(TARGET_ARCH).clean
        rm -f include/asm *.o $(TARGET)* *~ core include/xen/compile.h
        rm -f include/asm-*/asm-offsets.h
+       rm -f tools/figlet/*.o tools/figlet/figlet

 tools.clean common.clean drivers.clean arch/$(TARGET_ARCH).clean : %.clean:
        $(MAKE) -C $* clean

-$(TARGET): delete-unfresh-files
+$(TARGET): delete-unfresh-files include/xen/compile.h
        [ -e include/asm ] || ln -sf asm-$(TARGET_ARCH) include/asm
-       $(MAKE) -C tools
-       $(MAKE) include/xen/compile.h
        $(MAKE) -C arch/$(TARGET_ARCH) asm-offsets.s
        $(MAKE) include/asm-$(TARGET_ARCH)/asm-offsets.h
        $(MAKE) -C common
@@ -54,26 +53,31 @@
        rm -f include/xen/compile.h common/kernel.o

 # compile.h contains dynamic build info. Rebuilt on every 'make' invocation.
-include/xen/compile.h:
-       @LANG=C echo /\* Autogenerated by root Makefile. Do not edit. \*/ > $@
-       @LANG=C echo >> $@
-       @LANG=C echo \#define XEN_COMPILE_DATE \"`date`\" >> $@
-       @LANG=C echo \#define XEN_COMPILE_TIME \"`date +%T`\" >> $@
-       @LANG=C echo \#define XEN_COMPILE_BY \"`whoami`\" >> $@
-       @LANG=C echo \#define XEN_COMPILE_DOMAIN \"`([ -x /bin/dnsdomainname ] 
&& /bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo 
[unknown])`\" >> $@
-       @LANG=C echo \#define XEN_COMPILE_HOST \"`hostname`\" >> $@
-       @LANG=C echo \#define XEN_COMPILER \"`$(CC) $(CFLAGS) -v 2>&1 | tail -n 
1`\" >> $@
-       @LANG=C echo >> $@
-       @LANG=C echo \#define XEN_VERSION\ \ \ \ \ \ $(XEN_VERSION) >> $@
-       @LANG=C echo \#define XEN_SUBVERSION\ \ \ $(XEN_SUBVERSION) >> $@
-       @LANG=C echo \#define XEN_EXTRAVERSION \"$(XEN_EXTRAVERSION)\" >> $@
-       @LANG=C echo >> $@
-       @LANG=C echo \#define XEN_CHANGESET \"`bk changes -nd':D: :T: :REV: 
:MD5KEY:' -r+ 2>/dev/null || echo "information unavailable"`\" >> $@
-       @LANG=C echo >> $@
-       @LANG=C echo \#define XEN_BANNER \\ >> $@
-       ( cd ./tools/figlet && ./figlet Xen 
$(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION) 1>>../../$@ )
-       @LANG=C echo >> $@
-
+include/xen/compile.h: LANG=C
+include/xen/compile.h: include/xen/compile.h.in include/xen/banner.h
+       sed -e 's/@@date@@/$(shell date)/g' \
+           -e 's/@@time@@/$(shell date +%T)/g' \
+           -e 's/@@whoami@@/$(shell whoami)/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 -1)/g' \
+           -e 's/@@version@@/$(XEN_VERSION)/g' \
+           -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
+           -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
+           -e 's/@@changeset@@/$(shell bk changes -nd':D: :T: :REV: :MD5KEY:' 
-r+ 2>/dev/null || echo information unavailable)/g' \
+           < include/xen/compile.h.in > $@.new
+       cat include/xen/banner.h >> $@.new
+       mv $@.new $@
+
+tools/figlet/figlet: tools/figlet/figlet.o
+       $(CC) -o $@ $<
+tools/figlet/figlet.o: tools/figlet/figlet.c
+       $(CC) -o $@ -c $<
+
+include/xen/banner.h: tools/figlet/figlet tools/figlet/xen.flf
+       tools/figlet/figlet -d tools/figlet Xen 
$(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION) > $@.new
+       mv $@.new $@
+
 include/asm-$(TARGET_ARCH)/asm-offsets.h: arch/$(TARGET_ARCH)/asm-offsets.s
        @(set -e; \
          echo "/*"; \

===



-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel


 


Rackspace

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