Re: [PATCH]: linux-2.5.44uc1 (MMU-less support)

From: Sam Ravnborg (sam@ravnborg.org)
Date: Sat Oct 26 2002 - 15:18:56 EST


On Sun, Oct 27, 2002 at 02:19:38AM +1000, Greg Ungerer wrote:
> - arch Makefiles rewritten
Took a look at them.
See comments below.

        Sam

diff -Naur linux-2.5.44/arch/m68knommu/Makefile linux-2.5.44uc1/arch/m68knommu/Makefile
--- linux-2.5.44/arch/m68knommu/Makefile Thu Jan 1 10:00:00 1970
+++ linux-2.5.44uc1/arch/m68knommu/Makefile Sun Oct 27 02:09:09 2002
+PLATFORM = $(platform-y)

Use := no late evaluation required.
+MODEL = $(model-y)
See above.

+cpuclass-$(CONFIG_M68VZ328) := 68328
+CPUCLASS = $(cpuclass-y)
+CLASSDIR = arch/m68knommu/platform/$(cpuclass-y)/
ditto

+CLEAN_FILES += include/asm-$(ARCH)/asm-offsets.h.tmp \
+ include/asm-$(ARCH)/asm-offsets.h \
+ arch/$(ARCH)/kernel/asm-offsets.s
Use the new clean infrastrucute.
clean-files := include/asm-$(ARCH)/asm-offsets.h.tmp \
               include/asm-$(ARCH)/asm-offsets.h \
               arch/$(ARCH)/kernel/asm-offsets.s

+prepare: include/asm-$(ARCH)/asm-offsets.h

+archclean:
Add a call to clean boot - something like
        $(call descend arch/$(ARCH)/boot, subdirclean)

+
+arch/$(ARCH)/kernel/asm-offsets.s: include/asm include/linux/version.h \
+ include/config/MARKER
+
+include/asm-$(ARCH)/asm-offsets.h.tmp: arch/$(ARCH)/kernel/asm-offsets.s
+ @$(generate-asm-offsets.h) < $< > $@
+
+include/asm-$(ARCH)/asm-offsets.h: include/asm-$(ARCH)/asm-offsets.h.tmp
+ @echo -n ' Generating $@'
+ @$(update-if-changed)
Combine it like this instead:
include/asm-$(ARCH)/asm-offsets.h: arch/$(ARCH)/kernel/asm-offsets.s \
                                   include/asm include/linux/version.h \
                                   include/config/MARKER
        @echo -n ' Generating $@'
        @$(generate-asm-offsets.h) < $< > $@
        @$(update-if-changed)

Thats more readable, and follow te normal way of doing it.

diff -Naur linux-2.5.44/arch/m68knommu/boot/Makefile linux-2.5.44uc1/arch/m68knommu/boot/Makefile
--- linux-2.5.44/arch/m68knommu/boot/Makefile Thu Jan 1 10:00:00 1970
+++ linux-2.5.44uc1/arch/m68knommu/boot/Makefile Sun Oct 27 02:09:08 2002
@@ -0,0 +1,5 @@
+clean:
+ rm -f *.[oa]
+
+dep depend:
+ :
The above can safely be deleted.

General comment.
Use
EXTRA_TARGET :=
in replacement for
EXTRA_TARGETS =
Thas is required in many platform specific makefiles
diff -Naur linux-2.5.44/arch/m68knommu/platform/68328/Makefile linux-2.5.44uc1/arch/m68knommu/platform/68328/Makefile
+
+arch/m68knommu/platform/68328/$(BOARD)/bootlogo.rh: arch/m68knommu/platform/68328/bootlogo.h
+ perl arch/m68knommu/platform/68328/bootlogo.pl \
+ < arch/m68knommu/platform/68328/bootlogo.h \
+ > arch/m68knommu/platform/68328/$(BOARD)/bootlogo.rh
The following is more readable:
$obj)/$(BOARD)/bootlogo.rh: $(src)/bootlogo.h
        $(PERL) $(src)/bootlogo.pl < $(src)/bootlogo.h
> $(obj)/$(BOARD)/bootlogo.rh
diff -Naur linux-2.5.44/arch/m68knommu/platform/68EZ328/Makefile linux-2.5.44uc1/arch/m68knommu/platform/68EZ328/Makefile
+
$(obj)/$(BOARD)/bootlogo.rh: $(src)/bootlogo.h
        $(PERL) $(src)/bootlogo.pl < $(src)/bootlogo.h \
> $(obj)/$(BOARD)/bootlogo.rh

The same changes a listed above.
diff -Naur linux-2.5.44/arch/m68knommu/platform/68VZ328/Makefile linux-2.5.44uc1/arch/m68knommu/platform/68VZ328/Makefile
+arch/m68knommu/platform/68VZ328/$(BOARD)/bootlogo.rh: arch/m68knommu/platform/68EZ328/bootlogo.h
+ perl arch/m68knommu/platform/68328/bootlogo.pl \
+ < arch/m68knommu/platform/68EZ328/bootlogo.h \
+ > arch/m68knommu/platform/68VZ328/$(BOARD)/bootlogo.rh
Again - use $(obj) - $(src)

diff -Naur linux-2.5.44/arch/m68knommu/platform/Makefile linux-2.5.44uc1/arch/m68knommu/platform/Makefile
@@ -0,0 +1,6 @@
+#
+# Makefile for the arch/m68knommu/platform.
+#
+
+include $(TOPDIR)/Rules.make
+
This makefile looks not at all usefull for me.

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



This archive was generated by hypermail 2b29 : Thu Oct 31 2002 - 22:00:31 EST