RFC: $(ARCH) in file

Gert-jan Los los en lsdb.bwl.uni-mannheim.de
Sab Ene 29 03:21:30 CST 2000


On Fri, Jan 28, 2000 at 11:11:05AM -0800, H. Peter Anvin wrote:
> > In <85g0vii63p.fsf en junk.nocrew.org> lars brinkhoff (lars en nocrew.org) wrote:
> > > Jeff Garzik <jgarzik en mandrakesoft.mandrakesoft.com> writes:
> > >> On 28 Jan 2000, lars brinkhoff wrote:
> > >> > 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".
> > >> How tough is it to edit the makefile? :)
> > 
> > > Not tough, but I think it's easier for people to type
> > >         echo FOO >.arch
> > > than to mess with the Makefile.
> > 
> > It's usually MUCH better to mess with the Makefile then to add kludges in
> > mainstream kernel. I think probability of acception is zero.
> > 
> 
> Actually, this seems like a reasonable hack to me.  However, why hide
> the file?
> 
You don't need a seperate file.  The .config file is the right place
for this kind of information.  With this patch you have to do
'make ARCH=foo config' just once.


diff -u linux/scripts/Configure cross/scripts/Configure
--- linux/scripts/Configure	Thu Nov 26 02:21:48 1998
+++ cross/scripts/Configure	Fri Nov 27 12:00:54 1998
@@ -483,6 +483,12 @@
 echo "# Automatically generated make config: don't edit" >> $CONFIG
 echo "#" >> $CONFIG
 
+#
+# Architecture 
+#
+echo "" >> $CONFIG
+echo "ARCH=$ARCH" >> $CONFIG
+
 echo "/*" > $CONFIG_H
 echo " * Automatically generated C config: don't edit" >> $CONFIG_H
 echo " */" >> $CONFIG_H
diff -u linux/scripts/Menuconfig cross/scripts/Menuconfig
--- linux/scripts/Menuconfig	Fri Jul 17 05:37:45 1998
+++ cross/scripts/Menuconfig	Wed Aug 19 10:49:19 1998
@@ -1120,6 +1120,12 @@
 	echo "#" >$CONFIG
 	echo "# Automatically generated by make menuconfig: don't edit" >>$CONFIG
 	echo "#" >>$CONFIG
+	echo "" >> $CONFIG
+	echo "ARCH=$ARCH" >> $CONFIG
+	echo "" >> $CONFIG
 
 	echo "/*" >$CONFIG_H
 	echo " * Automatically generated by make menuconfig: don't edit" >>$CONFIG_H


Bye
   Gert-jan


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



Más información sobre la lista de distribución Ayuda