Skip to contentSkip to conversation

build: Some tweaks with makefiles and versions

PATCH New George Dunlap 2 participants 4 messages Mar 6, 2012 – Mar 7, 2012 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: Some tweaks with makefiles and versions

A couple of miscellaneous makefile tweaks to make it easier for packagers.

#1 lore raw

PATCH 1/1 build: Don't remove user-supplied xen-version during make clean

xen/Makefile is designed to allow the user to supply a file named xen/xen-include to change the format of xen version strings. Unfortunately, "make clean" removes xen/xen*, which will remove this file.

Make the clean process more targeted.

xen/Makefile +1 -1
diff -r e88a49951212 -r b5faa10db14d xen/Makefile
@@ -61,7 +61,7 @@ _clean: delete-unfresh-files
 	$(MAKE) -f $(BASEDIR)/Rules.mk -C xsm clean
 	$(MAKE) -f $(BASEDIR)/Rules.mk -C crypto clean
 	$(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) clean
-	rm -f include/asm *.o $(TARGET)* *~ core
+	rm -f include/asm *.o $(TARGET) $(TARGET).gz $(TARGET)-syms *~ core
 	rm -f include/asm-*/asm-offsets.h
 	[ -d tools/figlet ] && rm -f .banner*
#3 lore raw

PATCH 1/1 build: Add xenversion as a top-level target

In reply to George Dunlap

We already have xenversion as a target in the xen subdirectory; simply extend it so that "make xenversion" does what you'd expect.

Makefile +3 -0
diff -r b5faa10db14d -r 91b85d00ea54 Makefile
@@ -257,6 +257,9 @@ uninstall:
 linux26:
 	$(MAKE) 'KERNELS=linux-2.6*' kernels
 
+.PHONY: xenversion
+xenversion:
+	@$(MAKE) --no-print-directory -C xen xenversion
 
 #
 # tboot targets
#2 lore raw

Re: [PATCH 1 of 2] build: Don't remove user-supplied xen-version during make clean

In reply to George Dunlap
Quoted 13 lines
Quoted 1 line
Quoted 1 line · George Dunlap

xen/Makefile is designed to allow the user to supply a file named xen/xen-include to change the format of xen version strings. Unfortunately, "make clean" removes xen/xen*, which will remove this file.

Make the clean process more targeted.

diff -r e88a49951212 -r b5faa10db14d xen/Makefile

xen/Makefile _clean: delete-unfresh-files · line 64

Quoted 5 lines
xen/Makefile +1 -1
@@ -61,7 +61,7 @@ _clean: delete-unfresh-files
 	$(MAKE) -f $(BASEDIR)/Rules.mk -C xsm clean
 	$(MAKE) -f $(BASEDIR)/Rules.mk -C crypto clean
 	$(MAKE) -f $(BASEDIR)/Rules.mk -C arch/$(TARGET_ARCH) clean
-	rm -f include/asm *.o $(TARGET)* *~ core
+	rm -f include/asm *.o $(TARGET) $(TARGET).gz $(TARGET)-syms *~ core

Would probably better be $(TARGET).* to also cover xen.efi.

Jan

Quoted 8 lines
xen/Makefile +0 -0
 	rm -f include/asm-*/asm-offsets.h
 	[ -d tools/figlet ] && rm -f .banner*
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel