Rules.make minor improvement

Vladimir Volovich (vvv@vvv.vsu.ru)
Thu, 29 May 1997 21:13:51 +0400


Hi,

Here is a little patch that improves Rules.make:
first, it gets rid of the `scripts/pathdown.sh' script (which
may be deleted because afaik it's used only for Rules.make);
second, in the current version of Rules.make, the names of all links
to modules contain two slashes instead of one. :-)
Perhaps, this change is bash-specific, but e.g. `make config' is also bash-specific.

-------- 8< -------- 8< -------- 8< -------- 8< -------- 8< -------- 8< --------
--- linux-2.1.41/Rules.make.orig Thu May 29 19:28:49 1997
+++ linux-2.1.41/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 echo $${PWD#$$TOPDIR/})/$$i; done
endif

#
-------- >8 -------- >8 -------- >8 -------- >8 -------- >8 -------- >8 --------

-- 
With best regards,
                   Vladimir.