Skip to content

Commit 231789a

Browse files
Added restat = 1 in the fortran dyndep example
1 parent 2d9083b commit 231789a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

doc/manual.asciidoc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,8 +1022,8 @@ source file of a compile command.
10221022
+
10231023
This is for expressing dependencies that don't show up on the
10241024
command line of the command; for example, for a rule that runs a
1025-
script that reads a hardcoded file, the hardcoded file should
1026-
be an implicit dependency, as changes to the file should cause
1025+
script that reads a hardcoded file, the hardcoded file should
1026+
be an implicit dependency, as changes to the file should cause
10271027
the output to rebuild, even though it doesn't show up in the arguments.
10281028
+
10291029
Note that dependencies as loaded through depfiles have slightly different
@@ -1207,6 +1207,7 @@ as follows:
12071207
----
12081208
rule f95
12091209
command = f95 -o $out -c $in
1210+
restat = 1
12101211
rule fscan
12111212
command = fscan -o $out $in
12121213
@@ -1232,7 +1233,8 @@ build bar.o: dyndep | foo.mod
12321233
Ninja will load this file to add `foo.mod` as an implicit output of
12331234
`foo.o` and implicit input of `bar.o`. This ensures that the Fortran
12341235
sources are always compiled in the proper order and recompiled when
1235-
needed.
1236+
needed. The `restat = 1` is needed because
1237+
https://github.com/ninja-build/ninja/pull/2275[the fortran compiler does not update the timestamp of the module files if they already exist].
12361238

12371239
Tarball Extraction
12381240
^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)