Permalink
Browse files

Implement a new build infrastructure.

Many locations have changed, please consult README for new
build instructions.
  • Loading branch information...
1 parent 5a5e43c commit 8d4c682a68585938e34889cfd094ff60d9feeae4 @jlouis committed Jul 1, 2008
View
@@ -1,6 +1,3 @@
*.beam
-Makefile
-autom4te.cache
-config.log
-config.status
-configure
+err.log
+
View
@@ -1,5 +1,7 @@
2008-07-01 Jesper Louis Andersen <jlouis@ogre.home>
+ * BUILD: New build infrastructure, based on EMakefile and plain Make.
+
* SRC: Plug a piece storage race condition.
* SRC: Etorrent now understands 'min interval' tracker responses.
View
16 INSTALL
@@ -6,18 +6,4 @@ WOULD LIKE IT TO BE OVER TIME.
DARK IN HERE, ISN'T IT?
------------------------------------------------------------
-Rather than a long GNU-version, here is the summary:
-
-./configure; make; make install
-
-** RUNNING **
-
-Edit the configuration file to suit your setup.
-
-run the bin/etorrent shell-script:
-
-${PREFIX}/bin/etorrentctl start
-
-** STOPPING **
-
-${PREFIX}/bin/etorrentctl stop
+Consult the README file for now.
View
@@ -0,0 +1,23 @@
+## Etorrent Makefile
+## Try to keep it so simple it can be run with BSD-make as well as
+## GNU-make
+
+-include Makefile.config
+
+SHELL=/bin/sh
+ETORRENT_LIB=./lib/etorrent-1.0
+all: libs
+
+libs:
+ cd lib && $(MAKE)
+
+dialyzer:
+ $(DIALYZER) -c $(ETORRENT_LIB)/ebin
+
+run: libs
+ erl -pa $(ETORRENT_LIB)/ebin -config $(ETORRENT_LIB)/priv/etorrent.config \
+ -sname etorrent -s etorrent
+
+clean:
+ cd lib && $(MAKE) clean
+
View
@@ -0,0 +1,2 @@
+ERL=erl
+DIALYZER=dialyzer
View
@@ -1,142 +0,0 @@
-# See COPYING for license
-# Copyright 2007 Jesper Louis Andersen <jesper.louis.andersen@gmail.com>
-
-# This file is currently a bit hackish. There is quite some infrastructure
-# to develop before it looks neat. Basicly, you steal from the otp-src releases
-# until you have something neater. If done right, the source becomes a bliss
-# to maintain.
-
-### ETORRENT_SPECIFIC_STUFF
-RELEASEDIR = releases/1.0
-CONFIGURATION_DIR = etc
-BINARY_DIR = bin
-
-ETORRENT_1.0_SRCDIR = lib/etorrent-1.0/src
-ETORRENT_1.0_EBINDIR = lib/etorrent-1.0/ebin
-
-
-ETORRENT_1.0_MODULES = etorrent_listener etorrent_t_pool_sup etorrent_acceptor \
- etorrent_metainfo etorrent_tracker_communication etorrent_bcoding \
- etorrent \
- etorrent_dirwatcher etorrent_sup etorrent_t_sup \
- etorrent_dirwatcher_sup \
- etorrent_peer_communication etorrent_utils etorrent_fs_checker \
- etorrent_t_control \
- etorrent_fs etorrent_t_manager http_gzip \
- etorrent_fs_process \
- etorrent_t_peer_group etorrent_t_peer_recv \
- etorrent_t_peer_pool_sup \
- etorrent_t_peer_send \
- etorrent_event \
- etorrent_acceptor_sup \
- etorrent_fs_pool_sup etorrent_tracking_map \
- etorrent_mnesia_init \
- etorrent_chunk etorrent_piece etorrent_torrent \
- etorrent_peer \
- tr
-
-ETORRENT_1.0_SOURCES = $(ETORRENT_1.0_MODULES:%=$(ETORRENT_1.0_SRCDIR)/%.erl)
-
-ETORRENT_1.0_BEAMS = $(ETORRENT_1.0_MODULES:%=$(ETORRENT_1.0_EBINDIR)/%.beam)
-
-ETORRENT_1.0_APP = $(ETORRENT_1.0_SRCDIR)/etorrent.app
-
-ETORRENT_PROG_NAME = etorrent
-CONFIGURATION_FILE = $(ETORRENT_PROG_NAME:%=$(CONFIGURATION_DIR)/%.config)
-ETORRENTCTL_FILE = $(BINARY_DIR)/etorrentctl
-RELEASE_FILE = $(ETORRENT_PROG_NAME:%=$(RELEASEDIR)/%.rel)
-BOOT_FILE = $(ETORRENT_PROG_NAME:%=$(RELEASEDIR)/%.boot)
-SCRIPT_FILE = $(ETORRENT_PROG_NAME:%=$(RELEASEDIR)/%.script)
-
-### IMPLICIT RULES
-
-# Kill all suffixes, sans those we define.
-.SUFFIXES :
-.SUFFIXES : .erl .beam .rel .boot .script
-
-$(ETORRENT_1.0_EBINDIR)/%.beam: $(ETORRENT_1.0_SRCDIR)/%.erl
- $(ERLC) $(ERLCFLAGS) -o$(ETORRENT_1.0_EBINDIR) -b beam $<
-
-$(RELEASEDIR)/%.boot : $(RELEASEDIR)/%.rel
- $(ERLC) $(ERLCFLAGS) -o$(RELEASEDIR) -b boot $<
-
-$(RELEASEDIR)/%.script : $(RELEASEDIR)/%.rel
- $(ERLC) $(ERLCFLAGS) -o$(RELEASEDIR) -b script $<
-
-
-
-### GENERIC AUTOCONF STUFF
-SHELL = /bin/sh
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-INSTALL = @INSTALL@
-MKDIR_P = @MKDIR_P@
-LN_S = @LN_S@
-
-ERLC = @ERLC@
-ERL = @ERL@
-
-ERLCFLAGS = @ERLCFLAGS@
-
-ERLANG_ROOT_DIR = @ERLANG_ROOT_DIR@
-ERLANG_LIB_DIR = @ERLANG_LIB_DIR@
-ERLANG_INSTALL_LIB_DIR = @ERLANG_INSTALL_LIB_DIR@
-ERLANG_INSTALL_LIB_DIR_etorrent = @ERLANG_INSTALL_LIB_DIR_etorrent@
-etorrent_EBIN = $(ERLANG_INSTALL_LIB_DIR_etorrent)/ebin
-
-DESTDIR =
-BINDIR = @bindir@
-DOCDIR = @docdir@
-SYSCONFDIR = @sysconfdir@
-DATAROOTDIR = @datarootdir@
-libdir = @libdir@
-
-INST_BEAMDIR = $(etorrent_EBIN)
-#INST_RELEASEDIR = $(ERLANG_ROOT_DIR)/
-#INST_RELEASEDIR = $(ETORRENTDIR)/releases
-
-
-### TARGETS
-
-.PHONY: all
-all: beams
-
-.PHONY: beams
-beams: etorrent-1.0-beams
-
-.PHONY: bootscript
-bootscript: release-1.0
-
-.PHONY: release-1.0
-release-1.0: etorrent-1.0-beams $(BOOT_FILE) $(SCRIPT_FILE)
-
-.PHONY: etorrent-1.0-beams
-etorrent-1.0-beams: $(ETORRENT_1.0_BEAMS)
-
-.PHONY: dialyzer
-dialyzer: beams
- dialyzer -c $(ETORRENT_1.0_EBINDIR)
-
-.PHONY: clean
-clean:
- rm -f $(ETORRENT_1.0_BEAMS) $(BOOT_FILE) $(SCRIPT_FILE)
- cd doc && $(MAKE) clean
-
-.PHONY: install
-install: all
- $(MKDIR_P) $(INST_BEAMDIR)
- $(INSTALL) -m 644 $(ETORRENT_1.0_BEAMS) $(INST_BEAMDIR)
- $(INSTALL) -m 644 $(ETORRENT_1.0_APP) $(INST_BEAMDIR)
-
- $(MKDIR_P) $(BINDIR)
- $(INSTALL) -m 755 $(ETORRENTCTL_FILE) $(BINDIR)
-
- $(MKDIR_P) $(SYSCONFDIR)
- $(INSTALL) -m 644 $(CONFIGURATION_FILE) $(SYSCONFDIR)
-
-# $(INSTALL) -d $(INST_RELEASEDIR)
-# $(INSTALL) -m 644 $(BOOT_FILE) $(INST_RELEASEDIR)
-# $(INSTALL) -m 644 $(SCRIPT_FILE) $(INST_RELEASEDIR)
-
View
40 README
@@ -25,43 +25,21 @@ BEP 23 - Tracker Returns Compact Peer Lists.
-- GETTING STARTED WITHOUT INSTALLING --
-1. run "./autogen.sh". This calls autoconf and friends. On non-GNU
- systems, you need GNU Make and a call to 'gmake' or something such depending
- on your platform.
+1. Check Makefile.config for the right configuration options
+2. run 'make'
+3. create 'lib/etorrent-1.0/priv/etorrent.config' there is an example
+ file in the same dir.
+4. run 'make run' which will spawn etorrent in a running
+ configuration.
-2. run "./configure"
- Optionally: To run with debugging symbols, execute something along
- the lines of "env ERLCFLAGS='+debug_info' ./configure". This is also
- needed if you want to run the dialyzer on the source ("make dialyzer").
+5. drop a .torrent file in the watched dir and see what happens.
-3. run "make" (These steps are not necessary for the latter)
-
-4. cd into lib/etorrent-1.0/ebin.
-
-5. copy ../../../etc/etorrent.config into the ebin dir and edit it to your
- liking.
- Note that the directory for watching torrents and the directory for
- error logs should exist (or things get nasty).
-
-6. run "erl -pa . -config etorrent.config -sname etorrent -s etorrent"
- you can add +Ktrue +A 128 for architectures that supports it.
-
-7. drop a .torrent file in the watched dir and see what happens.
-
-8. call etorrent:help(). from the Erlang CLI to get a list of available
+6. call etorrent:help(). from the Erlang CLI to get a list of available
commands.
-- GETTING STARTED WITH INSTALLING --
-NOTE: This method has not yet seen heavy testing. It can be made a lot
- better than it is.
-
-1. make -f Makefile.init
-2. ./configure
-3. make
-4. make install (as root)
-5. edit ${prefix}/etc/etorrent.config to your liking
-6. run ${bindir}/etorrentctl start
+NOTE: This method is not yet done.
-- REPORTING BUGS --
View
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-## Initialize project
-aclocal
-autoconf
View
@@ -1,21 +0,0 @@
-AC_INIT(erlang torrent client, 1.0, jesper.louis.andersen@gmail.com, etorrent)
-AC_COPYRIGHT(Copyright (C) 2007 Jesper Louis Andersen)
-
-dnl require autoconf version >=2.59c, first one with erlang macros
-AC_PREREQ(2.59c)
-
-dnl Erlang-related config
-AC_ERLANG_SUBST_ROOT_DIR
-AC_ERLANG_SUBST_LIB_DIR
-AC_ERLANG_SUBST_INSTALL_LIB_SUBDIR(AC_PACKAGE_TARNAME, AC_PACKAGE_VERSION)
-
-AC_ERLANG_NEED_ERLC
-AC_ERLANG_NEED_ERL
-
-dnl Generic configuration
-AC_PROG_INSTALL
-AC_PROG_MKDIR_P
-AC_PROG_LN_S
-
-AC_OUTPUT(Makefile doc/Makefile bin/etorrentctl)
-
View
@@ -1,2 +0,0 @@
-clean:
- rm -f *.aux *.dvi *.log *.pdf *.toc
Oops, something went wrong.

0 comments on commit 8d4c682

Please sign in to comment.