Dave,

> Since the beginning of time, we've been running .api files through the C 
> preprocessor. Put all of your "typeonly..." definitions in a file, and 
> #include it. Should work immediately.
> 
> Thanks to Damjan, there's only one copy of the suffix rule, in 
> .../src/suffix-rules.mk. Here's the relevant rule:
> 
> %.api.h: %.api @VPPAPIGEN@
>       @echo "  APIGEN  " $@ ;                                 \
>       mkdir -p `dirname $@` ;                                 \
>       $(CC) $(CPPFLAGS) -E -P -C -x c $<                      \
>       | @VPPAPIGEN@ --input - --output $@ --show-name $@ > /dev/null

Sorry, for misunderstanding, this seems to work perfectly fine with the 
language bindings.

Verified by moving fib_path to types.api and comparing the resulting 
ip.api.json.

Need to figure how to deal with duplicates, which will end up in the .JSON 
definitions when multiple .api include the same file.
That shouldn't be a big deal though.

Best regards,
Ole

Attachment: signature.asc
Description: Message signed with OpenPGP

_______________________________________________
vpp-dev mailing list
vpp-dev@lists.fd.io
https://lists.fd.io/mailman/listinfo/vpp-dev

Reply via email to