Is it possible to have case insensitive targets with GNU make?
Is it possible to design a makefile so that
make program_name
produces the same result as
make PROGRAM_NAME
?
I know I can do the following in the makefile
program_name : PROGRAM_NAME
but I don't know if there is a way to streamline this 开发者_StackOverflow中文版for multiple targets. We have about 50 or so targets.
Crude but effective:
PROGRAM_NAME:
@echo do something for $@
ANOTHER_TARGET:
@echo do something else for $@
YET_ANOTHER:
@echo and something else for $@
% :
@$(MAKE) `echo $@ | tr [:lower:] [:upper:]`
精彩评论