On 09/13/2012 06:56 PM, Werner LEMBERG wrote:
BTW: The patch to mkind.c of makeindex V2.15 is generic and should
permanently be in anyway to make makeindex buildable without the
whole TeX source tree, if KPATHSEA is not required. I'll inform the
current maintainer, maybe he will consider the patch.
Thanks for your report. Please resend the two patches, this time
created with `diff -u ...' to get a contextual diff.
Certainly, I knew I missed sthg. Only attached now patch-friendly
mkind.c, the Makefile has to remain unchanged from makeindex 2.12, but
build for troff with
make CFLAGS="$(CFLAGS) -D USE_KPATHSEA=0"
Werner
--- mkind.c.o 2012-09-13 16:51:51.898487744 +0200
+++ mkind.c 2012-09-13 16:47:27.250487745 +0200
@@ -328,7 +328,10 @@
#endif
if (ind_given) {
- if (!kpse_out_name_ok(ind_fn) ||
+ if (
+#if USE_KPATHSEA
+ !kpse_out_name_ok(ind_fn) ||
+#endif
(!ind_fp && ((ind_fp = OPEN_OUT(ind_fn)) == NULL)))
FATAL1("Can't create output index file %s.\n", ind_fn);
} else {
@@ -340,7 +343,10 @@
}
if (ilg_given) {
- if (!kpse_out_name_ok(ilg_fn) ||
+ if (
+#if USE_KPATHSEA
+ !kpse_out_name_ok(ilg_fn) ||
+#endif
(!ilg_fp && ((ilg_fp = OPEN_OUT(ilg_fn)) == NULL)))
FATAL1("Can't create transcript file %s.\n", ilg_fn);
} else {
@@ -395,7 +401,10 @@
idx_fn = fn;
if ( ( open_fn &&
- (!kpse_in_name_ok(idx_fn) ||
+ (
+#if USE_KPATHSEA
+ !kpse_in_name_ok(idx_fn) ||
+#endif
(idx_fp = OPEN_IN(idx_fn)) == NULL)
) ||
((!open_fn) && (access(idx_fn, R_OK) != 0))) {
@@ -415,7 +424,10 @@
snprintf(tmp_fn, STRING_MAX+5, "%s%s", base, INDEX_IDX);
idx_fn = tmp_fn;
if ((open_fn &&
- (!kpse_in_name_ok(idx_fn) ||
+ (
+#if USE_KPATHSEA
+ !kpse_in_name_ok(idx_fn) ||
+#endif
(idx_fp = OPEN_IN(idx_fn)) == NULL)
) ||
((!open_fn) && (access(idx_fn, R_OK) != 0))) {
@@ -437,7 +449,10 @@
snprintf(ind, sizeof(ind), "%s%s", base, INDEX_IND);
ind_fn = ind;
}
- if (!kpse_out_name_ok(ind_fn) ||
+ if (
+#if USE_KPATHSEA
+ !kpse_out_name_ok(ind_fn) ||
+#endif
((ind_fp = OPEN_OUT(ind_fn)) == NULL))
FATAL1("Can't create output index file %s.\n", ind_fn);
@@ -446,13 +461,19 @@
snprintf(ilg, sizeof(ilg), "%s%s", base, INDEX_ILG);
ilg_fn = ilg;
}
- if (!kpse_out_name_ok(ilg_fn) ||
+ if (
+#if USE_KPATHSEA
+ !kpse_out_name_ok(ilg_fn) ||
+#endif
((ilg_fp = OPEN_OUT(ilg_fn)) == NULL))
FATAL1("Can't create transcript file %s.\n", ilg_fn);
if (log_given) {
snprintf(log_fn, sizeof(log_fn), "%s%s", base, INDEX_LOG);
- if (!kpse_in_name_ok(log_fn) ||
+ if (
+#if USE_KPATHSEA
+ !kpse_in_name_ok(log_fn) ||
+#endif
(log_fp = OPEN_IN(log_fn)) == NULL) {
FATAL1("Source log file %s not found.\n", log_fn);
} else {