Yosys does not support incremental synthesis. I don’t have any experience with what is being referenced in the discussion you linked to, but I do have some idea of what might it might be meaning (at least the make part, I don’t see how git comes into it). Say you have two modules, m1 and m2, in two separate source files, m1.v and m2.v. You then have some Yosys script which performs some pre processing/early synthesis, and dumps out the rtlil:
proc
opt
wreduce
# or if m1 and m2 require different pre-processing
read_verilog m1.v
hierarchy -top m1
proc
opt
write_rtlil m1.il
And then in the makefile you tell Yosys to read the input file (%.v in the target, $< in the recipe), run the script (early.ys), and write the output file (%.il in the target, $@ in the recipe):
%.il: %.v early.ys
yosys early.ys $< -o $@
# or if m1 and m2 require different pre-processing
m1.il: m1.v m1.ys
yosys m1.ys
m2.il: m2.v m2.ys
yosys m2.ys
Then you have some second script, which loads all of the intermediate rtlil files, performs the remainder of the synthesis, and writes the output:
read_rtlil m1.il m2.il
hierarchy -top top
flatten
opt
techmap
write_json final.json
And in the makefile:
final.json: m1.il m2.il final.ys
yosys final.ys
The first time you want to synthesize final.json, you run Yosys three times; once for each of m1.v and m2.v, and then once for the final design. If you modify m1.v, you then only need to run Yosys again twice and can skip the m2.v → m2.il, since it hasn’t changed. Running synthesis in this way will take longer when synthesizing the complete design, but the more you’re able to perform on each module, and the more modules you have, the more time saving you could potentially gain.