1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-06-12 23:10:51 +00:00

Use $(CURDIR) defined by make instead of using pwd

This commit is contained in:
Jonas Fonseca 2006-01-14 14:50:42 +01:00 committed by Jonas Fonseca
parent 97fcc99f4d
commit 9bd280b4f7

View File

@ -4,9 +4,8 @@
SHELL = @SHELL@
CURPATH = $(shell pwd)
TOPPATH = $(shell cd $(top_builddir) && pwd)
RELPATH = $(shell echo '$(CURPATH)' | sed 's,$(TOPPATH),,;s,^/,,;s,\([a-z0-9]\)$$,\1/,')
RELPATH = $(shell echo '$(CURDIR)' | sed 's,$(TOPPATH),,;s,^/,,;s,\([a-z0-9]\)$$,\1/,')
PATHSCRIPT = case '@top_srcdir@' in /*) ;; *) echo $(top_builddir)/;; esac
PATHPREFIX = $(shell $(PATHSCRIPT))
@ -14,7 +13,7 @@ PATHPREFIX = $(shell $(PATHSCRIPT))
top_srcdir = $(PATHPREFIX)@top_srcdir@
SRCPATH = $(shell cd $(top_srcdir)/$(RELPATH) && pwd)
ifeq ($(SRCPATH),$(CURPATH))
ifeq ($(SRCPATH),$(CURDIR))
srcdir =
else
srcdir = $(top_srcdir)/$(RELPATH)