makefile - Ensure that called scripts exist and are executable with make -


i have makefile call bunch of makers such compilers , small scripts. sometime (often clearcase issue), executable flag missing or worse script missing.

what best way check executable flag , existence of list of programs in makefile.

my first implementation foreach on each executable , call them, catch exit flag. because check takes time, had ifdef in order bypass check makes rules not need use these scripts. example case of make clean call rm has installed on platforms. don't need check other programs.

the second implementation check execution flag $(shell) , [ -x foo ] combined in ifdef directive. feed solution bit ugly.

the third solution call shell script job. however, shell script must remain executable in case. can foo != chmod u+x checker quite ugly.

what best solution?

will approach following help?

target: source ./script_1     test -x ./script_1 || chmod +x ./script_1     ./script_1 < source > target 

Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -