Using install prefix in a default heap path; Forcing gzip rewrite for man pages

original commit: 8e87ffbd2e4a2f62f7157228c002aba6d6de5bc6
This commit is contained in:
combinatorylogic 2016-04-28 11:54:37 +01:00
parent 690d20edc1
commit ed60710793
4 changed files with 19 additions and 9 deletions

12
c/heappath.h.in Normal file
View File

@ -0,0 +1,12 @@
#ifdef WIN32
/* by default, look in executable directory or in parallel boot directory */
#define defaultsystemheappath "%x;%x\\..\\..\\boot\\%m"
#define SEARCHPATHSEP ';'
#else /* not WIN32: */
#define SEARCHPATHSEP ':'
/* keep in sync with scheme.1 */
#define defaultsystemheappath "INSTALLPREFIX/lib/csv%v/%m"
#endif

View File

@ -403,11 +403,10 @@ static const char *path_last(p) const char *p; {
return p;
}
#include "heappath.h"
#define SEARCHPATHMAXSIZE 8192
#ifdef WIN32
/* by default, look in executable directory or in parallel boot directory */
#define defaultsystemheappath "%x;%x\\..\\..\\boot\\%m"
#define SEARCHPATHSEP ';'
static char *get_defaultheapdirs() {
char *result;
@ -419,10 +418,6 @@ static char *get_defaultheapdirs() {
return result;
}
#else /* not WIN32: */
#define SEARCHPATHSEP ':'
/* keep in sync with scheme.1 */
#define defaultsystemheappath "/usr/lib/csv%v/%m:/usr/local/lib/csv%v/%m"
static char *get_defaultheapdirs() {
static char defaultheapdirs[SEARCHPATHMAXSIZE];
const char *home;

3
configure vendored
View File

@ -255,3 +255,6 @@ sed -e "s;^m=none\$;m=$m;"\
-e "s;^TempRoot=.*;TempRoot=$temproot;"\
-e "s;^GzipManPages=.*$;GzipManPages=$gzipmanpages;"\
makefiles/Mf-install.in > $w/Mf-install
sed -e "s;INSTALLPREFIX;$installprefix;" c/heappath.h.in > $w/c/heappath.h

View File

@ -130,9 +130,9 @@ libbininstall: ${LibBin}
maninstall: scheme.1 petite.1 ${Man}
$I -m 444 scheme.1 ${Man}/${InstallSchemeName}.1
if [ ${GzipManPages} = yes ] ; then gzip ${Man}/${InstallSchemeName}.1 ; fi
if [ ${GzipManPages} = yes ] ; then gzip -f ${Man}/${InstallSchemeName}.1 ; fi
$I -m 444 petite.1 ${Man}/${InstallPetiteName}.1
if [ ${GzipManPages} = yes ] ; then gzip ${Man}/${InstallPetiteName}.1 ; fi
if [ ${GzipManPages} = yes ] ; then gzip -f ${Man}/${InstallPetiteName}.1 ; fi
liblibinstall: ${LibLib}
$I -m 444 ../examples/* ${LibLib}