logological / gpp

GPP, a generic preprocessor
https://logological.org/gpp
GNU Lesser General Public License v3.0
192 stars 33 forks source link

--include and file in a relative path are broken #16

Closed xdbr closed 6 years ago

xdbr commented 7 years ago

When using --include in combination with an infile in a relative directory, gpp is broken.

The following simple tests can illustrate this:

While this works as expected:

echo '#file' > test.txt && echo '#file' > inc.gpp && cat test.txt && gpp --include inc.gpp test.txt
#file
inc.gpptest.txt

Unfortunately, this does not:

mkdir -p test/ && echo '#file' > test/test.txt && echo '#file' > inc.gpp && cat test/test.txt &&  gpp --include inc.gpp test/test.txt
#file
test/test.txt:1: error: Requested include file not found