On Tue, Dec 10, 2019 at 08:31:20AM +0100, Thorben Römer wrote: > > and yes, the no-pandoc builds have to use the standard paths. > > Is this documented somewhere? Generanlly the no-pandoc build is only for some old OS's. Most new OS's should be installing pandoc and avoiding this flow. > >> With my limited time and expertise in the rdma-core project, I was only > >> able to come up with a solution that I don't find very practical. I will > >> append a diff of pandoc-prebuilt.py nonetheless, which replaces > >> hashing-calls for *.rst to *.in.rst if applicable. > > > > This just makes broken output if pandoc is not present, it is not practical. > > The diff just changes the filename from *.rst to *.in.rst before hashing > (get_id()). pandoc/rst2man are still called on the *.rst files (NOT the > *.in.rst files), but the filename is now based on the *.in.rst-file. But the scheme is to store the *output* of pandoc under the content hash of the input. So hashing the wrong input means you get the wrong output. The hash *must* be the exact input to pandoc and rst2man. > > The only good options is to shift the substition to after > > pandoc/rst2man run - but I'm not sure if that is doable.. > > To my understanding, this is basically what my diff does (although it > does not "shift" the substition, but rather just uses the unsubsituted > files to produce the names (hashes) for the prebuilt documentation). But > as I said previously, I also do not consider it a good fix for the problem. The shift is essential, if we retain @CMAKE_FOO@ through to the nroff then we could do substititon on the nroff output and everything would work sensibly. This seems a bit hard, but is the right way to make this work. Alternatively for your use case it might be more reasonable to copy the pandoc prebuilt files from a system with pandoc, that did a build with your desired path, onto your system without. Jason