Re: parser option handling
Bernhard Fischer <[email protected]> Sun, 6 May 2007 12:19:20 +0200
| Newsgroups | gmane.comp.documentation.synopsis |
|---|---|
| Message-ID | <[email protected]> |
On Sat, May 05, 2007 at 04:26:23PM -0400, Stefan Seefeld wrote:
>Bernhard Fischer wrote:
>
>> For synopsis trunk, i'm using the new syntax, as you mention:
>>
>> $ make html
>> synopsis -p C --cprocessor=previous --cfilter=ssd
>> -Wp,cppflags="'-std=gnu99'",emulate_compiler="'gcc-mine -std=gnu99'"
>> -Iinclude -Ilibbb -I/home/cow/src/busybox_trunk/libbb --include
>> include/autoconf.h -D_GNU_SOURCE -DNDEBUG -D_LARGEFILE_SOURCE
>> -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
>> -D"BB_VER=KBUILD_STR\(1.6.0.svn\)" -DBB_BT=AUTOCONF_TIMESTAMP -o
>> applets/applets.syn applets/applets.c
>> Traceback (most recent call last):
>> File "/opt/synopsis-trunk/bin/synopsis", line 216, in ?
>> main()
>> File "/opt/synopsis-trunk/bin/synopsis", line 210, in main
>> processor = make_processor(sys.argv[1:])
>> File "/opt/synopsis-trunk/bin/synopsis", line 147, in make_processor
>> parser_opts['cppflags'].append('-I%s'%a)
>> AttributeError: 'str' object has no attribute 'append'
>
>That's an interesting error. It is caused by you passing 'cppflags'
>explicitely (as a string), and then adding to it (where it is assumed
>cppflags is a list). I have to think about how to prevent that. I guess
>such mixed usage of both 'cppflags' as well as '-D' etc. is rather uncommon.
if type(cppflags) is not ListType:
error('cppflags is not a list\n')