diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-09-16 10:11:29 -0700 |
---|---|---|
committer | Eli Schwartz <eschwartz93@gmail.com> | 2021-09-20 01:25:21 -0400 |
commit | 40ff02268c7e7b3bf76ee4a42d8905acc0d0e415 (patch) | |
tree | 6120b74399dd6fb5f986c2a6b9834535db50b70a /test cases/fortran | |
parent | 276ff0cc892fbe948018334df58bed289b14f1a2 (diff) | |
download | meson-40ff02268c7e7b3bf76ee4a42d8905acc0d0e415.zip meson-40ff02268c7e7b3bf76ee4a42d8905acc0d0e415.tar.gz meson-40ff02268c7e7b3bf76ee4a42d8905acc0d0e415.tar.bz2 |
backend/ninja: add generated sources to depscan order deps
Since we changed to using a json file to avoid over long command lines
we created a situation where the generated files may not be ready when
the depscan happens. To avoid that, we need to add all of the generated
sources as order deps.
Fixes: #9258
Diffstat (limited to 'test cases/fortran')
-rw-r--r-- | test cases/fortran/7 generated/meson.build | 16 | ||||
-rw-r--r-- | test cases/fortran/7 generated/mod3.f90 (renamed from test cases/fortran/7 generated/mod3.fpp) | 2 |
2 files changed, 15 insertions, 3 deletions
diff --git a/test cases/fortran/7 generated/meson.build b/test cases/fortran/7 generated/meson.build index d1f483d..f021309 100644 --- a/test cases/fortran/7 generated/meson.build +++ b/test cases/fortran/7 generated/meson.build @@ -7,9 +7,21 @@ project('generated', 'fortran', conf_data = configuration_data() conf_data.set('ONE', 1) conf_data.set('TWO', 2) -conf_data.set('THREE', 3) -mod3_f = configure_file(input : 'mod3.fpp', output : 'mod3.f90', configuration : conf_data) +mod3_f = custom_target( + 'mod3.f', + input : 'mod3.f90', + output : 'mod3.f90', + # We need a platform agnostic way to do a copy a file, using a custom_target + # and we need to use the @OUTDIR@, not @OUTPUT@ in order to exercise + # https://github.com/mesonbuild/meson/issues/9258 + command : [ + find_program('python', 'python3'), '-c', + 'import sys, shutil; shutil.copy(sys.argv[1], sys.argv[2])', + '@INPUT@', '@OUTDIR@', + ], +) + three = library('mod3', mod3_f) templates_basenames = ['mod2', 'mod1'] diff --git a/test cases/fortran/7 generated/mod3.fpp b/test cases/fortran/7 generated/mod3.f90 index ab3db65..5e4b417 100644 --- a/test cases/fortran/7 generated/mod3.fpp +++ b/test cases/fortran/7 generated/mod3.f90 @@ -1,6 +1,6 @@ module mod3 implicit none -integer, parameter :: modval3 = @THREE@ +integer, parameter :: modval3 = 3 end module mod3 |