Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

camlp4 (ocaml 3.04) don't honor the PREFIX makefile variable correctly. #3082

Closed
vicuna opened this issue Dec 14, 2001 · 1 comment
Closed
Labels

Comments

@vicuna
Copy link

vicuna commented Dec 14, 2001

Original bug ID: 717
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Hello, ...

Camlp4 in ocaml 3.04 don't honor the PREFIX Makefile variable correctly, this
hinders instalation in a place which is not the same as the one it was
configured as (for package building, as i do for the debian packages).

The currently generated camlp4/config/Makefile includes :

PREFIX=/usr/local
BINDIR=/usr/local/bin
LIBDIR=/usr/local/lib/ocaml/camlp4
MANDIR=/usr/local/man/man1

While :

PREFIX=/usr
BINDIR=$(PREFIX)/bin
LIBDIR=$(PREFIX)/lib/ocaml/camlp4
MANDIR=$(PREFIX)/man/man1

Is wanted ...

Sadly, i have not (yet) found a propper fix to this, i did just do the
following in configure :

-EXE=$exe ./configure_batch -bindir "$bindir" -libdir "$libdir/camlp4" -mandir "$mandir" -ocaml-top ../.. > /dev/null
+EXE=$exe ./configure_batch -prefix "$prefix" -ocaml-top ../.. > /dev/null

which fixed the prefix handling, but did natrally break the specifying of a
separate bin, lib or mandir.

I needed also to hand change the libdir in camlp4/config/configure_batch :

  • "") echo 'LIBDIR=$(PREFIX)/lib/camlp4' >> Makefile.cnf
  •  libdir="$prefix/lib/camlp4";;
    
  • "") echo 'LIBDIR=$(PREFIX)/lib/ocaml/camlp4' >> Makefile.cnf
  •  libdir="$prefix/lib/ocaml/camlp4";;
    

A small patch is attached, but it is not more than a quick workaround.

Friendly,

Sven Luther


--- configure.orig Fri Dec 14 15:20:48 2001
+++ configure Fri Dec 14 15:26:09 2001
@@ -1148,7 +1148,7 @@
fi

if test $has_tk = true; then

  • if sh ./hasgot $tk_x11_include $tk_defs -i tk.h; then
  • if cc="$cc" sh ./hasgot "$tk_x11_include $tk_defs" -i tk.h; then
    echo "tk.h found."
    else
    echo "tk.h not found."
    @@ -1204,7 +1204,7 @@

(
cd ../../camlp4/config
-EXE=$exe ./configure_batch -bindir "$bindir" -libdir "$libdir/camlp4" -mandir "$mandir" -ocaml-top ../.. > /dev/null
+EXE=$exe ./configure_batch -prefix "$prefix" -ocaml-top ../.. > /dev/null
)

Finish generated files

--- camlp4/config/configure_batch.orig Fri Dec 14 15:24:01 2001
+++ camlp4/config/configure_batch Fri Dec 14 15:24:32 2001
@@ -92,8 +92,8 @@
*) echo "BINDIR=$bindir" >> Makefile.cnf;;
esac
case "$libdir" in

  • "") echo 'LIBDIR=$(PREFIX)/lib/camlp4' >> Makefile.cnf
  •  libdir="$prefix/lib/camlp4";;
    
  • "") echo 'LIBDIR=$(PREFIX)/lib/ocaml/camlp4' >> Makefile.cnf
  •  libdir="$prefix/lib/ocaml/camlp4";;
    
    *) echo "LIBDIR=$libdir" >> Makefile.cnf;;
    esac
    case "$mandir" in


@vicuna
Copy link
Author

vicuna commented Jan 4, 2002

Comment author: administrator

Fixed by Daniel.

@vicuna vicuna closed this as completed Jan 4, 2002
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant