aboutsummaryrefslogtreecommitdiff
path: root/scripts/mkflags.c
AgeCommit message (Collapse)Author
2014-05-10Catch duplicate command name (which breaks the build already, but doesn't ↵Rob Landley
identify the culprit).
2014-04-09_mkflags_ had an issue for generating FLAG_xxxx macros for long options.Ashwini Sharma
Only the first __long__ option, without any __short__ option had a proper flag value, rest all were defined to ZERO. Becaus the _flist_ was not moved to the next in this case.
2014-03-19There are cases when the long options are of the format abc-def. In current ↵Ashwini Sharma
implementation FLAG_xxx macros are generated for long options too. with __-__ sign in the macro, it will generate errors. I am of the opinion that __-__ be converted to '_' for generating the FLAG_xxx macros and be used in the command. This will enable the user to 'abc-def', but be handled like 'abc_def' in code.
2014-02-24Put all FOR_xxx blocks after all CLEANUP_xxx in generated/flags.h so the ↵Rob Landley
usages don't have to be in alphabetical order.
2014-02-16Make CLEANUP transitions work, so multiple NEWTOY() can exist in the same file.Rob Landley
Don't #undefine TT in the CLEANUP blocks of generated/flags.h, and #ifdef around the other TT definition. That way you can put a union at the start of your GLOBALS() with the arguments filled out by option parsing, and then have multiple main() functions with different argumetns and different FLAG_x macros, while sharing infrastructure that's not under lib.
2014-02-16Various cleanups found by Tom Sparrow's static analysis.Rob Landley
2014-02-08Fix segfault with single build of a command with bare longopts.Rob Landley
2013-10-03Switch flag generation from shell to C.Rob Landley
This should actually generate FLAG_longopt 0 #defines for disabled bare longopts (ala ls without --color). Put temporary executables under "generated" (including instlist for install).