Installation of Jardeps


Jardeps is a library for GNU Make for compiling Java.

You can check out Jardeps as a separate package, and install it. Then you can reference it from your own build environment.

Having found a space on your filesystem to keep a working copy, run the following commands:

git clone https://github.com/simpsonst/jardeps.git
cd jardeps
make
sudo make install

Files are installed in /usr/local/include/ and /usr/local/share/jardeps/.

From time to time, this branch will be updated with new features. To get them, update your working copy and re-install:

cd jardeps
git checkout master
git pull origin master
make
sudo make install

In your Makefile, use:

# In Makefile
include jardeps.mk

Installation in another location

You might prefer to install Jardeps in a location that requires fewer privileges than /usr/local, say, ~/.local. One way to do this would be to override the installation-directory setting when installing:

make PREFIX=$$HOME/.local install

When building your own programs, you'd have to then tell Make where jardeps.mk is:

make -I$$HOME/.local/include

A more permanent solution might be to set MAKEFLAGS in your shell's environment:

# In ~/.bash_aliases?
export MAKEFLAGS=(-I"$$HOME/.local/include")

If you're doing that, you may as well put a jardeps-env.mk in there to set PREFIX for you when you build Jardeps. I prefer to keep such configuration in ~/.local/etc, so I set MAKEFLAGS to:

# In ~/.bash_aliases
export MAKEFLAGS=(-I"$$HOME/.local/etc" -I"$$HOME/.local/include")

Then I define PREFIX in ~/.local/etc/jardeps-env.mk:

# In ~/.local/etc/jardeps-env.mk

PREFIX=$$(HOME)/.local

Now my update procedure is:

cd jardeps
svn update
make
make install