forked from erlware-deprecated/faxien
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into describe-app
- Loading branch information
Showing
58 changed files
with
1,427 additions
and
148 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,20 @@ | ||
The MIT License | ||
Tue Oct 24 12:28:44 CDT 2006 | ||
|
||
Copyright © 2006, 2007 Erlware, Martin Logan, Eric Merritt | ||
Copyright (c) <2006> <Martin J. Logan, Erlware> | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the .Software.), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | ||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software (OTP Base, fslib, G.A.S) and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights to | ||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies | ||
of the Software, and to permit persons to whom the Software is furnished to do | ||
so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | ||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED .AS IS., WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, | ||
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A | ||
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT | ||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE | ||
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
SIDES = lib release | ||
|
||
all clean package install: | ||
@for dir in $(SIDES); do \ | ||
(cd $$dir; ${MAKE} $@); \ | ||
if [ "$$?" -ne "0" ]; then ERROR=$$?; echo "Error Code $$ERROR"; exit $$ERROR; fi; \ | ||
done | ||
|
||
docs: | ||
(cd lib; ${MAKE} $@); \ | ||
if [ "$$?" -ne "0" ]; then ERROR=$$?; echo "Error Code $$ERROR"; exit $$ERROR; fi; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,64 @@ | ||
1. Installation of Faxien | ||
- download faxien_launcher | ||
- run ./faxien_launcher -b -r http://repo.erlware.org | ||
- Optionally if you don't want to install Faxien into the default location which is /usr/local/erlware you can use: | ||
./faxien_launcher -b -r http://repo.erlware.org --prefix <some_path> which will install into <some_path>/erlware | ||
|
||
2. to see a list of commands Faxien understands run /usr/local/erlware/bin/faxien help | ||
3. alternatively you may add erlware/bin to your path and then just run faxien. | ||
Much more information on these topics can be found at www.erlware.org | ||
|
||
Downloading Dependencies | ||
======================== | ||
|
||
OTP Base requires a few erlang packages in order to run correctly. To get these applications we use Erlware Faxien which can be downloaded from 'http://code.google.com/p/faxien' and use it to install the required packages. | ||
|
||
1. Bootstrap Faxien with the appropriate bootstrapper from the download site. | ||
|
||
2. Use 'faxien install' to install the erl release which provides the Erlang shell and the erlc compiler. | ||
- 'sudo /usr/local/erlware/bin/faxien install erl' | ||
|
||
3. Install the following apps with 'faxien install-app'. | ||
- 'sudo /usr/local/erlware/bin/faxien install-app fslib' | ||
- 'sudo /usr/local/erlware/bin/faxien install-app gas' | ||
- 'sudo /usr/local/erlware/bin/faxien install-app eunit' | ||
*Tip* The Faxien release itself uses all the apps listed above so instead of installing them all separately you can save time by simply using the upgrade command to upgrade the existing versions to the latest greatest. Do this as follows: 'sudo /usr/local/erlware/bin/faxien upgrade-all-apps' | ||
|
||
at this point you should be ready to go. | ||
|
||
Building the tree | ||
================= | ||
|
||
To build, type make, it should all work from there. Applications are built under the 'lib' dir and releases under the 'release' directory. | ||
|
||
Creating a new application | ||
========================== | ||
|
||
A new application can be created by using the tools/application_generation utility. | ||
This utility will create a basic OTP application framework under the lib directory | ||
|
||
usage: application_generation <app-name> <prefix> | ||
|
||
Appname is the name of the application that you would like to create. The prefix is | ||
usually the first letter of each word in the appname. This prefix is to avoid name | ||
clashes between applications included in a release (Erlang does not have packages). | ||
|
||
example usage: application_generation my_app ma | ||
|
||
which results in | ||
|
||
lib/my_app | ||
|
||
Creating a new release | ||
====================== | ||
|
||
A release is the OTP packaging structure that binds together a number of applications, configuration, and startup scripts to create a standalone Erlang service. To create a new release from which to run your application(s) you can use the tools/release_generation script. | ||
|
||
usage: release_generation <release-name> | ||
example usage: release_generation test | ||
|
||
The example above will create a release called test under release/test | ||
|
||
Running a release | ||
================= | ||
|
||
Your release should contain all that you need to run your application. You have only to edit your .rel.src file to add to it the applications you have developed over in the lib side. If your application depends on any applications that are supplied outside of your otp-base build tree you can always install them with faxien and then add them to your .rel.src file as well. | ||
|
||
To run a release there are two options: The first is local. A local version can be found in the release/<release-name>/local directory which is added by the make process. This should be used during development to run your release interactively via an Erlang shell. To run a release in local mode cd into the "local" directory and run <release-name>.sh. | ||
|
||
In the case where you want to create a production ready release on one machine and then deploy it on multiple identical machines you may create a production package with 'make pacakge'. To do this run 'make package' from the release/<release-name> directory. This will create a directory '<release-name>-<release-vsn>. This this directory can be tarred up and the tar can be shipped to its destination and installed with faxien. This directory may also be published to a repo for remote installation on another box via faxien. See the docs for faxien at erlware.org for more details on this. | ||
|
||
|
||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
EBIN=../ebin | ||
EMULATOR=beam | ||
|
||
ERLC_WFLAGS = -W | ||
ERLC_EX=$(shell ERLC=$(which erlc); if [ "$${ERLC}" = "" ];then ERLC=$(ERLWARE_HOME)/bin/erlc; fi; echo $${ERLC}) | ||
ERLC = $(ERLC_EX) $(ERLC_WFLAGS) $(ERLC_FLAGS) | ||
|
||
ERL_EX=$(shell ERL=$(which erl); if [ "$${ERL}" = "" ];then ERL=$(ERLWARE_HOME)/bin/erl; fi; echo $${ERL}) | ||
ERL = $(ERL_EX) -boot start_clean | ||
|
||
ESRC = . | ||
|
||
$(EBIN)/%.beam: $(ESRC)/%.erl | ||
$(ERLC) $(ERL_FLAGS) $(ERL_COMPILE_FLAGS) -o$(EBIN) $< | ||
|
||
.erl.beam: | ||
$(ERLC) $(ERL_FLAGS) $(ERL_COMPILE_FLAGS) -o$(dir $@) $< | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Colors to assist visual inspection of make output. | ||
|
||
# Colors | ||
LGRAY=$$'\e[0;37m' | ||
DGRAY=$$'\e[1;30m' | ||
LGREEN=$$'\e[1;32m' | ||
LBLUE=$$'\e[1;34m' | ||
LCYAN=$$'\e[1;36m' | ||
LPURPLE=$$'\e[1;35m' | ||
LRED=$$'\e[1;31m' | ||
NO_COLOR=$$'\e[0m' | ||
DEFAULT=$$'\e[0m' | ||
BLACK=$$'\e[0;30m' | ||
BLUE=$$'\e[0;34m' | ||
GREEN=$$'\e[0;32m' | ||
CYAN=$$'\e[0;36m' | ||
RED=$$'\e[0;31m' | ||
PURPLE=$$'\e[0;35m' | ||
BROWN=$$'\e[0;33m' | ||
YELLOW=$$'\e[1;33m' | ||
WHITE=$$'\e[1;37m' | ||
|
||
BOLD=$$'\e[1;37m' | ||
OFF=$$'\e[0m' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
EDOC_PATH=../../../tools/utilities | ||
|
||
#single place to include docs from. | ||
docs: | ||
@mkdir -p ../doc | ||
@echo -n $${MY_BLUE:-$(BLUE)}; \ | ||
$(EDOC_PATH)/edoc $(APP_NAME); \ | ||
if [ $$? -eq 0 ]; then \ | ||
echo $${MY_LRED:-$(LRED)}"$$d Doc Failed"; \ | ||
fi; \ | ||
echo -n $(OFF)$(NO_COLOR) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
# otp.mk | ||
# - to be included in all OTP Makefiles | ||
# installed to /usr/local/include/erlang/otp.mk | ||
|
||
# gmake looks in /usr/local/include - that's hard-coded | ||
# users of this file will use include erlang/top.mk | ||
|
||
# most interface files will be installed to $ERL_RUN_TOP/app-vsn/include/*.hrl | ||
|
||
# The erts version to use when running your release | ||
ifndef TARGET_ERTS_VSN | ||
TARGET_ERTS_VSN=5.5.5 | ||
endif | ||
|
||
# The location of systemwide installed packages. | ||
ifndef ERLWARE_HOME | ||
ERLWARE_HOME=/usr/local/erlware | ||
endif | ||
|
||
# The location of the erlang runtime system. | ||
ifndef ERL_RUN_TOP | ||
ERL_RUN_TOP=$(ERLWARE_HOME)/erts_packages | ||
endif | ||
|
||
# Compile flags to be passed to erlc | ||
ERL_COMPILE_FLAGS+=-W0 | ||
|
||
#================================================================= | ||
# You will probably not need to change anything beneith this point | ||
#================================================================= | ||
|
||
# OS_TYPE is FreeBSD, NetBSD, OpenBSD, Linux, SCO_SV, SunOS. | ||
OS_TYPE=${shell uname} | ||
|
||
# MHOST is the host where this Makefile runs. | ||
MHOST=${shell hostname -s} | ||
# | ||
# Edit to reflect local environment. | ||
# ifeq (${OS_TYPE},Linux) | ||
# ERL_RUN_TOP=/usr/local/lib/erlang | ||
# Note* ERL_RUN_TOP can be determined by starting an | ||
# erlang shell and typing code:root_dir(). | ||
# ERL_TOP=a symbolic link to the actual source top, which changes from version to version | ||
# Note* ERL_TOP is the directory where the erlang | ||
# source files reside. Make sure to run ./configure there. | ||
# TARGET=i686-pc-linux-gnu | ||
# Note* Target can be found in $ERL_TOP/erts | ||
# endif | ||
|
||
# See above for directions. | ||
ifeq (${OS_TYPE},Linux) | ||
ERL_TOP=/opt/OTP_SRC | ||
TARGET=i686-pc-linux-gnu | ||
endif | ||
|
||
ERLANG_OTP=/usr/local/erlang/otp | ||
VAR_OTP=/var/otp | ||
|
||
|
||
# Aliases for common binaries | ||
# Note - CFLAGS is modified in erlang.conf | ||
|
||
|
||
################################ | ||
# SunOS | ||
################################ | ||
ifeq (${OS_TYPE},SunOS) | ||
|
||
CC=gcc | ||
CXX=g++ | ||
AR=/usr/ccs/bin/ar | ||
ARFLAGS=-rv | ||
CXXFLAGS+=${CFLAGS} -I/usr/include/g++ | ||
LD=/usr/ccs/bin/ld | ||
RANLIB=/usr/ccs/bin/ranlib | ||
|
||
CFLAGS+=-Wall -pedantic -ansi -O | ||
CORE=*.core | ||
endif | ||
|
||
|
||
################################ | ||
# FreeBSD | ||
################################ | ||
ifeq (${OS_TYPE},FreeBSD) | ||
|
||
ifdef LINUXBIN | ||
COMPAT_LINUX=/compat/linux | ||
CC=${COMPAT_LINUX}/usr/bin/gcc | ||
CXX=${COMPAT_LINUX}/usr/bin/g++ | ||
AR=${COMPAT_LINUX}/usr/bin/ar | ||
ARFLAGS=-rv | ||
CXXFLAGS+=-fhandle-exceptions ${CFLAGS} -I${COMPAT_LINUX}/usr/include/g++ | ||
LD=${COMPAT_LINUX}/usr/bin/ld | ||
RANLIB=${COMPAT_LINUX}/usr/bin/ranlib | ||
BRANDELF=brandelf -t Linux | ||
else | ||
CC=gcc | ||
CXX=g++ | ||
AR=/usr/bin/ar | ||
ARFLAGS=-rv | ||
CXXFLAGS+=-fhandle-exceptions ${CFLAGS} -I/usr/include/g++ | ||
LD=/usr/bin/ld | ||
RANLIB=/usr/bin/ranlib | ||
BRANDELF=@true | ||
|
||
ifdef USES_PTHREADS | ||
CFLAGS+=-D_THREAD_SAFE | ||
LDFLAGS+=-lc_r | ||
|
||
# -pthread flag for 3.0+ | ||
ifneq (${shell uname -r | cut -d. -f1},2) | ||
CFLAGS+=-pthread | ||
endif | ||
endif | ||
endif | ||
|
||
CFLAGS+=-Wall -pedantic -ansi -O -DFREEBSD | ||
CORE=*.core | ||
endif | ||
|
||
################################ | ||
# OpenBSD | ||
################################ | ||
ifeq (${OS_TYPE},OpenBSD) | ||
|
||
CC=gcc | ||
CXX=g++ | ||
AR=/usr/bin/ar | ||
ARFLAGS=-rv | ||
CXXFLAGS+=${CFLAGS} -I/usr/include/g++ | ||
LD=/usr/bin/ld | ||
RANLIB=/usr/bin/ranlib | ||
|
||
ifdef USES_PTHREADS | ||
CFLAGS+=-D_THREAD_SAFE | ||
LDFLAGS+=-lc_r | ||
|
||
# -pthread flag for 3.0+ | ||
ifneq (${shell uname -r | cut -d. -f1},2) | ||
CFLAGS+=-pthread | ||
endif | ||
endif | ||
|
||
CFLAGS+=-Wall -pedantic -ansi -O -DOPENBSD | ||
CORE=*.core | ||
endif | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
include ../build/colors.mk | ||
|
||
MODULES=$(shell ls . | grep "[^(Makefile)]") | ||
|
||
package install: all | ||
|
||
all clean docs: | ||
@for dir in $(MODULES); do \ | ||
(cd $$dir; if [ -e "SKIP" ]; then echo $${MY_LRED:-$(LRED)}"skipping \"make $@\" for $$dir"; else ${MAKE} $@; fi); \ | ||
if [ "$$?" -ne "0" ]; then ERROR=$$?; echo "Error Code $$ERROR"; exit $$ERROR; fi; \ | ||
echo -n $(OFF)$(NO_COLOR); \ | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
MODULES = \ | ||
src | ||
|
||
all clean docs: | ||
for dir in $(MODULES); do \ | ||
(cd $$dir; ${MAKE} $@); \ | ||
done |
This file was deleted.
Oops, something went wrong.
Empty file.
Oops, something went wrong.