xorl has asked for the wisdom of the Perl Monks concerning the following question:
I'm using a Makefile to install multiple perl scripts. Before the scripts get installed I want to do a perl -c on them.
So my Makefile looks something like:
install: foo bar perl -c $^ $(INSTALL) $^ /usr/local/bin
Unfortunately the output indicates that it only checked foo and not bar.
Is there some way to make perl check all the files given to it or do I need to come up with some other way to do this in the Makefile?
Thanks in advance
Edit: Thanks to blue_cowdawg and Anon Monk for coming up with this solution:
install: foo bar for pl in $^; do perl -c -Mstrict $$pl || exit 1; done $(INSTALL) $^ /usr/local/bin
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: checking syntax on multiple files
by blue_cowdawg (Monsignor) on Jan 09, 2013 at 19:44 UTC | |
by xorl (Deacon) on Jan 09, 2013 at 20:01 UTC | |
by Anonymous Monk on Jan 09, 2013 at 21:41 UTC | |
Re: checking syntax on multiple files
by tobyink (Canon) on Jan 10, 2013 at 09:02 UTC |
Back to
Seekers of Perl Wisdom