RFC: $(ARCH) in file

From: lars brinkhoff (lars@nocrew.org)
Date: Fri Jan 28 2000 - 05:32:59 EST


This is a patch against the top-level Makefile in Linux 2.3.40. It will
use a file called .arch to decide which architecture to build for. If
no .arch file exists, it will be created.

Why do I want this? Because I often build for an architecture which is
not the native one. Saving the architecture in .arch is more convenient
then typing "make ARCH=foo".

Is is possible that Linus would accept this?

--- old.Makefile Fri Jan 28 10:58:10 2000
+++ Makefile Fri Jan 28 11:25:24 2000
@@ -3,7 +3,11 @@
 SUBLEVEL = 40
 EXTRAVERSION =
 
-ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
+ifneq (.arch,$(wildcard .arch))
+archdummy := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/ > .arch)
+endif
+
+ARCH := $(shell cat .arch)
 
 .EXPORT_ALL_VARIABLES:
 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jan 31 2000 - 21:00:20 EST