Messages in this thread Patch in this message | | | Date | Sun, 01 Jun 1997 17:17:25 +0400 | From | Vladimir Volovich <> | Subject | Re: Rules.make minor improvement |
| |
Hi,
F.D. wrote:
> The patch doesn't work for me. Without it, I always got this: > > cdrom.o -> ..//cdrom.o > mcdx.o -> ..//mcdx.o
Without patch you should have gotten the following:
cdrom.o -> ../drivers/cdrom//cdrom.o mcdx.o -> ../drivers/cdrom//mcdx.o
but NOT what you wrote. > pathdown.sh worked fine when called from command line > but called from make it always returns an empty string.
Does this mean that `make modules' does not work for you even without the patch?
> With your patch applied I get this: > > lp.o -> ..//linux/lp.o > rd.o -> ..//linux/rd.o > slip.o -> ..//linux/slip.o
With this patch you should get:
lp.o -> ../drivers/char/lp.o rd.o -> ../drivers/block/rd.o slip.o -> ../drivers/net/slip.o > Again, typing echo ${PWD#$TOPDIR/} from command line in > /linux/fs/isofs with TOPDIR=/linux retuns: fs/isofs
This is exactly what you should get. These problems probably appear because you are running make not from bash. You should have /bin/bash or /bin/sh to be the *real* bourne-compatible shell. Please, try out the corrected patch:
----------------------------- --- linux-2.1.42/Rules.make.orig Thu May 29 19:28:49 1997 +++ linux-2.1.42/Rules.make Thu May 29 20:43:47 1997 @@ -105,9 +105,6 @@ # A rule to make modules # ALL_MOBJS = $(MX_OBJS) $(M_OBJS) -ifneq "$(strip $(ALL_MOBJS))" "" -PDWN=$(shell $(CONFIG_SHELL) $(TOPDIR)/scripts/pathdown.sh) -endif modules: $(ALL_MOBJS) $(MIX_OBJS) $(MI_OBJS) dummy ifdef MOD_SUB_DIRS set -e; for i in $(MOD_SUB_DIRS); do $(MAKE) -C $$i modules; done @@ -129,9 +126,8 @@ endif endif ifneq "$(strip $(ALL_MOBJS))" "" - echo $(PDWN) cd $$TOPDIR/modules; for i in $(ALL_MOBJS); do \ - ln -sf ../$(PDWN)/$$i .; done + ln -sf ../$(shell $(CONFIG_SHELL) -c 'echo $${PWD#$$TOPDIR/}')/$$i; done endif # ----------------------------- With best regards, Vladimir.
| |