diff --git a/Makefile b/Makefile index ce00bb667..7f95c5cd3 100644 --- a/Makefile +++ b/Makefile @@ -40,6 +40,8 @@ ifeq ($(WINTOOL),y) INCDIROPT = -w endif +APPDIR = ${shell pwd} + # Application Directories # SUBDIRS is the list of all directories containing Makefiles. It is used @@ -115,7 +117,7 @@ $(COBJS): %$(OBJEXT): %.c $(BUILTIN_APPS_BUILT): @for dir in $(BUILTIN_APPS_DIR) ; do \ - $(MAKE) -C $$dir TOPDIR="$(TOPDIR)" ; \ + $(MAKE) -C $$dir TOPDIR="$(TOPDIR)" APPDIR=$(APPDIR); \ done $(BIN): $(OBJS) $(BUILTIN_APPS_BUILT) @@ -131,13 +133,13 @@ $(BIN): $(OBJS) $(BUILTIN_APPS_BUILT) @touch $@ @for dir in $(BUILTIN_APPS_DIR) ; do \ rm -f $$dir/.depend ; \ - $(MAKE) -C $$dir TOPDIR="$(TOPDIR)" depend ; \ + $(MAKE) -C $$dir TOPDIR="$(TOPDIR)" APPDIR=$(APPDIR) depend ; \ done depend: .depend define MAKECLEAN - @(MAKE) -C $1 $2 TOPDIR="$(TOPDIR)" + @(MAKE) -C $1 $2 TOPDIR="$(TOPDIR)" APPDIR=$(APPDIR) endef clean: diff --git a/vsn/Makefile b/vsn/Makefile index 50aa42fcc..3dde8e605 100644 --- a/vsn/Makefile +++ b/vsn/Makefile @@ -43,7 +43,7 @@ all: nothing nothing: define DOMAKE - @(MAKE) -C $1 $2 TOPDIR="$(TOPDIR)" + @(MAKE) -C $1 $2 TOPDIR="$(TOPDIR) APPDIR=$(APPDIR)" endef depend: