Mercurial > hg > toybox
comparison scripts/make.sh @ 1074:82c5eb459a91 draft
Fix generated/oldtoys.h to contain option strings with USE() macros in them.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sun, 22 Sep 2013 03:37:39 -0500 |
parents | 626cc2108480 |
children | 1c15ba60aa64 |
comparison
equal
deleted
inserted
replaced
1073:3c0e653070d8 | 1074:82c5eb459a91 |
---|---|
54 | 54 |
55 echo "USE_TOYBOX(NEWTOY(toybox, NULL, TOYFLAG_STAYROOT))" > generated/newtoys.h | 55 echo "USE_TOYBOX(NEWTOY(toybox, NULL, TOYFLAG_STAYROOT))" > generated/newtoys.h |
56 sed -n -e 's/^USE_[A-Z0-9_]*(/&/p' toys/*/*.c \ | 56 sed -n -e 's/^USE_[A-Z0-9_]*(/&/p' toys/*/*.c \ |
57 | sed 's/\(.*TOY(\)\([^,]*\),\(.*\)/\2 \1\2,\3/' | sort -k 1,1 \ | 57 | sed 's/\(.*TOY(\)\([^,]*\),\(.*\)/\2 \1\2,\3/' | sort -k 1,1 \ |
58 | sed 's/[^ ]* //' >> generated/newtoys.h | 58 | sed 's/[^ ]* //' >> generated/newtoys.h |
59 sed -n 's/.*(NEWTOY(\([^,]*\), *\("[^,]*"\) *,.*/#define OPTSTR_\1\t\2/p' \ | 59 sed -n -e 's/.*(NEWTOY(\([^,]*\), *\(\("[^"]*"[^,]*\)*\),.*/#define OPTSTR_\1\t\2/p' \ |
60 generated/newtoys.h > generated/oldtoys.h | 60 generated/newtoys.h > generated/oldtoys.h |
61 | 61 |
62 # Extract list of command letters from processed header file | 62 # Extract list of command letters from processed header file |
63 | 63 |
64 function getflags() | 64 function getflags() |