harvard-lts / kakadu-vips

Kakadu JP2 reader and writer for libvips
Apache License 2.0
3 stars 0 forks source link

Hardcoded paths in `src/.depend` #17

Closed scossu closed 2 months ago

scossu commented 3 months ago

The depend file has local paths hardcoded in it.

I am not sure if this is an artifact that was inadvertently checked in, or what its role is in compiling, but now I get this error when I try to compile the project:

 make: *** No rule to make target '/home/john/vips/include/vips/vips.h', needed by 'kakaduload.o'.  Stop.
scossu commented 3 months ago

I can confirm that removing .depend fixes the compilation. See PR #18 .

jcupitt commented 2 months ago

Hi @scossu,

I improved Makefile to use the compiler's automatic dependency management, you can see the code here:

https://github.com/harvard-lts/kakadu-vips/blob/main/src/Makefile#L34-L37

So it runs the compiler with -MM (meaning "make makefile") and stores the dependency list in .depend.

A bit further down you can see that this file is removed by make distclean, the rule that resets a build directory:

https://github.com/harvard-lts/kakadu-vips/blob/main/src/Makefile#L42-L43

However, I agree this shouldn't be checked in to git. The best way to fix this is to remove the file, and also to add .depend to .gitignore, the set of files that are blocked from source control:

https://github.com/harvard-lts/kakadu-vips/blob/main/.gitignore