[parisc-linux-cvs] Makefile tidyup 2

Matthew Wilcox willy@ldl.fc.hp.com
Fri, 13 Jul 2001 22:55:28 -0600


Frobbing ARCH would lead to unwanted repercussions, so introduce a
new variable, default it to $ARCH, then change it if we're building
on parisc64.

Index: Makefile
===================================================================
RCS file: /home/cvs/parisc/linux/Makefile,v
retrieving revision 1.99
diff -u -p -r1.99 Makefile
--- Makefile	2001/07/14 04:39:00	1.99
+++ Makefile	2001/07/14 04:44:37
@@ -9,6 +9,8 @@ ARCH := $(shell uname -m | sed -e s/i.86
 
 ARCH := parisc
 
+UTS_MACHINE := $(ARCH)
+
 CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
 	  else if [ -x /bin/bash ]; then echo /bin/bash; \
 	  else echo bash; fi ; fi)
@@ -325,13 +327,8 @@ include/linux/version.h: ./Makefile
 	@echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))' >>.ver
 	@mv -f .ver $@
 
-ifdef CONFIG_PARISC64
-init/version.o: init/version.c include/linux/compile.h include/config/MARKER
-	$(CC) $(CFLAGS) $(CFLAGS_KERNEL) -DUTS_MACHINE='"$(ARCH)64"' -c -o init/version.o init/version.c
-else
 init/version.o: init/version.c include/linux/compile.h include/config/MARKER
-	$(CC) $(CFLAGS) $(CFLAGS_KERNEL) -DUTS_MACHINE='"$(ARCH)"' -c -o init/version.o init/version.c
-endif
+	$(CC) $(CFLAGS) $(CFLAGS_KERNEL) -DUTS_MACHINE='"$(UTS_MACHINE)"' -c -o init/version.o init/version.c
 
 init/main.o: init/main.c include/config/MARKER
 	$(CC) $(CFLAGS) $(CFLAGS_KERNEL) $(PROFILING) -c -o $*.o $<
Index: arch/parisc/Makefile
===================================================================
RCS file: /home/cvs/parisc/linux/arch/parisc/Makefile,v
retrieving revision 1.27
diff -u -p -r1.27 Makefile
--- Makefile	2001/07/14 04:39:01	1.27
+++ Makefile	2001/07/14 04:44:37
@@ -20,6 +20,7 @@
 ifdef CONFIG_PARISC64
 LINKFLAGS =-T $(TOPDIR)/arch/parisc/vmlinux64.lds $(LDFLAGS)
 CROSS_COMPILE := hppa64-linux-
+UTS_MACHINE := parisc64
 #CFLAGS += -b hppa64-linux
 
 else