Hello Experts,
I have an elaborate recursive make system and I want an easy way to have
the name of the source file handy. To this end, I can use
.o : %.c
$Q$(CC) -D BASENAME_FILE="$(shell basename $<)" $(CFLAGS) -c $< -o $@
However, this is probably not very neat as I want all variables to reflect
in CFLAGS.
I am more comfortable in using something like ..
CFLAGS += -D BASENAME_FILE="$$(notdir $$<)"
in my top level Makefile and hope that this will be enough in my
multi-layer build system. However, this does not work. Can somebody help me
on this?
Regards,
Ajay.
_______________________________________________
Help-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-make