It was interesting to me...
When you make changes to file1.c or file2.c or file1.h , the following makefile will recompile just what you need (which is nice)
# Link to executable result: file1.o file2.o gcc file1.o file2.o -o result23
However, when I move the constructed object to another directory, it is restored all the time, regardless of whether only one file content has been changed.
# Link to executable result: file1.o file2.o gcc file1.o file2.o -o result23
This seems to be happening because make does not know where the .o files are.
With this a few questions:
- Can they access environment variables? If so, can you give an example?
- Is it possible to get information about incremental strings when the distribution directory is different from the current directory?
source share