On 9/11/13 8:49 PM, Erik Joelsson wrote:
if test `grep -i Algorithm $@ | wc | awk '{ print $1 }'` != 1; then \
echo "Some message" && false \
fi
This is an error.
How do I write the lines above inside CopyFiles.gmk?
I haven't tested the above so there might be bugs in it. Replace grep,
wc, echo and awk with the proper variables. I think there is a ';'
missing after false. Otherwise, just paste it into the recipe.
It seems there needs a pair of " around `. Don't why. Maybe it's about
the pipes?
I changed it to no pipe and seems working now
$(GREP) -i Algorithm [email protected] > $@
if [ `$(SED) -n -e "$$=" $@` != 1 ]; then \
$(ECHO) "Different algorithms defined in $^"; \
$(RM) $@; \
false ; \
fi
$(GREP) -iv Algorithm [email protected] >> $@
Here $@ only contains lines with "Algorithm".
I'll try a JPRT build.
Thanks
Max