Skip to contentSkip to conversation

MPC83xx: Fix makefile to generate config.h file in the build directory

PATCH New david.saada 1 participant 1 message Jun 18, 2007 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MPC83xx: Fix makefile to generate config.h file in the build directory

MPC83xx: Fix the Makefile config sections to generate the include/config.h file in the build directory instead of the source directory.

Makefile 2007-06-18 15:09:53.185261000 +0300 renamed from Makefile.orig 2007-06-12 15:23:00.000000000 +0300 +18 -15
diff -purN Makefile.orig Makefile
@@ -1643,14 +1643,15 @@ r5200_config :          unconfig
 
 MPC8313ERDB_33_config \
 MPC8313ERDB_66_config: unconfig
-       @echo "" >include/config.h ; \
+       @mkdir -p $(obj)include
+       @echo "" >$(obj)include/config.h ; \
        if [ "$(findstring _33_,$@)" ] ; then \
                echo -n "...33M ..." ; \
-               echo "#define CFG_33MHZ" >>include/config.h ; \
+               echo "#define CFG_33MHZ" >>$(obj)include/config.h ; \
        fi ; \
        if [ "$(findstring _66_,$@)" ] ; then \
                echo -n "...66M..." ; \
-               echo "#define CFG_66MHZ" >>include/config.h ; \
+               echo "#define CFG_66MHZ" >>$(obj)include/config.h ; \
        fi ;
        @$(MKCONFIG) -a MPC8313ERDB ppc mpc83xx mpc8313erdb
 
@@ -1658,23 +1659,24 @@ MPC832XEMDS_config \
 MPC832XEMDS_HOST_33_config \
 MPC832XEMDS_HOST_66_config \
 MPC832XEMDS_SLAVE_config:      unconfig
-       @echo "" >include/config.h ; \
+       @mkdir -p $(obj)include
+       @echo "" >$(obj)include/config.h ; \
        if [ "$(findstring _HOST_,$@)" ] ; then \
                echo -n "... PCI HOST " ; \
-               echo "#define CONFIG_PCI" >>include/config.h ; \
+               echo "#define CONFIG_PCI" >>$(obj)include/config.h ; \
        fi ; \
        if [ "$(findstring _SLAVE_,$@)" ] ; then \
                echo "...PCI SLAVE 66M"  ; \
-               echo "#define CONFIG_PCI" >>include/config.h ; \
-               echo "#define CONFIG_PCISLAVE" >>include/config.h ; \
+               echo "#define CONFIG_PCI" >>$(obj)include/config.h ; \
+               echo "#define CONFIG_PCISLAVE" >>$(obj)include/config.h ; \
        fi ; \
        if [ "$(findstring _33_,$@)" ] ; then \
                echo -n "...33M ..." ; \
-               echo "#define PCI_33M" >>include/config.h ; \
+               echo "#define PCI_33M" >>$(obj)include/config.h ; \
        fi ; \
        if [ "$(findstring _66_,$@)" ] ; then \
                echo -n "...66M..." ; \
-               echo "#define PCI_66M" >>include/config.h ; \
+               echo "#define PCI_66M" >>$(obj)include/config.h ; \
        fi ;
        @$(MKCONFIG) -a MPC832XEMDS ppc mpc83xx mpc832xemds
 
@@ -1699,23 +1701,24 @@ MPC8360EMDS_config \
 MPC8360EMDS_HOST_33_config \
 MPC8360EMDS_HOST_66_config \
 MPC8360EMDS_SLAVE_config:      unconfig
-       @echo "" >include/config.h ; \
+       @mkdir -p $(obj)include
+       @echo "" >$(obj)include/config.h ; \
        if [ "$(findstring _HOST_,$@)" ] ; then \
                echo -n "... PCI HOST " ; \
-               echo "#define CONFIG_PCI" >>include/config.h ; \
+               echo "#define CONFIG_PCI" >>$(obj)include/config.h ; \
        fi ; \
        if [ "$(findstring _SLAVE_,$@)" ] ; then \
                echo "...PCI SLAVE 66M"  ; \
-               echo "#define CONFIG_PCI" >>include/config.h ; \
-               echo "#define CONFIG_PCISLAVE" >>include/config.h ; \
+               echo "#define CONFIG_PCI" >>$(obj)include/config.h ; \
+               echo "#define CONFIG_PCISLAVE" >>$(obj)include/config.h ; \
        fi ; \
        if [ "$(findstring _33_,$@)" ] ; then \
                echo -n "...33M ..." ; \
-               echo "#define PCI_33M" >>include/config.h ; \
+               echo "#define PCI_33M" >>$(obj)include/config.h ; \
        fi ; \
        if [ "$(findstring _66_,$@)" ] ; then \
                echo -n "...66M..." ; \
-               echo "#define PCI_66M" >>include/config.h ; \
+               echo "#define PCI_66M" >>$(obj)include/config.h ; \
        fi ;
        @$(MKCONFIG) -a MPC8360EMDS ppc mpc83xx mpc8360emds
 
Signature · 2 lines
View this message in context: http://www.nabble.com/-PATCH--MPC83xx%3A-Fix-makefile-to-generate-config.h-file-in-the-build-directory-tf3941263.html#a11178836
Sent from the Uboot - Users mailing list archive at Nabble.com.