Hi everybody,

(Please keep CC'd in replies, as I am not subscribed to the mailing list.)

As part of a personal project I made a small patch for Lemon which adds
support for a "-d<path>" command line option, which allows specifying the
directory where the output files are to be placed. You can grab the patch
here:

  https://people.igalia.com/aperez/files/lemon-add-outdir-flag.patch

This addition was motivated by the usage of the Meson [1] build system,
which always does out-of-tree builds, with all the generated source files
being places inside the build directory.

Once the patch above is applied, it is possible to use Lemon as follows
inside a "meson.build" file:

  lemon_exe = executable('lemon', 'lemon.c',
      install: false, build_by_default: false)

  lemon = generator(lemon_exe, output: ['@BASENAME@.c', '@BASENAME.h@],
      arguments: [ '-T' + join_paths(meson.current_source_dir(), 'lempar.c'),
              '-d@BUILD_DIR@', @INPUT@ ])

  exe = executable('a.out', 'main.c', lemon.process('parse.y'))

I imagine the "-d<path>" option may be useful for others using Lemon, and
it would be great if you could include the changes proposed in the patch
(or something similar).

Last but not least, thanks for publishing the source code for Lemon along
with the rest of SQLite — they are very fine pieces of software.

Best regards,

--
 Adrián 🎩

[1] http://mesonbuild.com/

Attachment: pgpbtIbWxh83O.pgp
Description: PGP signature

_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to