[Tack-devel] ACK_HOME and em_path
Moved to https://github.com/davidgiven/ack
Brought to you by:
dtrg
From: Carl E. C. <cec...@ya...> - 2019-03-07 01:20:27
|
Greetings, Is it ok if eventually em_path.h is completely removed and is replaced by something that is checked at runtime instead of compile time? I do feel that doing this at compile time gives a bit of a limit on moving the install directory. For TMP_DIR, getenv() is used instead, this one is a no-brainer, and I already implemented it in the ANSI C porting. Now for EM_DIR, I propose the following: * ACK_HOME environment variable would need to be set for it be used and should point to ACK install directory. Now the additional question, let us assume ACK_HOME is not set, do we simply fail, or do we try to check additional things, like the following: ** If argv[0] contains a path, from there find and set ACK_HOME by deducing the installation path? ** If argv[0] contains no path, search the PATH environment variable for the executable and from there deduce the installation path? I would of course adapt the current Makefile to migrate and not break anything today, where INSDIR = ACK_HOME if available for example. Any opinions? Carl |