mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Move RELPATH variable setup to Makefile.config.in and fix srcdir
The fix involves detecting of relative vs absolute paths. Should probably be done at configure time, but keep it dynamic for now.
This commit is contained in:
parent
81384fbdaa
commit
b72ab2268e
@ -5,8 +5,15 @@
|
||||
|
||||
SHELL = @SHELL@
|
||||
|
||||
top_srcdir = $(path_to_top)/@top_srcdir@
|
||||
srcdir = $(top_srcdir)/$(shell pwd | sed 's!.*/\($(shell echo $(path_to_top) | sed 's!\.\.![^/]*!')\)$$!\1!')
|
||||
CURPATH = $(shell pwd)
|
||||
TOPPATH = $(shell cd $(path_to_top) && pwd)
|
||||
RELPATH = $(shell echo '$(CURPATH)' | sed 's,$(TOPPATH),,;s,^/,,;s,\([a-z0-9]\)$$,\1/,')
|
||||
|
||||
PATHSCRIPT = case '@top_srcdir@' in /*) ;; *) echo $(path_to_top)/;; esac
|
||||
PATHPREFIX = $(shell $(PATHSCRIPT))
|
||||
|
||||
top_srcdir = $(PATHPREFIX)@top_srcdir@
|
||||
srcdir = $(top_srcdir)/$(RELPATH)
|
||||
top_builddir = $(path_to_top)
|
||||
prefix = @prefix@
|
||||
exec_prefix = @exec_prefix@
|
||||
@ -56,7 +63,7 @@ LIBDIR = @LIBDIR@
|
||||
LOCALEDIR = @LOCALEDIR@
|
||||
LUA_CFLAGS = @LUA_CFLAGS@
|
||||
LUA_LIBS = @LUA_LIBS@
|
||||
MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@
|
||||
MKINSTALLDIRS = $(PATHPREFIX)@MKINSTALLDIRS@
|
||||
MSGFMT = @MSGFMT@
|
||||
OPENSSL_CFLAGS = @OPENSSL_CFLAGS@
|
||||
PACKAGE = @PACKAGE@
|
||||
|
@ -14,10 +14,6 @@ else
|
||||
mquiet = quiet_
|
||||
endif
|
||||
|
||||
CURPATH = $(shell pwd)
|
||||
TOPPATH = $(shell cd $(path_to_top) && pwd)
|
||||
RELPATH = $(shell echo '$(CURPATH)' | sed 's,$(TOPPATH),,;s,^/,,;s,\([a-z0-9]\)$$,\1/,')
|
||||
|
||||
# Show the command (quiet or non-quiet version based on the assignment
|
||||
# just above) and then execute it.
|
||||
ncmd = $(if $($(quiet)cmd_$(1)),echo $($(quiet)cmd_$(1)) &&) $(cmd_$(1))
|
||||
|
Loading…
Reference in New Issue
Block a user