zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sl4mmy <...@git.apache.org>
Subject [GitHub] zookeeper issue #557: ZOOKEEPER-3077: build outside of source directory
Date Wed, 18 Jul 2018 19:45:45 GMT
Github user sl4mmy commented on the issue:

    https://github.com/apache/zookeeper/pull/557
  
    No takers?  :)
    
    I know this touches nasty autoconf stuff, but in my opinion it's actually simple &
straight-forward:
    
    * At present you cannot build the native client in a separate build directory.  This is
a common pattern for native software using autotools in order to avoid polluting your source
dir or local working copy with build artifiacts: you create a `build/` directory somewhere,
cd into it, and then run `relative/path/to/configure` and `make` in that directory.  All of
the build artifacts will then be created under that `build/` directory.
    * The reason why this doesn't work currently is because `src/c/configure.ac` checks for
the presence of `zookeeper.jute.c` and `zookeeper.jute.h` using relative paths which are resolved
at configure time, not build time.  So running `relative/path/to/configure` inside your `build/`
directory fails because there's no `generated/` subdirectory under `build/`.
    * The fix is simply to prefix the path to the generated jute files with autoconf's `$srcdir`
variable (see: https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Preset-Output-Variables.html#Preset-Output-Variables)


---

Mime
View raw message