summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile6
-rw-r--r--txr.c10
2 files changed, 5 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index c9d0f99d..64c2f02a 100644
--- a/Makefile
+++ b/Makefile
@@ -325,9 +325,11 @@ dbg/ffi.o: TXR_CFLAGS += $(LIBFFI_CFLAGS)
# calculations.
opt/txr.o: TXR_CFLAGS += -DPROG_NAME=\"$(PROG)\" \
- -DTXR_REL_PATH=\"$(bindir_rel)/$(PROG)$(EXE)\"
+ -DTXR_REL_PATH=\"$(bindir_rel)/$(PROG)$(EXE)\" \
+ -DTXR_INST_PATH=\"$(bindir)/$(PROG)$(EXE)\"
dbg/txr.o: TXR_CFLAGS += -DPROG_NAME=\"$(PROG)-dbg\" \
- -DTXR_REL_PATH=\"$(bindir_rel)/$(PROG)-dbg$(EXE)\"
+ -DTXR_REL_PATH=\"$(bindir_rel)/$(PROG)-dbg$(EXE)\" \
+ -DTXR_INST_PATH=\"$(bindir)/$(PROG)$(EXE)\"
opt/txr-win.o: TXR_CFLAGS += -DPROG_NAME=\"$(PROG)-win\" \
-DTXR_REL_PATH=\"$(bindir_rel)/$(PROG)-win$(EXE)\"
dbg/txr-win.o: TXR_CFLAGS += -DPROG_NAME=\"$(PROG)-win-dbg\" \
diff --git a/txr.c b/txr.c
index 197f6515..a77c53c9 100644
--- a/txr.c
+++ b/txr.c
@@ -254,15 +254,7 @@ static val get_self_path(void)
#else
static val get_self_path(void)
{
- char self[PATH_MAX];
-
- if (!progname_u8)
- return nil;
-
- if (realpath(progname_u8, self))
- return string_utf8(self);
-
- return nil;
+ return lit(TXR_INST_PATH);
}
#endif