Skip to contentSkip to conversation

header install: cosmetic cleanups to kbuild infrastructure

PATCH In review Sam Ravnborg 2 participants 4 messages Jun 11, 2006 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 header install: cosmetic cleanups to kbuild infrastructure

A set of cosmetic cleanups for the header install kbuild infrastructure:

o Use consistent style for PHONY target in top-lvel Makefile
o Avoid '@', we want $(Q) so command is visible with make V=1
o Makefile.headerinst now fits within my 80 coloumn window
o Only accept Kbuild as input filename. This is new stuff so no need to be backward compatible here.
o A small comment in the top of the Makefile.headerinst file to explain variable usage. More is needed.

---

This is on top of hdrinstall-2.6.git as of yesterday.

Sam

Makefile +5 -5
index 8d92d78..0d372a6 100644
@@ -862,13 +862,13 @@ # Kernel headers
 INSTALL_HDR_PATH=$(MODLIB)/abi
 export INSTALL_HDR_PATH
 
-.PHONY: headers_install
-headers_install: include/linux/version.h
-	@unifdef -Ux /dev/null
-	@rm -rf $(INSTALL_HDR_PATH)/include
+PHONY += headers_install
+headers_install: prepare
+	$(Q)unifdef -Ux /dev/null
+	$(Q)rm -rf $(INSTALL_HDR_PATH)/include
 	$(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.headersinst obj=include
 
-.PHONY: headers_check
+PHONY += headers_check
 headers_check: headers_install
 	$(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.headersinst obj=include HDRCHECK=1
 
scripts/Makefile.headersinst +48 -33

121 lines not on this page · raw message

#1 lore raw

Makefile # Kernel headers · line 866

Quoted 2 lines · Sam Ravnborg
Makefile +1 -1
-headers_install: include/linux/version.h
+headers_install: prepare 

That breaks cross-export of headers when we don't have a cross-compiler.

I care about this case because it's how we do glibc-kernheaders for Fedora at the moment -- we build a tarball containing _all_ the headers, and that tarball is used as source for a separate glibc-kernheaders package, after reviewing the changes in it.

for a in x86_64 s390 ia64 powerpc sparc64; do
make ARCH=$a INSTALL_HDR_PATH=/tmp/fish/$a headers_install
done
cd /tmp/fish
mv usr usr.$$
mv x86_64 usr
mv usr/include/asm usr/include/asm-bix86
mv sparc64/include/asm usr/include/asm-bisparc
mv sparc64/include/asm-sparc{,64} usr/include
for a in s390 ia64 powerpc; do
mv -v $a/include/asm usr/include/asm-$a
rm -rf $a
done

Signature · 1 line
dwmw2
#2 lore raw
Quoted 5 lines · David Woodhouse

Makefile # Kernel headers · line 866

Quoted 2 lines · Sam Ravnborg
Makefile +1 -1
-headers_install: include/linux/version.h
+headers_install: prepare 

That breaks cross-export of headers when we don't have a cross-compiler.

That was i thinko that slept through. In general avoiding all the specific dependencies in the mess that is named Makefile is good but in this case there is no good reason to use the prepare targets.

Sam

#3 lore raw
Quoted 3 lines · Sam Ravnborg

That was i thinko that slept through. In general avoiding all the specific dependencies in the mess that is named Makefile is good but in this case there is no good reason to use the prepare targets.

OK, I've applied your patch and then switched that back to depend on include/linux/version.h again. Thanks.

Signature · 1 line
dwmw2