meson.build 558 B

123456789101112131415161718192021
  1. project('custom target dependency', 'c')
  2. # Sometimes custom targets do not take input files
  3. # but instead do globbing or some similar wackiness.
  4. # In this case we need to be able to specify a
  5. # manual dependency between two custom targets,
  6. # if one needs to be run before the other.
  7. g1 = find_program('gen1.py')
  8. g2 = find_program('gen2.py')
  9. c1 = custom_target('medput',
  10. input : 'input.dat',
  11. output : 'medput.tmp',
  12. command : [g1, '@INPUT@', '@OUTPUT@'])
  13. custom_target('output',
  14. output : 'output.dat',
  15. command : [g2, '@OUTDIR@', '@OUTPUT@'],
  16. depends : c1)