Skip to content

Compiling and running

jovanbulck edited this page Nov 1, 2014 · 43 revisions

General building steps

This page documents the jsh build process. Note you can download pre-built binaries for all official jsh releases. This section lists the general platform-independent steps to build jsh yourself. See the next sections for platform-dependent instructions and dependencies.

Clone this repository and change the directory:

$ git clone git@github.com:jovanbulck/jo-shell.git
$ cd jo-shell

Execute the Makefile to make a jsh binary in the current directory. If desired, install a jsh binary in /usr/local/bin/ and man page in /usr/local/share/man/man1/:

$ make
$ sudo make install

Done! You should have a working binary of jsh now. Execute with ./jsh. Note that debugging output is turned on by default in non-release non-install developer builds. To disable it, do one of the following:

  • type debug off
  • run ./jsh with the --nodebug option
  • include the line "debug off" in ~/.jshrc
  • pass the -DNODEBUG flag to the compiler in the Makefile

Dependencies overview

The following table lists the dependencies needed to succesfully build jsh:

Dependency Rationale Where to get it
GNU Readline jsh uses the readline library for user input line editing, autocompletion and command history. The following section list platform specific info to resolve the libreadline dependency.
GNU Make The Makefile uses some GNU Make specific features. Most operating systems provide make in the standard package manager. Note BSD provides its own (incompatible) version of make. See below.
basic UNIX utilities: install, uname, date, sed Theses utilites are used by the Makefile during the build process Getting these utilites should be no problem, as they are widely available and installed on any basic UNIX system.

Platform dependent instructions

This section lists all platform-dependent instruction for the jsh build process. Feel free to edit if you want to add/enhance instructions.

Linux

ArchLinux

Install the necessary packages:

$ sudo pacman -S readline

Ubuntu

Install the necessary packages:

$ sudo apt-get install libreadline6-dev

Tiny Core Linux

Currently, the provided binaries fail to run for Tiny Core Linux. You have to compile it yourself. Install the necessary packages:

$ tce-load -wi git ncurses compiletc readline-dev

BSD UNIX

FreeBSD 10.0

  1. Install gmake (GNU make) and gcc packages with pkg install
  2. Readline should work now; if not try installing readline and/or bash
  3. always use gmake instead of make
  4. Change the line "CC = gcc" to "CC = gcc48" in the Makefile

TODO update db ??

Mac OS X

  1. Install command line developping tools (gcc, make, ...):
  • option 1: install Xcode via the Mac App store
  • option 2: only install the command line tools, using this github project
  1. Point to right readline library
  • Install newest readline library via Homebrew or Macports.
  1. Compile with the make command
Clone this wiki locally