Changeset - 2c0ae3006fa0
[Not reviewed]
default
4 11 0
Nathan Brink (binki) - 16 years ago 2010-01-12 19:52:27
ohnobinki@ohnopublishing.net
consolidate some Makefiles
15 files changed with 95 insertions and 93 deletions:
0 comments (0 inline, 0 general)
INSTALL
Show inline comments
 
Installation Instructions
 
*************************
 

	
 
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
 
2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
2006, 2007, 2008 Free Software Foundation, Inc.
 

	
 
   This file is free documentation; the Free Software Foundation gives
 
unlimited permission to copy, distribute and modify it.
 

	
 
Basic Installation
 
==================
 
@@ -156,13 +156,13 @@ Particular systems
 
==================
 

	
 
   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
 
CC is not installed, it is recommended to use the following options in
 
order to use an ANSI C compiler:
 

	
 
     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
 
     ./configure CC="cc -Ae"
 

	
 
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
 

	
 
   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
 
parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
 
a workaround.  If GNU CC is not installed, it is therefore recommended
 
@@ -171,22 +171,12 @@ to try
 
     ./configure CC="cc"
 

	
 
and if that doesn't work, try
 

	
 
     ./configure CC="cc -nodtk"
 

	
 
   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
 
directory contains several dysfunctional programs; working variants of
 
these programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
 
in your `PATH', put it _after_ `/usr/bin'.
 

	
 
   On Haiku, software installed for all users goes in `/boot/common',
 
not `/usr/local'.  It is recommended to use the following options:
 

	
 
     ./configure --prefix=/boot/common
 

	
 
Specifying the System Type
 
==========================
 

	
 
   There may be some features `configure' cannot figure out
 
automatically, but needs to determine by the type of machine the package
 
will run on.  Usually, assuming the package is built to be run on the
 
@@ -196,14 +186,13 @@ a message saying it cannot guess the mac
 
type, such as `sun4', or a canonical name which has the form:
 

	
 
     CPU-COMPANY-SYSTEM
 

	
 
where SYSTEM can have one of these forms:
 

	
 
     OS
 
     KERNEL-OS
 
     OS KERNEL-OS
 

	
 
   See the file `config.sub' for the possible values of each field.  If
 
`config.sub' isn't included in this package, then this package doesn't
 
need to know the machine type.
 

	
 
   If you are _building_ compiler tools for cross-compiling, you should
Makefile.am
Show inline comments
 
SUBDIRS = src etc
 
SUBDIRS = src
 

	
 
ACLOCAL_AMFLAGS = -I m4
 

	
 

	
 
# configuration files:
 
dist_sysconf_DATA = etc/distrenclient.conf \
 
	etc/distrencommon.conf
 
nodist_sysconf_DATA = etc/distrendaemon.conf \
 
	etc/distrenslave.conf
 
EXTRA_DIST = etc/distrendaemon.conf.in \
 
	etc/distrenslave.conf.in
configure.ac
Show inline comments
 
@@ -32,18 +32,12 @@ AC_CHECK_FUNCS([dup2])
 
AC_CHECK_FUNCS([memset])
 
AC_CHECK_FUNCS([strdup])
 

	
 
AC_CHECK_HEADERS([fcntl.h])
 
AC_CHECK_HEADERS([malloc.h])
 

	
 
# TODO: write up --with-list option
 
AC_CHECK_HEADERS([list.h queue.h stack.h], [], [AC_MSG_ERROR([I need liblist to be installed])])
 
AC_CHECK_LIB([list], [list_init], [
 
   AC_SUBST([LIST_LIBS],[-llist])], [
 
   AC_MSG_ERROR([I need liblist to be installed]) ])
 

	
 
AC_FUNC_FORK
 
AC_FUNC_MALLOC
 

	
 
AC_TYPE_PID_T
 
AC_TYPE_SIZE_T
 

	
 
@@ -61,26 +55,18 @@ AC_DEFINE([_GNU_SOURCE], [1])
 

	
 
#package dependencies:
 

	
 
PKG_PROG_PKG_CONFIG(0.17.2)
 

	
 

	
 
PKGCONFIG_OHNOWRAP([DISTLIBS], [libconfuse >= 2.5 libcurl libxml-2.0])
 
PKGCONFIG_OHNOWRAP([DISTLIBS], [libconfuse >= 2.5 libcurl libxml-2.0 liblist >= 2.2.1])
 

	
 
PKGCONFIG_OHNOWRAP([CHECK], [check >= 0.9.3])
 

	
 
AC_DEFINE_DIR([SYSCONFDIR], [sysconfdir], [Directory to find configuration files in])
 
AC_DEFINE_DIR([LOCALSTATEDIR], [localstatedir], [Directory in which the server or client may store its state files and data])
 
AC_DEFINE_DIR([RUNSTATEDIR], [localstatedir/run], [Directory where PID files are stored])
 

	
 
AC_CONFIG_FILES([Makefile
 
src/Makefile
 
src/common/Makefile
 
src/server/Makefile
 
src/client/Makefile
 
src/tests/Makefile
 
etc/Makefile
 
etc/distrendaemon.conf
 
etc/distrenslave.conf
 
])
 

	
 
AC_OUTPUT
etc/Makefile.am
Show inline comments
 
deleted file
src/Makefile.am
Show inline comments
 
SUBDIRS = common server client . tests
 

	
 
SUBDIRS = . tests
 

	
 
AM_CPPFLAGS = -DSYSCONFDIR='"$(sysconfdir)"' \
 
	-DLOCALSTATEDIR='"$(localstatedir)"' \
 
	-DRUNSTATEDIR='"$(localstatedir)/run"' \
 
	-I. -I$(top_srcdir)/src/common
 
AM_CFLAGS = $(DISTLIBS_CFLAGS)
 
AM_LDFLAGS = $(DISTLIBS_LDFLAGS)
 
# LIBS, LDFLAGS, Huh!?
 
LIBS = $(DISTLIBS_LDADD)
 
LDADD = libdistrencommon.la
 

	
 
include_HEADERS = client/distren.h
 

	
 
bin_PROGRAMS = distren
 
if ENABLE_SERVER
 
bin_PROGRAMS += distrend distrenslave
 
endif
 

	
 
lib_LTLIBRARIES = libdistren.la
 
pkglib_LTLIBRARIES = libdistrencommon.la
 

	
 
# libdistrencommon.la:
 
libdistrencommon_la_SOURCES = common/options.c \
 
	common/options.h \
 
	common/execio.h \
 
	common/execio.c \
 
	common/remoteio.h \
 
	common/libremoteio.h \
 
	common/remoteio.c \
 
	common/asprintf.h \
 
	common/asprintf.c
 
#see http://sources.redhat.com/autobook/autobook/autobook_91.html
 
# either increase the revision number or the interface number each release!
 
libdistrencommon_la_LDFLAGS = $(AM_LDFLAGS) -version-info 0:0:0
 

	
 
# libdistren.la:
 
libdistren_la_SOURCES = $(include_HEADERS) \
 
	client/libdistren.h \
 
	client/libdistren.c \
 
	client/libdistren_job.c \
 
	client/libdistren_unbias.c \
 
	client/libdistren_config.c
 
libdistren_la_LIBADD = libdistrencommon.la
 
libdistren_la_LDFLAGS = $(AM_LDFLAGS) -version-info 0:0:0
 

	
 
# distren:
 
distren_SOURCES = client/distren.c
 
distren_LDADD = libdistren.la
 

	
 
# shared server sources:
 
SERVER_SOURCES = server/slavefuncs.c \
 
	server/slavefuncs.h \
 
	server/distrenjob.c \
 
	server/distrenjob.h
 
# distrend:
 
distrend_SOURCES = $(SERVER_SOURCES) \
 
	server/distrend.c \
 
	server/distrend.h \
 
	server/user_mgr.c \
 
	server/user_mgr.h \
 
	server/listen.h \
 
	server/listen.c
 
distrend_LDADD = libdistrencommon.la
 
# distrenslave:
 
distrenslave_SOURCES = $(SERVER_SOURCES) \
 
	server/slave.c
 
distrenslave_LDADD = libdistrencommon.la
 

	
src/client/Makefile.am
Show inline comments
 
deleted file
src/client/distren.c
Show inline comments
 
@@ -26,13 +26,13 @@
 
 * PHP adds the users... has captcha and email confirmation wth a pseudo-random number that
 
 * the user must enter on the site. Apache should be running mod_peruser for safety, and I'm
 
 * thinking zserver2 for web serving for convenience...
 
 */
 

	
 

	
 
#include <distren.h>
 
#include "distren.h"
 

	
 
#include <stdio.h> /* sprintf, printf */
 
#include <stdlib.h> /* malloc, free */
 
#include <unistd.h> /* getopt */
 
#include <confuse.h>
 
#include <string.h> // for strcat
src/client/libdistren.c
Show inline comments
 
@@ -18,13 +18,13 @@
 
*/
 

	
 
/*
 
  Implementation of distren_* functions from distren.h excluding distren_job_* functions.
 
 */
 

	
 
#include <libdistren.h>
 
#include "libdistren.h"
 

	
 
#include <malloc.h>
 
#include <stdio.h>
 

	
 
/**
 
   @todo needs to read configuration in
src/client/libdistren.h
Show inline comments
 
@@ -21,13 +21,13 @@
 
#define LIBDISTREN_H_ 1
 

	
 
/*
 
  Private definitions for libdistren.
 
 */
 

	
 
#include <distren.h>
 
#include "distren.h"
 

	
 
struct distren
 
{
 
  distren_malloc_t malloc;
 
  distren_free_t free;
 
  struct options_common *options; /*< use a pointer just to avoid #include "options.h"? */
src/client/libdistren_config.c
Show inline comments
 
@@ -18,13 +18,13 @@
 
*/
 

	
 
/*
 
  Functions and code for retrieving the client's configuration information.
 
 */
 

	
 
#include <libdistren.h>
 
#include "libdistren.h"
 
#include "options.h"
 

	
 
/**
 
@todo Stub
 
 */
 
int _distren_getoptions(distren_t handle)
src/client/libdistren_job.c
Show inline comments
 
@@ -18,13 +18,13 @@
 
*/
 

	
 
/*
 
  Implementation of distren_job_* functions from distren.h.
 
 */
 

	
 
#include <libdistren.h>
 
#include "libdistren.h"
 

	
 
/**
 
   @todo Stub
 
 */
 
int distren_job_getid(distren_job_t job, char **jobid)
 
{
src/client/libdistren_unbias.c
Show inline comments
 
@@ -18,13 +18,13 @@
 
*/
 

	
 
/*
 
  Implementation of libdistren functions that exist to prevent this library from being biased toward certain methods of reporting errors/debug info or free()ing and malloc()ing
 
 */
 

	
 
#include <libdistren.h>
 
#include "libdistren.h"
 

	
 
void *_malloc(distren_t distren, size_t size)
 
{
 
  return (*distren->malloc)(size);
 
}
 

	
src/common/Makefile.am
Show inline comments
 
deleted file
src/server/Makefile.am
Show inline comments
 
deleted file
src/tests/Makefile.am
Show inline comments
 
TESTS=check_execio check_asprintf
 
check_PROGRAMS=check_execio check_asprintf
 
check_execio_SOURCES = check_execio.c
 
check_execio_CFLAGS = @CHECK_CFLAGS@ -I$(top_builddir)/src/common
 
check_execio_LDADD = $(top_builddir)/src/common/libdistrencommon.la @CHECK_LIBS@
 

	
 
check_asprintf_SOURCES=check_asprintf.c
 
check_asprintf_CFLAGS=$(check_execio_CFLAGS)
 
check_asprintf_LDADD=$(check_execio_LDADD)
 
LIBS = $(CHECK_LIBS)
 
LDADD = $(top_builddir)/src/libdistrencommon.la
 

	
 
check_PROGRAMS=$(TESTS)
 
AM_CFLAGS = $(CHECK_CFLAGS) -I$(top_builddir)/src/common
0 comments (0 inline, 0 general)