Skip to content
Advertisement

Makefile as simlink: not found

Is it possible to have a Makefile referenced by a simlink, and try calling action using make?

I am experiencing that calling make in a directory where Makefile is a simlink, Makefile is not found.

I have a need to reduce replication of Makefiles, and I would prefer using simlinks.

Suggestions?

Advertisement

Answer

It should work just fine:

test/
├── Makefile
└── mylink -> Makefile
cd test
make -f mylink
Hello
cat mylink
all:
        @echo "Hello"
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement