diff options
author | H. Nikolaus Schaller <hns@goldelico.com> | 2012-03-26 20:55:28 +0200 |
---|---|---|
committer | H. Nikolaus Schaller <hns@goldelico.com> | 2012-03-26 20:55:28 +0200 |
commit | 92988a21ad4c4c9504295ccb580c9f806134471b (patch) | |
tree | 5effc9f14170112450de05c67dafbe8d5034d595 /tools/scripts/define2mk.sed | |
parent | ca2b506783b676c95762c54ea24dcfdaae1947c9 (diff) | |
download | bootable_bootloader_goldelico_gta04-92988a21ad4c4c9504295ccb580c9f806134471b.zip bootable_bootloader_goldelico_gta04-92988a21ad4c4c9504295ccb580c9f806134471b.tar.gz bootable_bootloader_goldelico_gta04-92988a21ad4c4c9504295ccb580c9f806134471b.tar.bz2 |
added boot script files to repository
Diffstat (limited to 'tools/scripts/define2mk.sed')
-rw-r--r-- | tools/scripts/define2mk.sed | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/tools/scripts/define2mk.sed b/tools/scripts/define2mk.sed deleted file mode 100644 index 13e2845..0000000 --- a/tools/scripts/define2mk.sed +++ /dev/null @@ -1,33 +0,0 @@ -# -# Sed script to parse CPP macros and generate output usable by make -# -# It is expected that this script is fed the output of 'gpp -dM' -# which preprocesses the common.h header files and outputs the final -# list of CPP macros (and whitespace is sanitized) -# - -# Only process values prefixed with #define CONFIG_ -/^#define CONFIG_[A-Za-z0-9_][A-Za-z0-9_]*/ { - # Strip the #define prefix - s/#define *//; - # Change to form CONFIG_*=VALUE - s/ */=/; - # Drop trailing spaces - s/ *$//; - # drop quotes around string values - s/="\(.*\)"$/=\1/; - # Concatenate string values - s/" *"//g; - # 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/; - # Change '1' and empty values to "y" (not perfect, but - # supports conditional compilation in the makefiles - s/=$/=y/; - s/=1$/=y/; - # print the line - p -} |