]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - tools/scripts/define2mk.sed
armv7:TI: Add <asm/ti-common/sys_proto.h> and migrate omap_hw_init_context
[karo-tx-uboot.git] / tools / scripts / define2mk.sed
index af40bfaf2e8758607d5e64072063b883301ca40e..c641edfb0194ba81195e930b668c6250c90072d8 100644 (file)
        s/="\(.*\)"$/=\1/;
        # Concatenate string values
        s/" *"//g;
-       # Wrap non-numeral values with quotes
-       s/=\(.*\?[^0-9].*\)$/=\"\1\"/;
+       # Assume strings as default - add quotes around values
+       s/=\(..*\)/="\1"/;
+       # but remove again from decimal numbers
+       s/="\([0-9][0-9]*\)"/=\1/;
+       # ... and from hex numbers
+       s/="\(0[Xx][0-9a-fA-F][0-9a-fA-F]*\)"/=\1/;
+       # ... and from configs defined from other configs
+       s/="\(CONFIG_[A-Za-z0-9_][A-Za-z0-9_]*\)"/=$(\1)/;
        # Change '1' and empty values to "y" (not perfect, but
        # supports conditional compilation in the makefiles
        s/=$/=y/;