kbuild: Compatible with old bash, fix help, make clean fix

kbuild: Compatible with old bash, fix help, make clean fix

Post by Sam Ravnbor » Mon, 04 Nov 2002 11:00:10



kbuild fixes:
o Do not use "-" in exported symbols, bash does not support that (Keith)
o Sort ALL_SUBDIRS, to avoid warning about duplicate target
        - Happens when the same directory are specified with drivers-y
          and drivers-n
o Added AWK, a few architectures actually use awk for normal compilation
o Removed distclean from make help, now that distclean and mrporper are merged

        Sam

The following files are touched:
 Makefile               |   17 +++++++++--------
 scripts/Makefile.build |    2 +-
 2 files changed, 10 insertions(+), 9 deletions(-)

===== Makefile 1.338 vs edited =====
--- 1.338/Makefile      Fri Nov  1 18:00:18 2002

 STRIP          = $(CROSS_COMPILE)strip
 OBJCOPY                = $(CROSS_COMPILE)objcopy
 OBJDUMP                = $(CROSS_COMPILE)objdump
+AWK            = awk
 GENKSYMS       = /sbin/genksyms
 DEPMOD         = /sbin/depmod

 ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)

-export include-config := 1
+export include_config := 1

 -include .config

                     $(core-y) $(core-m) $(drivers-y) $(drivers-m) \
                     $(net-y) $(net-m) $(libs-y) $(libs-m)))

-ALL_SUBDIRS     := $(SUBDIRS) $(patsubst %/,%,$(filter %/, $(init-n) $(init-) \
+ALL_SUBDIRS     := $(sort $(SUBDIRS) $(patsubst %/,%,$(filter %/, \
+                    $(init-n) $(init-) \
                     $(core-n) $(core-) $(drivers-n) $(drivers-) \
-                    $(net-n) $(net-) $(libs-n) $(libs-)))
+                    $(net-n)  $(net-)  $(libs-n)    $(libs-))))

 init-y         := $(patsubst %/, %/built-in.o, $(init-y))

 net-y          := $(patsubst %/, %/built-in.o, $(net-y))
 libs-y         := $(patsubst %/, %/lib.a, $(libs-y))

-ifdef include-config
+ifdef include_config

 # Here goes the main Makefile

        rpm -ta $(TOPDIR)/../$(KERNELPATH).tar.gz ; \
        rm $(TOPDIR)/../$(KERNELPATH).tar.gz

-else # ifdef include-config
+else # ifdef include_config

 ifeq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),)

 help:









 endif # ifeq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),)
-endif # ifdef include-config
+endif # ifdef include_config

 # FIXME Should go into a make.lib or something
 # ===========================================================================
===== scripts/Makefile.build 1.7 vs edited =====
--- 1.7/scripts/Makefile.build  Wed Oct 30 18:14:54 2002

 .PHONY: __build
 __build:

-ifdef include-config
+ifdef include_config
 include .config
 endif

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

kbuild: Compatible with old bash, fix help, make clean fix

Post by Keith Owen » Mon, 04 Nov 2002 13:00:09


On Sun, 3 Nov 2002 09:51:47 +0100,


>o Added AWK, a few architectures actually use awk for normal compilation

Needs to be exported as well.
-       CPP AR NM STRIP OBJCOPY OBJDUMP MAKE GENKSYMS PERL UTS_MACHINE \
+       CPP AR NM STRIP OBJCOPY OBJDUMP MAKE GENKSYMS PERL AWK UTS_MACHINE \

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

 
 
 

kbuild: Compatible with old bash, fix help, make clean fix

Post by Sam Ravnbor » Mon, 04 Nov 2002 20:50:11


AWK exported now, as pointed out by Keith.

kbuild fixes:
o Do not use "-" in exported symbols, bash does not support that (Matthew/Keith)
o Sort ALL_SUBDIRS, to avoid warning about duplicate target
        - Happens when the same directory are specified with drivers-y
          and drivers-n
o Added AWK, a few architectures actually use awk for normal compilation
o Removed distclean from make help, now that distclean and mrporper are merged

        Sam

Touches these files:

 Makefile               |   19 ++++++++++---------
 scripts/Makefile.build |    2 +-
 2 files changed, 11 insertions(+), 10 deletions(-)

===== Makefile 1.338 vs edited =====
--- 1.338/Makefile      Fri Nov  1 18:00:18 2002

 STRIP          = $(CROSS_COMPILE)strip
 OBJCOPY                = $(CROSS_COMPILE)objcopy
 OBJDUMP                = $(CROSS_COMPILE)objdump
+AWK            = awk
 GENKSYMS       = /sbin/genksyms
 DEPMOD         = /sbin/depmod

 export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \
        CONFIG_SHELL TOPDIR HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \
-       CPP AR NM STRIP OBJCOPY OBJDUMP MAKE GENKSYMS PERL UTS_MACHINE \
+       CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE \
        HOSTCXX HOSTCXXFLAGS


 ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),)

-export include-config := 1
+export include_config := 1

 -include .config

                     $(core-y) $(core-m) $(drivers-y) $(drivers-m) \
                     $(net-y) $(net-m) $(libs-y) $(libs-m)))

-ALL_SUBDIRS     := $(SUBDIRS) $(patsubst %/,%,$(filter %/, $(init-n) $(init-) \
+ALL_SUBDIRS     := $(sort $(SUBDIRS) $(patsubst %/,%,$(filter %/, \
+                    $(init-n) $(init-) \
                     $(core-n) $(core-) $(drivers-n) $(drivers-) \
-                    $(net-n) $(net-) $(libs-n) $(libs-)))
+                    $(net-n)  $(net-)  $(libs-n)    $(libs-))))

 init-y         := $(patsubst %/, %/built-in.o, $(init-y))

 net-y          := $(patsubst %/, %/built-in.o, $(net-y))
 libs-y         := $(patsubst %/, %/lib.a, $(libs-y))

-ifdef include-config
+ifdef include_config

 # Here goes the main Makefile

        rpm -ta $(TOPDIR)/../$(KERNELPATH).tar.gz ; \
        rm $(TOPDIR)/../$(KERNELPATH).tar.gz

-else # ifdef include-config
+else # ifdef include_config

 ifeq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),)

 help:









 endif # ifeq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),)
-endif # ifdef include-config
+endif # ifdef include_config

 # FIXME Should go into a make.lib or something
 # ===========================================================================
===== scripts/Makefile.build 1.7 vs edited =====
--- 1.7/scripts/Makefile.build  Wed Oct 30 18:14:54 2002

 .PHONY: __build
 __build:

-ifdef include-config
+ifdef include_config
 include .config
 endif

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/