[PARISC] Make palo target work when $obj != $src

Stumbled upon when I was testing it out and using
make O=... to build.

Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
This commit is contained in:
Kyle McMartin 2007-10-20 09:31:33 -07:00
parent 7425ada2d0
commit f67d4033c1
1 changed files with 9 additions and 5 deletions

View File

@ -78,20 +78,24 @@ PALO := $(shell if which palo; then : ; \
elif [ -x /sbin/palo ]; then echo /sbin/palo; \ elif [ -x /sbin/palo ]; then echo /sbin/palo; \
fi) fi)
PALOCONF := $(shell if [ -f $(src)/palo.conf ]; then echo $(src)/palo.conf; \
else echo $(obj)/palo.conf; \
fi)
palo: vmlinux palo: vmlinux
@if test ! -x $(PALO); then \ @if test ! -x "$(PALO)"; then \
echo 'ERROR: Please install palo first (apt-get install palo)';\ echo 'ERROR: Please install palo first (apt-get install palo)';\
echo 'or build it from source and install it somewhere in your $$PATH';\ echo 'or build it from source and install it somewhere in your $$PATH';\
false; \ false; \
fi fi
@if test ! -f ./palo.conf; then \ @if test ! -f "$(PALOCONF)"; then \
cp arch/parisc/defpalo.conf palo.conf; \ cp $(src)/arch/parisc/defpalo.conf $(obj)/palo.conf; \
echo 'A generic palo config file (./palo.conf) has been created for you.'; \ echo 'A generic palo config file ($(obj)/palo.conf) has been created for you.'; \
echo 'You should check it and re-run "make palo".'; \ echo 'You should check it and re-run "make palo".'; \
echo 'WARNING: the "lifimage" file is now placed in this directory by default!'; \ echo 'WARNING: the "lifimage" file is now placed in this directory by default!'; \
false; \ false; \
fi fi
$(PALO) -f ./palo.conf $(PALO) -f $(PALOCONF)
# Shorthands for known targets not supported by parisc, use vmlinux as default # Shorthands for known targets not supported by parisc, use vmlinux as default
Image zImage bzImage: vmlinux Image zImage bzImage: vmlinux