Changeset - c3b079b8a2dd
[Not reviewed]
default
4 9 2
Nathan Brink (binki) - 16 years ago 2010-01-31 16:38:58
ohnobinki@ohnopublishing.net
one Makefile.am, move tests to /test
13 files changed with 115 insertions and 109 deletions:
0 comments (0 inline, 0 general)
Makefile.am
Show inline comments
 
SUBDIRS = src
 
ACLOCAL_AMFLAGS = -I m4
 

	
 

	
 
AM_CPPFLAGS = -DSYSCONFDIR='"$(sysconfdir)"' \
 
	-DLOCALSTATEDIR='"$(localstatedir)"' \
 
	-I$(top_srcdir)/src
 
AM_CFLAGS = $(DISTLIBS_CFLAGS)
 
LIBS = $(DISTLIBS_LDADD) $(DISTLIBS_LDFLAGS)
 
LDADD = libdistrencommon.la
 

	
 
include_HEADERS = src/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 = src/common/options.c \
 
	src/common/options.h \
 
	src/common/execio.h \
 
	src/common/execio.c \
 
	src/common/remoteio.h \
 
	src/common/libremoteio.h \
 
	src/common/remoteio.c \
 
	src/common/asprintf.h \
 
	src/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
 

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

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

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

	
 

	
 

	
 
# 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
 

	
 

	
 
# tests
 
TESTS=test/check_execio test/check_asprintf
 
check_PROGRAMS=$(TESTS)
 

	
 
#check_execio_LIBS = $(CHECK_LIBS)
 
#check_asprintf_LIBS = $(CHECK_LIBS)
 
test_check_execio_LDADD = $(CHECK_LIBS) src/libdistrencommon.la
 
test_check_asprintf_LDADD = $(CHECK_LIBS) src/libdistrencommon.la
 
test_check_execio_CFLAGS = $(AM_CFLAGS) $(CHECK_CFLAGS)
 
test_check_asprintf_CFLAGS = $(AM_CFLAGS) $(CHECK_CFLAGS)
 

	
configure.ac
Show inline comments
 
@@ -21,13 +21,13 @@ AC_CONFIG_SRCDIR([src/server/distrend.c]
 
AC_CONFIG_MACRO_DIR([m4])
 

	
 
AC_PROG_CC
 
AC_PROG_LIBTOOL
 
#AC_PROG_RANLIB #don't add this even if autoscan says to, because AC_PROG_LIBTOOL is enough
 

	
 
AM_INIT_AUTOMAKE
 
AM_INIT_AUTOMAKE([gnu dist-bzip2 subdir-objects -Wall])
 
AM_PROG_CC_C_O
 

	
 
#basic low-level checks (suggested by autoscan)
 
AC_CHECK_FUNCS([dup2])
 
AC_CHECK_FUNCS([memset])
 
AC_CHECK_FUNCS([strdup])
 
@@ -65,13 +65,11 @@ PKGCONFIG_OHNOWRAP([CHECK], [check >= 0.
 
# define paths for configuration files:
 

	
 
AC_DEFINE_DIR([LOCALSTATEDIR], [localstatedir], [Default directory for storing state information])
 
AC_DEFINE_DIR([RUNSTATEDIR], [localstatedir/run], [Default directory for registering runtime information like pid-files])
 

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

	
 
AC_OUTPUT
src/Makefile.am
Show inline comments
 
deleted file
src/client/libdistren_config.c
Show inline comments
 
@@ -18,14 +18,14 @@
 
*/
 

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

	
 
#include "libdistren.h"
 
#include "options.h"
 
#include "client/libdistren.h"
 
#include "common/options.h"
 

	
 
/**
 
@todo Stub
 
 */
 
int _distren_getoptions(distren_t handle)
 
{
src/server/distrend.c
Show inline comments
 
@@ -17,20 +17,21 @@
 
  along with DistRen.  If not, see <http://www.gnu.org/licenses/>.
 

	
 
*/
 

	
 
/* This file contains the code which both processes (renders) jobs as a slave, and the code which distributes frames to slaves after receiving them from the client portion of the codebase. */
 

	
 
#include "asprintf.h"
 
#include "distrenjob.h"
 
#include "execio.h"
 
#include "listen.h"
 
#include "options.h"
 
#include "protocol.h"
 
#include "slavefuncs.h"
 

	
 
#include "common/asprintf.h"
 
#include "common/execio.h"
 
#include "common/options.h"
 
#include "common/protocol.h"
 

	
 
#include <confuse.h>
 
#include <malloc.h>
 
#include <stdio.h>
 
#include <stdlib.h>
 
#include <string.h>
 
#include <sys/stat.h>
src/server/distrenjob.c
Show inline comments
 
@@ -14,16 +14,17 @@
 
  GNU Affero General Public License for more details.
 

	
 
  You should have received a copy of the GNU Affero General Public License
 
  along with DistRen.  If not, see <http://www.gnu.org/licenses/>.
 
*/
 

	
 
#include "asprintf.h"
 
#include "distrenjob.h"
 
#include "slavefuncs.h"
 

	
 
#include "common/asprintf.h"
 

	
 
#include <libxml/parser.h>
 
#include <libxml/tree.h>
 
#include <libxml/xmlwriter.h>
 

	
 
void distrenjob_free(struct distrenjob **distrenjob)
 
{
src/server/slave.c
Show inline comments
 
@@ -15,18 +15,19 @@
 

	
 
  You should have received a copy of the GNU Affero General Public License
 
  along with DistRen.  If not, see <http://www.gnu.org/licenses/>.
 

	
 
*/
 

	
 
#include "asprintf.h"
 
#include "protocol.h"
 
#include "options.h"
 
#include "remoteio.h"
 
#include "slavefuncs.h"
 

	
 
#include "common/asprintf.h"
 
#include "common/options.h"
 
#include "common/protocol.h"
 
#include "common/remoteio.h"
 

	
 
#include <stdio.h>
 
#include <stdlib.h>
 
#include <string.h>
 
#include <sys/stat.h>
 
#include <unistd.h>
 

	
src/server/slavefuncs.c
Show inline comments
 
@@ -14,19 +14,20 @@
 
  GNU Affero General Public License for more details.
 

	
 
  You should have received a copy of the GNU Affero General Public License
 
  along with DistRen.  If not, see <http://www.gnu.org/licenses/>.
 
*/
 

	
 
#include "asprintf.h"
 
#include "distrenjob.h"
 
#include "execio.h"
 
#include "protocol.h"
 
#include "remoteio.h"
 
#include "slavefuncs.h"
 

	
 
#include "common/asprintf.h"
 
#include "common/execio.h"
 
#include "common/protocol.h"
 
#include "common/remoteio.h"
 

	
 
#include <curl/curl.h>
 
#include <curl/easy.h>
 
#include <curl/types.h>
 

	
 
#include <stdio.h>
 
#include <string.h>
src/server/slavefuncs.h
Show inline comments
 
@@ -18,13 +18,14 @@
 
*/
 

	
 
#ifndef _DISTREN_SLAVEFUNCS_H
 
#define _DISTREN_SLAVEFUNCS_H
 

	
 
#include "distrenjob.h"
 
#include "remoteio.h"
 

	
 
#include "common/remoteio.h"
 

	
 
#include <libxml/xpath.h>
 
#include <stdio.h>
 

	
 

	
 
struct msg;
src/server/user_mgr.c
Show inline comments
 
@@ -14,29 +14,31 @@
 
  GNU Affero General Public License for more details.
 

	
 
  You should have received a copy of the GNU Affero General Public License
 
  along with DistRen.  If not, see <http://www.gnu.org/licenses/>.
 
*/
 

	
 
#include "asprintf.h"
 
#include "user_mgr.h"
 

	
 
#include "common/asprintf.h"
 

	
 

	
 
#include <libxml/xmlmemory.h>
 
#include <libxml/parser.h>
 
#include <libxml/tree.h>
 
#include <libxml/encoding.h>
 
#include <libxml/xmlwriter.h>
 
#include <libxml/xmlreader.h>
 

	
 
#include <malloc.h>
 
#include <stdio.h>
 
#include <stdlib.h>
 
#include <string.h>
 
#include <unistd.h>
 
#include <sys/stat.h>
 

	
 
#include <libxml/xmlmemory.h>
 
#include <libxml/parser.h>
 
#include <libxml/tree.h>
 
#include <libxml/encoding.h>
 
#include <libxml/xmlwriter.h>
 
#include <libxml/xmlreader.h>
 

	
 
struct user_mgr_info
 
{
 
	struct user *user_array;
 
	int current_users;
 
	int user_array_size;
 
} user_mgr_info;
src/tests/Makefile.am
Show inline comments
 
deleted file
test/check_asprintf.c
Show inline comments
 
file renamed from src/tests/check_asprintf.c to test/check_asprintf.c
 
@@ -14,18 +14,18 @@
 
  GNU Affero General Public License for more details.
 

	
 
  You should have received a copy of the GNU Affero General Public License
 
  along with DistRen.  If not, see <http://www.gnu.org/licenses/>.
 
*/
 

	
 
#include "asprintf.h"
 
#include "common/asprintf.h"
 

	
 
#include <check.h>
 
#include <string.h>
 

	
 
START_TEST (asprintf)
 
START_TEST (check_asprintf)
 
{
 
  /* tere _must_ be a better way to test this... */
 
  char *teststring = "abcdefghijklmnopqrstuvwxyz";
 
  char *result;
 
  
 
  _distren_asprintf(&result, "I am te%sting\n", teststring);
test/check_execio.c
Show inline comments
 
file renamed from src/tests/check_execio.c to test/check_execio.c
 
@@ -14,17 +14,17 @@
 
  GNU Affero General Public License for more details.
 

	
 
  You should have received a copy of the GNU Affero General Public License
 
  along with DistRen.  If not, see <http://www.gnu.org/licenses/>.
 
*/
 

	
 
#include "execio.h"
 
#include "common/execio.h"
 

	
 
#include <check.h>
 

	
 
START_TEST (execio)
 
START_TEST (check_execio)
 
{
 
  struct execio *eio;
 
  char *echoargv[] = 
 
    {
 
      "echo",
 
      "test"
0 comments (0 inline, 0 general)