From d364193985d03a89897c919ddcf1a97a35e6c447 Mon Sep 17 00:00:00 2001 From: Nedko Arnaudov Date: Sun, 12 Jul 2009 22:56:19 +0300 Subject: [PATCH] waf buildable daemon --- common/safety.c | 4 +-- daemon/Makefile.am | 53 ------------------------------------- daemon/appdb.c | 4 +-- daemon/appdb.h | 2 +- daemon/client.c | 6 ++--- daemon/client.h | 4 +-- daemon/client_dependency.c | 6 ++--- daemon/client_dependency.h | 2 +- daemon/dbus_iface_control.c | 10 +++---- daemon/dbus_iface_control.h | 2 +- daemon/dbus_iface_server.c | 11 ++++---- daemon/dbus_iface_server.h | 2 +- daemon/dbus_service.c | 4 +-- daemon/dbus_service.h | 2 +- daemon/file.c | 4 +-- daemon/file.h | 2 +- daemon/jack_mgr_client.c | 4 +-- daemon/jack_mgr_client.h | 6 ++--- daemon/jack_patch.c | 2 +- daemon/jack_patch.h | 4 +-- daemon/jackdbus_mgr.c | 4 +-- daemon/jackdbus_mgr.h | 2 +- daemon/loader.c | 8 +++--- daemon/log.c | 4 +-- daemon/main.c | 39 +++++---------------------- daemon/procfs.c | 2 +- daemon/proctitle.c | 2 +- daemon/project.c | 6 ++--- daemon/project.h | 2 +- daemon/server.c | 6 ++--- daemon/server.h | 6 ++--- daemon/sigsegv.c | 4 +-- daemon/store.c | 8 +++--- daemon/store.h | 2 +- dbus/error.c | 8 +++--- dbus/error.h | 2 +- dbus/interface.c | 6 ++--- dbus/interface.h | 6 ++--- dbus/introspection.c | 10 +++---- dbus/introspection.h | 6 ++--- dbus/method.c | 8 +++--- dbus/method.h | 2 +- dbus/object_path.c | 10 +++---- dbus/object_path.h | 4 +-- dbus/service.c | 6 ++--- dbus/service.h | 2 +- dbus/signal.c | 6 ++--- dbus/signal.h | 2 +- wscript | 53 ++++++++++++++++++++++++++++++++++++- 49 files changed, 165 insertions(+), 195 deletions(-) delete mode 100644 daemon/Makefile.am diff --git a/common/safety.c b/common/safety.c index 9d4eb57d..f6eff59a 100644 --- a/common/safety.c +++ b/common/safety.c @@ -26,8 +26,8 @@ #include #include -#include "common/safety.h" -#include "common/debug.h" +#include "safety.h" +#include "debug.h" void _lash_free(void **ptr) diff --git a/daemon/Makefile.am b/daemon/Makefile.am deleted file mode 100644 index b7daadef..00000000 --- a/daemon/Makefile.am +++ /dev/null @@ -1,53 +0,0 @@ -include $(top_srcdir)/common.am - -bin_PROGRAMS = lashd - -lashd_SOURCES = \ - main.c \ - log.c \ - file.c file.h \ - client.c client.h \ - client_dependency.c client_dependency.h \ - loader.c loader.h \ - project.c project.h \ - store.c store.h \ - server.c server.h \ - dbus_iface_server.c dbus_iface_server.h \ - dbus_iface_control.c dbus_iface_control.h \ - dbus_service.c dbus_service.h \ - jack_patch.c jack_patch.h \ - jack_mgr_client.c jack_mgr_client.h \ - appdb.c appdb.h \ - sigsegv.c sigsegv.h \ - proctitle.c proctitle.h \ - procfs.c procfs.h \ - types.h \ - $(top_srcdir)/common/safety.c - -lashd_SOURCES += \ - jackdbus_mgr.c jackdbus_mgr.h - -lashd_LDADD = \ - $(XML2_LIBS) \ - $(UUID_LIBS) \ - $(DBUS_LIBS) \ - $(top_builddir)/dbus/liblashdbus.a \ - -lstdc++ -lutil - -AM_CFLAGS = \ - $(LASH_CFLAGS) \ - $(XML2_CFLAGS) \ - $(DBUS_CFLAGS) \ - -DDTDDIR=\"$(dtddir)\" - -# Dbus service file -servicedir = $(DBUS_SERVICES_DIR) -service_in_files = org.nongnu.lash.service.in -service_DATA = $(service_in_files:.service.in=.service) - -EXTRA_DIST = $(service_in_files) -CLEANFILES = $(service_DATA) - -# Rule to make the service file with bindir expanded -$(service_DATA): $(service_in_files) Makefile - @sed -e "s|\@bindir\@|$(bindir)|" $< > $@ diff --git a/daemon/appdb.c b/daemon/appdb.c index f2539c52..100ea8d7 100644 --- a/daemon/appdb.c +++ b/daemon/appdb.c @@ -26,8 +26,8 @@ #include #include "appdb.h" -#include "common/debug.h" -#include "common/safety.h" +#include "../common/debug.h" +#include "../common/safety.h" void lash_appdb_free_entry( diff --git a/daemon/appdb.h b/daemon/appdb.h index 39859365..62f82349 100644 --- a/daemon/appdb.h +++ b/daemon/appdb.h @@ -22,7 +22,7 @@ #ifndef APPDB_H__4839D031_68EF_43F5_BDE2_2317C6B956A9__INCLUDED #define APPDB_H__4839D031_68EF_43F5_BDE2_2317C6B956A9__INCLUDED -#include "common/klist.h" +#include "../common/klist.h" /* all strings except name can be not present (NULL) */ /* all strings are utf-8 */ diff --git a/daemon/client.c b/daemon/client.c index e52c9668..7deb3385 100644 --- a/daemon/client.c +++ b/daemon/client.c @@ -21,13 +21,13 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include "../config.h" +#include "config.h" #include #include -#include "common/safety.h" -#include "common/debug.h" +#include "../common/safety.h" +#include "../common/debug.h" #include "client.h" #include "server.h" diff --git a/daemon/client.h b/daemon/client.h index b335d4bb..caafe05c 100644 --- a/daemon/client.h +++ b/daemon/client.h @@ -31,9 +31,9 @@ #include #include -#include "common/klist.h" +#include "../common/klist.h" -#include "lash/types.h" +#include "../lash_compat/lash/types.h" #include "types.h" diff --git a/daemon/client_dependency.c b/daemon/client_dependency.c index a7c82d84..fb9244b7 100644 --- a/daemon/client_dependency.c +++ b/daemon/client_dependency.c @@ -18,12 +18,12 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include "../config.h" +#include "config.h" #include -#include "common/safety.h" -#include "common/debug.h" +#include "../common/safety.h" +#include "../common/debug.h" #include "client_dependency.h" #include "client.h" diff --git a/daemon/client_dependency.h b/daemon/client_dependency.h index a9cd6dfd..ff86c46c 100644 --- a/daemon/client_dependency.h +++ b/daemon/client_dependency.h @@ -23,7 +23,7 @@ #include -#include "common/klist.h" +#include "../common/klist.h" #include "types.h" #include "client.h" diff --git a/daemon/dbus_iface_control.c b/daemon/dbus_iface_control.c index e27da34c..69aaebc9 100644 --- a/daemon/dbus_iface_control.c +++ b/daemon/dbus_iface_control.c @@ -21,13 +21,13 @@ #include "config.h" -#include "common/safety.h" +#include "../common/safety.h" #define LASH_DEBUG -#include "common/debug.h" -#include "common/klist.h" +#include "../common/debug.h" +#include "../common/klist.h" -#include "dbus/interface.h" -#include "dbus/error.h" +#include "../dbus/interface.h" +#include "../dbus/error.h" #include "server.h" #include "project.h" diff --git a/daemon/dbus_iface_control.h b/daemon/dbus_iface_control.h index 0c174b00..9fe61ec0 100644 --- a/daemon/dbus_iface_control.h +++ b/daemon/dbus_iface_control.h @@ -23,7 +23,7 @@ #include -#include "dbus/interface.h" +#include "../dbus/interface.h" extern const interface_t g_lashd_interface_control; diff --git a/daemon/dbus_iface_server.c b/daemon/dbus_iface_server.c index df747501..26a14db7 100644 --- a/daemon/dbus_iface_server.c +++ b/daemon/dbus_iface_server.c @@ -31,12 +31,11 @@ #include "server.h" #include "client.h" #include "project.h" -#include "common/safety.h" -#include "common/debug.h" -#include "common/klist.h" -#include "dbus/interface.h" -#include "dbus/error.h" -#include "lash/types.h" +#include "../common/safety.h" +#include "../common/debug.h" +#include "../common/klist.h" +#include "../dbus/interface.h" +#include "../dbus/error.h" #include "store.h" static void diff --git a/daemon/dbus_iface_server.h b/daemon/dbus_iface_server.h index 625a9f9b..ca5c55fb 100644 --- a/daemon/dbus_iface_server.h +++ b/daemon/dbus_iface_server.h @@ -21,7 +21,7 @@ #ifndef __LASHD_DBUS_IFACE_SERVER_H__ #define __LASHD_DBUS_IFACE_SERVER_H__ -#include "dbus/interface.h" +#include "../dbus/interface.h" extern const interface_t g_lashd_interface_server; diff --git a/daemon/dbus_service.c b/daemon/dbus_service.c index 38143f3f..df8fd632 100644 --- a/daemon/dbus_service.c +++ b/daemon/dbus_service.c @@ -28,8 +28,8 @@ #include "server.h" #include "dbus_iface_server.h" #include "dbus_iface_control.h" -#include "common/debug.h" -#include "dbus/object_path.h" +#include "../common/debug.h" +#include "../dbus/object_path.h" #include "client.h" static DBusHandlerResult diff --git a/daemon/dbus_service.h b/daemon/dbus_service.h index 5e66450f..5f582999 100644 --- a/daemon/dbus_service.h +++ b/daemon/dbus_service.h @@ -21,7 +21,7 @@ #ifndef __LASHD_DBUS_SERVICE_H__ #define __LASHD_DBUS_SERVICE_H__ -#include "dbus/service.h" +#include "../dbus/service.h" #include "types.h" service_t * diff --git a/daemon/file.c b/daemon/file.c index 9ab0778e..042f70c1 100644 --- a/daemon/file.c +++ b/daemon/file.c @@ -29,8 +29,8 @@ #include #include "file.h" -#include "common/safety.h" -#include "common/debug.h" +#include "../common/safety.h" +#include "../common/debug.h" bool lash_file_exists(const char *file) diff --git a/daemon/file.h b/daemon/file.h index 1f604378..8b860d56 100644 --- a/daemon/file.h +++ b/daemon/file.h @@ -25,7 +25,7 @@ #include #include -#include "common/safety.h" +#include "../common/safety.h" #define get_store_and_return_fqn(dir, file) \ static char *fqn = NULL; \ diff --git a/daemon/jack_mgr_client.c b/daemon/jack_mgr_client.c index c2f9edbb..fa8e8dbc 100644 --- a/daemon/jack_mgr_client.c +++ b/daemon/jack_mgr_client.c @@ -23,8 +23,8 @@ #include -#include "common/safety.h" -#include "common/debug.h" +#include "../common/safety.h" +#include "../common/debug.h" #include "jack_mgr_client.h" #include "jack_patch.h" diff --git a/daemon/jack_mgr_client.h b/daemon/jack_mgr_client.h index fc218cca..c1827199 100644 --- a/daemon/jack_mgr_client.h +++ b/daemon/jack_mgr_client.h @@ -22,15 +22,15 @@ #ifndef __LASHD_JACK_MGR_CLIENT_H__ #define __LASHD_JACK_MGR_CLIENT_H__ -#include "../config.h" +#include "config.h" #include #include #include -#include "common/klist.h" -#include "lashd/types.h" +#include "../common/klist.h" +#include "types.h" struct _jack_mgr_client { diff --git a/daemon/jack_patch.c b/daemon/jack_patch.c index 8a3d30b4..a009ad64 100644 --- a/daemon/jack_patch.c +++ b/daemon/jack_patch.c @@ -22,7 +22,7 @@ #include "jack_patch.h" #include "jack_mgr_client.h" -#include "common/safety.h" +#include "../common/safety.h" jack_patch_t * jack_patch_new(void) diff --git a/daemon/jack_patch.h b/daemon/jack_patch.h index ecafe669..8d0f34c3 100644 --- a/daemon/jack_patch.h +++ b/daemon/jack_patch.h @@ -21,7 +21,7 @@ #ifndef __LASHD_JACK_PATCH_H__ #define __LASHD_JACK_PATCH_H__ -#include "../config.h" +#include "config.h" #include #include @@ -30,7 +30,7 @@ #include #include "types.h" -#include "common/klist.h" +#include "../common/klist.h" struct _jack_patch { diff --git a/daemon/jackdbus_mgr.c b/daemon/jackdbus_mgr.c index 0878738a..526ec2b8 100644 --- a/daemon/jackdbus_mgr.c +++ b/daemon/jackdbus_mgr.c @@ -24,8 +24,8 @@ #include #include -#include "common/safety.h" -#include "common/debug.h" +#include "../common/safety.h" +#include "../common/debug.h" #include "jackdbus_mgr.h" #include "jack_patch.h" diff --git a/daemon/jackdbus_mgr.h b/daemon/jackdbus_mgr.h index eb2fb914..a00fff6b 100644 --- a/daemon/jackdbus_mgr.h +++ b/daemon/jackdbus_mgr.h @@ -26,7 +26,7 @@ #include #include -#include "common/klist.h" +#include "../common/klist.h" #include "types.h" #include "client.h" diff --git a/daemon/loader.c b/daemon/loader.c index 4d1eecd5..986d09f3 100644 --- a/daemon/loader.c +++ b/daemon/loader.c @@ -35,11 +35,11 @@ #include #include -#include "common/safety.h" -#include "common/debug.h" -#include "common/klist.h" +#include "../common/safety.h" +#include "../common/debug.h" +#include "../common/klist.h" -#include "lash/types.h" +#include "../lash_compat/lash/types.h" #include "loader.h" #include "server.h" diff --git a/daemon/log.c b/daemon/log.c index e61c21e7..1bf9f6da 100644 --- a/daemon/log.c +++ b/daemon/log.c @@ -29,8 +29,8 @@ #include #include -#include "common/debug.h" -#include "common/safety.h" +#include "../common/debug.h" +#include "../common/safety.h" #define DEFAULT_XDG_LOG "/.log" #define LASH_XDG_SUBDIR "/lash" diff --git a/daemon/main.c b/daemon/main.c index 0227b7db..5fd53f07 100644 --- a/daemon/main.c +++ b/daemon/main.c @@ -22,7 +22,7 @@ #define _GNU_SOURCE -#include "../config.h" +#include "config.h" #include #include @@ -36,11 +36,11 @@ #include #include -#include "common/debug.h" +#include "../common/debug.h" #include "server.h" #include "loader.h" -#include "svnversion.h" +//#include "version.h" #ifdef LASH_DEBUG # include @@ -56,26 +56,6 @@ term_handler(int signum) g_server->quit = true; } -static void -print_help(const char *argv0) -{ - printf("lashd version %s\n" - "Copyright (C) 2002 Robert Ham \n" - "\n" - "This program comes with ABSOLUTELY NO WARRANTY. You are licensed to use it\n" - "under the terms of the GNU General Public License, version 2 or later. See\n" - "the COPYING file that came with this software for details.\n" - "\n" - "Compiled with D-Bus %s, libxml2 %s" - "\n\n" - "Usage: %s [OPTION]\n" - "\n" - " -d, --default-dir PATH store projects in $HOME/PATH\n\n", - " -h, --help display this help and exit\n" - PACKAGE_VERSION, LASH_DBUS_VERSION, LASH_XML2_VERSION, - argv0); -} - int main(int argc, char **argv, @@ -110,26 +90,21 @@ main(int argc, while ((opt = getopt_long(argc, argv, options, long_options, NULL)) != -1) { switch (opt) { - case 'h': - print_help(argv[0]); - exit(EXIT_SUCCESS); - break; case 'd': default_dir = optarg; break; default: - print_help(argv[0]); exit(EXIT_FAILURE); break; } } - if (!default_dir) - default_dir = DEFAULT_PROJECT_DIR; +// if (!default_dir) +// default_dir = DEFAULT_PROJECT_DIR; lash_info("------------------"); - lash_info("LASH activated. Version %s (%s) built on %s", - PACKAGE_VERSION, SVN_VERSION, timestamp_str); + //lash_info("LASH activated. Version %s (%s) built on %s", + // PACKAGE_VERSION, SVN_VERSION, timestamp_str); lash_debug("Default dir: '%s'", default_dir); diff --git a/daemon/procfs.c b/daemon/procfs.c index 11ceb0e7..2b4d93d5 100644 --- a/daemon/procfs.c +++ b/daemon/procfs.c @@ -30,7 +30,7 @@ #include #include "procfs.h" -#include "common/debug.h" +#include "../common/debug.h" #define BUFFER_SIZE 4096 diff --git a/daemon/proctitle.c b/daemon/proctitle.c index 7fc38674..47a3f4a9 100644 --- a/daemon/proctitle.c +++ b/daemon/proctitle.c @@ -24,7 +24,7 @@ #include #include -#include "common/debug.h" +#include "../common/debug.h" static char * g_argv_begin; static char * g_argv_end; diff --git a/daemon/project.c b/daemon/project.c index 2ddd5f1b..87ff6682 100644 --- a/daemon/project.c +++ b/daemon/project.c @@ -22,7 +22,7 @@ #define _GNU_SOURCE -#include "../config.h" +#include "config.h" #include #include @@ -49,8 +49,8 @@ #include "server.h" #include "loader.h" #include "dbus_iface_control.h" -#include "common/safety.h" -#include "common/debug.h" +#include "../common/safety.h" +#include "../common/debug.h" #include "jackdbus_mgr.h" diff --git a/daemon/project.h b/daemon/project.h index 82c9e19e..24409360 100644 --- a/daemon/project.h +++ b/daemon/project.h @@ -27,7 +27,7 @@ #include #include -#include "common/klist.h" +#include "../common/klist.h" #include "types.h" diff --git a/daemon/server.c b/daemon/server.c index 3c585830..c2001d27 100644 --- a/daemon/server.c +++ b/daemon/server.c @@ -41,9 +41,9 @@ #include "file.h" #include "client_dependency.h" #include "dbus_iface_control.h" -#include "common/safety.h" -#include "common/debug.h" -#include "common/klist.h" +#include "../common/safety.h" +#include "../common/debug.h" +#include "../common/klist.h" #include "jack_mgr_client.h" #include "jackdbus_mgr.h" diff --git a/daemon/server.h b/daemon/server.h index 078f0cb7..42900b93 100644 --- a/daemon/server.h +++ b/daemon/server.h @@ -21,16 +21,14 @@ #ifndef __LASHD_SERVER_H__ #define __LASHD_SERVER_H__ -#include "../config.h" - #include #include #include #include #include "types.h" -#include "dbus/service.h" -#include "common/klist.h" +#include "../dbus/service.h" +#include "../common/klist.h" extern server_t *g_server; diff --git a/daemon/sigsegv.c b/daemon/sigsegv.c index 2ae34c24..ccf00c60 100644 --- a/daemon/sigsegv.c +++ b/daemon/sigsegv.c @@ -15,7 +15,7 @@ #include "config.h" #endif -//#define NO_CPP_DEMANGLE +#define NO_CPP_DEMANGLE #define SIGSEGV_NO_AUTO_INIT #ifndef _GNU_SOURCE @@ -35,7 +35,7 @@ char * __cxa_demangle(const char * __mangled_name, char * __output_buffer, size_t * __length, int * __status); #endif -#include "common/debug.h" +#include "../common/debug.h" #if defined(REG_RIP) # define SIGSEGV_STACK_IA64 diff --git a/daemon/store.c b/daemon/store.c index 6521dc06..873934e2 100644 --- a/daemon/store.c +++ b/daemon/store.c @@ -32,10 +32,10 @@ #include "store.h" #include "file.h" -#include "common/safety.h" -#include "common/debug.h" -#include "dbus/method.h" -#include "lash/types.h" +#include "../common/safety.h" +#include "../common/debug.h" +#include "../dbus/method.h" +#include "../lash_compat/lash/types.h" #define STORE_INFO_FILE ".store_info" diff --git a/daemon/store.h b/daemon/store.h index b0430007..91c4079d 100644 --- a/daemon/store.h +++ b/daemon/store.h @@ -26,7 +26,7 @@ #include #include -#include "common/klist.h" +#include "../common/klist.h" #include "types.h" diff --git a/dbus/error.c b/dbus/error.c index 2fd6289e..50121b3f 100644 --- a/dbus/error.c +++ b/dbus/error.c @@ -22,11 +22,11 @@ #include #include -#include "common/debug.h" +#include "../common/debug.h" -#include "dbus/error.h" -#include "dbus/method.h" -#include "dbus/interface.h" +#include "error.h" +#include "method.h" +#include "interface.h" void lash_dbus_error(method_call_t *call_ptr, diff --git a/dbus/error.h b/dbus/error.h index fdbb2681..0eacefcf 100644 --- a/dbus/error.h +++ b/dbus/error.h @@ -22,7 +22,7 @@ #ifndef __LASH_DBUS_ERROR_H__ #define __LASH_DBUS_ERROR_H__ -#include "dbus/types.h" +#include "types.h" #define LASH_DBUS_ERROR_UNKNOWN_METHOD "org.nongnu.LASH.Error.UnknownMethod" #define LASH_DBUS_ERROR_SERVER_NOT_RUNNING "org.nongnu.LASH.Error.ServerNotRunning" diff --git a/dbus/interface.c b/dbus/interface.c index 9ad66d2b..c9cb3103 100644 --- a/dbus/interface.c +++ b/dbus/interface.c @@ -21,10 +21,10 @@ #include -#include "common/debug.h" +#include "../common/debug.h" -#include "dbus/interface.h" -#include "dbus/error.h" +#include "interface.h" +#include "error.h" /* * Execute a method's function if the method specified in the method call diff --git a/dbus/interface.h b/dbus/interface.h index c38142a8..4392f78d 100644 --- a/dbus/interface.h +++ b/dbus/interface.h @@ -24,9 +24,9 @@ #include -#include "dbus/types.h" -#include "dbus/method.h" -#include "dbus/signal.h" +#include "types.h" +#include "method.h" +#include "signal.h" struct _interface { diff --git a/dbus/introspection.c b/dbus/introspection.c index 6e4c0e3c..cc3cc11d 100644 --- a/dbus/introspection.c +++ b/dbus/introspection.c @@ -24,11 +24,11 @@ #include #include -#include "common/safety.h" -#include "common/debug.h" -#include "dbus/introspection.h" -#include "dbus/signal.h" -#include "dbus/method.h" +#include "../common/safety.h" +#include "../common/debug.h" +#include "introspection.h" +#include "signal.h" +#include "method.h" #define write_buf(args...) buf_ptr += sprintf(buf_ptr, ## args) diff --git a/dbus/introspection.h b/dbus/introspection.h index 8888e2d9..f65355c5 100644 --- a/dbus/introspection.h +++ b/dbus/introspection.h @@ -21,9 +21,9 @@ #ifndef __LASH_DBUS_INTROSPECTION_H__ #define __LASH_DBUS_INTROSPECTION_H__ -#include "dbus/types.h" -#include "dbus/interface.h" -#include "dbus/object_path.h" +#include "types.h" +#include "interface.h" +#include "object_path.h" DBusMessage * introspection_new(object_path_t *path); diff --git a/dbus/method.c b/dbus/method.c index fe8255ec..10335847 100644 --- a/dbus/method.c +++ b/dbus/method.c @@ -19,11 +19,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include "common/safety.h" -#include "common/debug.h" +#include "../common/safety.h" +#include "../common/debug.h" -#include "dbus/method.h" -#include "dbus/service.h" +#include "method.h" +#include "service.h" /* * Construct a void method return. diff --git a/dbus/method.h b/dbus/method.h index f9e93a62..d32bfc51 100644 --- a/dbus/method.h +++ b/dbus/method.h @@ -25,7 +25,7 @@ #include #include -#include "dbus/types.h" +#include "types.h" #define DIRECTION_OUT (0) #define DIRECTION_IN (1) diff --git a/dbus/object_path.c b/dbus/object_path.c index 9911f572..cadd3707 100644 --- a/dbus/object_path.c +++ b/dbus/object_path.c @@ -23,11 +23,11 @@ #include #include -#include "dbus/object_path.h" -#include "common/safety.h" -#include "common/debug.h" -#include "dbus/introspection.h" /* g_dbus_interface_dtor_introspectable */ -#include "dbus/error.h" /* lash_dbus_error() */ +#include "object_path.h" +#include "../common/safety.h" +#include "../common/debug.h" +#include "introspection.h" /* g_dbus_interface_dtor_introspectable */ +#include "error.h" /* lash_dbus_error() */ static DBusHandlerResult object_path_handler(DBusConnection *connection, diff --git a/dbus/object_path.h b/dbus/object_path.h index 8bf55a0d..e69993bd 100644 --- a/dbus/object_path.h +++ b/dbus/object_path.h @@ -24,8 +24,8 @@ #include -#include "dbus/types.h" -#include "dbus/interface.h" +#include "types.h" +#include "interface.h" /** * Object path descriptor. diff --git a/dbus/service.c b/dbus/service.c index aa251ccd..d57237ca 100644 --- a/dbus/service.c +++ b/dbus/service.c @@ -23,9 +23,9 @@ #include #include /* strerror() */ -#include "common/safety.h" -#include "common/debug.h" -#include "dbus/service.h" +#include "../common/safety.h" +#include "../common/debug.h" +#include "service.h" service_t * service_new(const char *service_name, diff --git a/dbus/service.h b/dbus/service.h index 3a84162d..b4e82b3c 100644 --- a/dbus/service.h +++ b/dbus/service.h @@ -24,7 +24,7 @@ #include #include -#include "dbus/object_path.h" +#include "object_path.h" struct _service { diff --git a/dbus/signal.c b/dbus/signal.c index 3d47370b..4c53a486 100644 --- a/dbus/signal.c +++ b/dbus/signal.c @@ -20,9 +20,9 @@ #include -#include "common/debug.h" -#include "dbus/signal.h" -#include "dbus/service.h" +#include "../common/debug.h" +#include "signal.h" +#include "service.h" static void signal_send(signal_msg_t *signal); diff --git a/dbus/signal.h b/dbus/signal.h index 455f2375..4b83bf98 100644 --- a/dbus/signal.h +++ b/dbus/signal.h @@ -24,7 +24,7 @@ #include -#include "dbus/types.h" +#include "types.h" struct _signal_msg { diff --git a/wscript b/wscript index 48a209e8..99101158 100644 --- a/wscript +++ b/wscript @@ -64,6 +64,8 @@ def configure(conf): errmsg = "not installed, see http://xmlsoft.org/", args='--cflags --libs') + conf.write_config_header('config.h') + display_msg(conf) display_msg(conf, "==================") @@ -96,7 +98,56 @@ def configure(conf): display_msg(conf) def build(bld): - pass + daemon = bld.new_task_gen('cc', 'program') + daemon.target = 'ladishd' + daemon.includes = "build/default" # XXX config.h version.h and other generated files + daemon.uselib = 'DBUS-1 LIBXML-2.0 UUID' + daemon.env.append_value("LINKFLAGS", ["-lutil"]) + daemon.source = [] + for source in [ + 'main.c', + 'server.c', + 'loader.c', + 'log.c', + 'sigsegv.c', + 'proctitle.c', + 'project.c', + 'appdb.c', + 'client.c', + 'store.c', + 'procfs.c', + 'jack_patch.c', + 'file.c', + 'dbus_service.c', + 'jackdbus_mgr.c', + 'dbus_iface_control.c', + 'dbus_iface_server.c', + 'client_dependency.c', + 'jack_mgr_client.c', + ]: + daemon.source.append(os.path.join("daemon", source)) + + for source in [ + 'service.c', + 'signal.c', + 'method.c', + 'error.c', + 'object_path.c', + 'introspection.c', + 'interface.c', + ]: + daemon.source.append(os.path.join("dbus", source)) + + daemon.source.append("common/safety.c") + + # process org.jackaudio.service.in -> org.jackaudio.service + #import misc + #obj = bld.new_task_gen('subst') + #obj.source = 'org.jackaudio.service.in' + #obj.target = 'org.jackaudio.service' + #obj.dict = {'BINDIR': bld.env['PREFIX'] + '/bin'} + #obj.install_path = '${DBUS_SERVICES_DIR}/' + #obj.fun = misc.subst_func def dist_hook(): pass