summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubos Lunak <l.lunak@ suse.cz>2006-03-14 13:59:57 +0000
committerLubos Lunak <l.lunak@ suse.cz>2006-03-14 13:59:57 +0000
commitdda1cd31f6194169a38f3653c9737c61e0d103dd (patch)
treec01104745b2b4398afa468d585acc0cccdb574ae
parent18f08afd4aab83465264909a1a9aee9abd766bf5 (diff)
Trying to sort out 'make install'.
-rw-r--r--BUILD2
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac2
-rw-r--r--generic/Makefile.am2
-rw-r--r--generic/main.c19
-rw-r--r--include/.cvsignore2
-rw-r--r--include/Makefile.am1
-rw-r--r--include/dapi/.cvsignore2
-rw-r--r--include/dapi/Makefile.am37
-rw-r--r--kde/configure.in.in2
-rw-r--r--kde/daemon/handler.h2
-rw-r--r--lib/Makefile.am4
-rw-r--r--lib/callbacks.c2
-rw-r--r--lib/callbacks.h4
-rw-r--r--lib/calls.c2
-rw-r--r--lib/calls.h4
-rw-r--r--lib/comm.c2
-rw-r--r--lib/comm.h2
-rw-r--r--lib/comm_internal.h2
-rw-r--r--lib/utils.c15
-rw-r--r--lib/utils.h5
-rw-r--r--tests/Makefile.am4
-rw-r--r--tests/test_async.c6
-rw-r--r--tests/test_callbacks.c6
-rw-r--r--tests/test_calls.c4
-rw-r--r--tests/test_capabilities.c4
-rw-r--r--tests/test_comm.c2
-rw-r--r--tests/test_fallback.c4
-rw-r--r--tests/test_mailto.c4
-rw-r--r--tests/test_remotefile.c4
-rw-r--r--tests/test_runasuser.c4
-rw-r--r--tests/test_screensaving.c4
32 files changed, 100 insertions, 61 deletions
diff --git a/BUILD b/BUILD
index 410e9c2..7383cf6 100644
--- a/BUILD
+++ b/BUILD
@@ -1,6 +1,7 @@
make -f Makefile.cvs
./configure
make
+make install
For KDE module:
cd kde
@@ -11,4 +12,3 @@ make
If you have a serious problem with the -Werror flag, edit configure.ac
and kde/configure.in.in (sorry, but plain C accepts unbelievable nonsense
without it). It should be probably turned into a configure switch or something.
-
diff --git a/Makefile.am b/Makefile.am
index 5105c0e..abbf26b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,2 +1,2 @@
-SUBDIRS = lib generic tests
+SUBDIRS = include lib generic tests
AUTOMAKE_OPTIONS = foreign
diff --git a/configure.ac b/configure.ac
index 302988b..1857637 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,5 +29,7 @@ Makefile
lib/Makefile
tests/Makefile
generic/Makefile
+include/Makefile
+include/dapi/Makefile
])
AC_OUTPUT
diff --git a/generic/Makefile.am b/generic/Makefile.am
index 0d848b2..17aee41 100644
--- a/generic/Makefile.am
+++ b/generic/Makefile.am
@@ -4,4 +4,4 @@ dapi_generic_SOURCES = main.c commands.c
dapi_generic_LDADD = ../lib/libdapi.la -lXext -lX11 $(X_EXTRA_LIBS) $(X_PRE_LIBS)
dapi_generic_LDFLAGS = $(X_LIBS)
-INCLUDES = $(X_CFLAGS) -I$(top_srcdir)/lib
+INCLUDES = -I$(top_srcdir)/include $(X_CFLAGS)
diff --git a/generic/main.c b/generic/main.c
index 54113fe..0b38beb 100644
--- a/generic/main.c
+++ b/generic/main.c
@@ -1,3 +1,4 @@
+#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -6,8 +7,22 @@
#include <X11/Xlib.h>
#include "commands.h"
-#include "comm.h"
-#include "utils.h"
+#include <dapi/comm.h>
+
+static void debug( const char* fmt, ... )
+#ifdef __GNUC__
+ __attribute (( format( printf, 1, 2 )))
+#endif
+ ;
+
+static void debug( const char* fmt, ... )
+ {
+ va_list va;
+ va_start( va, fmt );
+ vfprintf( stderr, fmt, va );
+ va_end( va );
+ fprintf( stderr, "\n" );
+ }
DapiConnection** connections = NULL;
int num_connections = 0;
diff --git a/include/.cvsignore b/include/.cvsignore
new file mode 100644
index 0000000..282522d
--- /dev/null
+++ b/include/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/include/Makefile.am b/include/Makefile.am
new file mode 100644
index 0000000..643b948
--- /dev/null
+++ b/include/Makefile.am
@@ -0,0 +1 @@
+SUBDIRS = dapi
diff --git a/include/dapi/.cvsignore b/include/dapi/.cvsignore
new file mode 100644
index 0000000..282522d
--- /dev/null
+++ b/include/dapi/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/include/dapi/Makefile.am b/include/dapi/Makefile.am
new file mode 100644
index 0000000..4f0b43b
--- /dev/null
+++ b/include/dapi/Makefile.am
@@ -0,0 +1,37 @@
+BUILT_SOURCES = comm.h calls.h callbacks.h \
+ comm_generated.c calls_generated.c callbacks_generated.c \
+ comm_generated.h calls_generated.h callbacks_generated.h comm_internal_generated.h
+
+dapiinclude_HEADERS = comm.h calls.h callbacks.h comm_generated.h calls_generated.h callbacks_generated.h
+
+dapiincludedir = $(includedir)/dapi
+
+comm.h:
+ $(LN_S) $(top_srcdir)/lib/comm.h
+
+calls.h:
+ $(LN_S) $(top_srcdir)/lib/calls.h
+
+callbacks.h:
+ $(LN_S) $(top_srcdir)/lib/callbacks.h
+
+comm_generated.h:
+ $(LN_S) $(top_srcdir)/kde/gen/comm_generated.h
+
+calls_generated.h:
+ $(LN_S) $(top_srcdir)/kde/gen/calls_generated.h
+
+callbacks_generated.h:
+ $(LN_S) $(top_srcdir)/kde/gen/callbacks_generated.h
+
+comm_internal_generated.h:
+ $(LN_S) $(top_srcdir)/kde/gen/comm_internal_generated.h
+
+comm_generated.c:
+ $(LN_S) $(top_srcdir)/kde/gen/comm_generated.c
+
+calls_generated.c:
+ $(LN_S) $(top_srcdir)/kde/gen/calls_generated.c
+
+callbacks_generated.c:
+ $(LN_S) $(top_srcdir)/kde/gen/callbacks_generated.c
diff --git a/kde/configure.in.in b/kde/configure.in.in
index 18a3716..ff6ba4a 100644
--- a/kde/configure.in.in
+++ b/kde/configure.in.in
@@ -6,7 +6,7 @@ KDE_CHECK_HEADERS(X11/extensions/dpms.h,
LIB_DAPI='$(top_builddir)/../lib/libdapi.la'
AC_SUBST(LIB_DAPI)
-dapi_includes='-I$(top_srcdir)/../lib'
+dapi_includes='-I$(top_srcdir)/../include'
all_includes="$dapi_includes $all_includes"
CFLAGS="$CFLAGS -Werror"
diff --git a/kde/daemon/handler.h b/kde/daemon/handler.h
index fb4bd89..f995a8e 100644
--- a/kde/daemon/handler.h
+++ b/kde/daemon/handler.h
@@ -6,7 +6,7 @@
#include <kio/job.h>
#include <qwidget.h>
-#include "comm.h"
+#include <dapi/comm.h>
class QSocketNotifier;
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 4fdd479..14ac76e 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -1,7 +1,7 @@
lib_LTLIBRARIES = libdapi.la
-libdapi_la_SOURCES = comm.c utils.c calls.c callbacks.c
+libdapi_la_SOURCES = comm.c calls.c callbacks.c
libdapi_la_LIBADD =
libdapi_la_LDFLAGS = $(all_libraries) -no-undefined
-INCLUDES = $(all_includes)
+INCLUDES = -I$(top_srcdir)/include $(all_includes)
diff --git a/lib/callbacks.c b/lib/callbacks.c
index 54be2ad..2ac8f47 100644
--- a/lib/callbacks.c
+++ b/lib/callbacks.c
@@ -5,7 +5,7 @@
#include "comm_internal.h"
-#include "../kde/gen/callbacks_generated.c"
+#include <dapi/callbacks_generated.c>
DapiGenericCallback dapi_setGenericCallback( DapiConnection* conn, DapiGenericCallback callback )
{
diff --git a/lib/callbacks.h b/lib/callbacks.h
index 2342fd7..81f8c01 100644
--- a/lib/callbacks.h
+++ b/lib/callbacks.h
@@ -5,9 +5,9 @@
extern "C" {
#endif
-#include "comm.h"
+#include <dapi/comm.h>
-#include "../kde/gen/callbacks_generated.h"
+#include <dapi/callbacks_generated.h>
typedef void (*DapiGenericCallback)( DapiConnection* conn, int command, int seq );
diff --git a/lib/calls.c b/lib/calls.c
index a86c309..f515269 100644
--- a/lib/calls.c
+++ b/lib/calls.c
@@ -6,4 +6,4 @@
#include "comm.h"
#include "comm_internal.h"
-#include "../kde/gen/calls_generated.c"
+#include <dapi/calls_generated.c>
diff --git a/lib/calls.h b/lib/calls.h
index 296bb0a..7d26b3d 100644
--- a/lib/calls.h
+++ b/lib/calls.h
@@ -1,13 +1,13 @@
#ifndef DAPI_CALLS_H
#define DAPI_CALLS_H
-#include "comm.h"
+#include <dapi/comm.h>
#ifdef __cplusplus
extern "C" {
#endif
-#include "../kde/gen/calls_generated.h"
+#include <dapi/calls_generated.h>
#ifdef __cplusplus
}
diff --git a/lib/comm.c b/lib/comm.c
index e5cbd72..7c31ea9 100644
--- a/lib/comm.c
+++ b/lib/comm.c
@@ -380,4 +380,4 @@ DapiConnection* dapi_namedConnectAndInit( const char* name )
return conn;
}
-#include "../kde/gen/comm_generated.c"
+#include <dapi/comm_generated.c>
diff --git a/lib/comm.h b/lib/comm.h
index 499bbb8..987a7fd 100644
--- a/lib/comm.h
+++ b/lib/comm.h
@@ -44,7 +44,7 @@ void dapi_freeWindowInfo( DapiWindowInfo winfo );
void dapi_freestringarr( stringarr arr );
void dapi_freeintarr( intarr arr );
-#include "../kde/gen/comm_generated.h"
+#include <dapi/comm_generated.h>
#ifdef __cplusplus
}
diff --git a/lib/comm_internal.h b/lib/comm_internal.h
index c509d41..7a141d0 100644
--- a/lib/comm_internal.h
+++ b/lib/comm_internal.h
@@ -1,6 +1,6 @@
enum { MAGIC = 0x152355 };
-#include "../kde/gen/comm_internal_generated.h"
+#include <dapi/comm_internal_generated.h>
#include "calls.h"
#include "callbacks.h"
diff --git a/lib/utils.c b/lib/utils.c
deleted file mode 100644
index 7764e50..0000000
--- a/lib/utils.c
+++ /dev/null
@@ -1,15 +0,0 @@
-#include <config.h>
-
-#include "utils.h"
-
-#include <stdarg.h>
-#include <stdio.h>
-
-void debug( const char* fmt, ... )
- {
- va_list va;
- va_start( va, fmt );
- vfprintf( stderr, fmt, va );
- va_end( va );
- fprintf( stderr, "\n" );
- }
diff --git a/lib/utils.h b/lib/utils.h
deleted file mode 100644
index 721ff84..0000000
--- a/lib/utils.h
+++ /dev/null
@@ -1,5 +0,0 @@
-void debug( const char* fmt, ... )
-#ifdef __GNUC__
- __attribute (( format( printf, 1, 2 )))
-#endif
- ;
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 0a4306e..aad6c92 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,4 +1,4 @@
-bin_PROGRAMS = test_comm test_calls test_runasuser test_screensaving test_mailto test_remotefile test_async \
+noinst_PROGRAMS = test_comm test_calls test_runasuser test_screensaving test_mailto test_remotefile test_async \
test_capabilities test_callbacks test_fallback
test_comm_SOURCES = test_comm.c
@@ -41,4 +41,4 @@ test_fallback_SOURCES = test_fallback.c
test_fallback_LDADD = ../lib/libdapi.la
test_fallback_LDFLAGS = $(all_libraries)
-INCLUDES = $(all_includes) -I$(top_srcdir)/lib
+INCLUDES = -I$(top_srcdir)/include $(all_includes)
diff --git a/tests/test_async.c b/tests/test_async.c
index 518d7f5..8828eb9 100644
--- a/tests/test_async.c
+++ b/tests/test_async.c
@@ -1,8 +1,8 @@
#include <stdio.h>
-#include "comm.h"
-#include "calls.h"
-#include "callbacks.h"
+#include <dapi/comm.h>
+#include <dapi/calls.h>
+#include <dapi/callbacks.h>
static int seq1;
diff --git a/tests/test_callbacks.c b/tests/test_callbacks.c
index a62cba8..c682a54 100644
--- a/tests/test_callbacks.c
+++ b/tests/test_callbacks.c
@@ -1,9 +1,9 @@
#include <stdio.h>
#include <unistd.h>
-#include "comm.h"
-#include "calls.h"
-#include "callbacks.h"
+#include <dapi/comm.h>
+#include <dapi/calls.h>
+#include <dapi/callbacks.h>
static void callback( DapiConnection* conn, int seq, int ord )
{
diff --git a/tests/test_calls.c b/tests/test_calls.c
index 38e0d89..b53fcd6 100644
--- a/tests/test_calls.c
+++ b/tests/test_calls.c
@@ -1,7 +1,7 @@
#include <stdio.h>
-#include "comm.h"
-#include "calls.h"
+#include <dapi/comm.h>
+#include <dapi/calls.h>
int main()
{
diff --git a/tests/test_capabilities.c b/tests/test_capabilities.c
index 5b7b482..7d12955 100644
--- a/tests/test_capabilities.c
+++ b/tests/test_capabilities.c
@@ -1,8 +1,8 @@
#include <stdio.h>
#include <stdlib.h>
-#include "comm.h"
-#include "calls.h"
+#include <dapi/comm.h>
+#include <dapi/calls.h>
int main()
{
diff --git a/tests/test_comm.c b/tests/test_comm.c
index ad70bec..15fcab0 100644
--- a/tests/test_comm.c
+++ b/tests/test_comm.c
@@ -1,6 +1,6 @@
#include <stdio.h>
-#include "comm.h"
+#include <dapi/comm.h>
int main( int argc, char* argv[] )
{
diff --git a/tests/test_fallback.c b/tests/test_fallback.c
index 6f62186..e4ef3c1 100644
--- a/tests/test_fallback.c
+++ b/tests/test_fallback.c
@@ -1,7 +1,7 @@
#include <stdio.h>
-#include "comm.h"
-#include "calls.h"
+#include <dapi/comm.h>
+#include <dapi/calls.h>
static void test( DapiConnection* conn, const char* txt )
{
diff --git a/tests/test_mailto.c b/tests/test_mailto.c
index 4a8c209..646410e 100644
--- a/tests/test_mailto.c
+++ b/tests/test_mailto.c
@@ -1,8 +1,8 @@
#include <stdio.h>
#include <stdlib.h>
-#include "comm.h"
-#include "calls.h"
+#include <dapi/comm.h>
+#include <dapi/calls.h>
int main()
{
diff --git a/tests/test_remotefile.c b/tests/test_remotefile.c
index 2b3f8fe..36eb492 100644
--- a/tests/test_remotefile.c
+++ b/tests/test_remotefile.c
@@ -2,8 +2,8 @@
#include <stdlib.h>
#include <unistd.h>
-#include "comm.h"
-#include "calls.h"
+#include <dapi/comm.h>
+#include <dapi/calls.h>
int main()
{
diff --git a/tests/test_runasuser.c b/tests/test_runasuser.c
index 5a238c4..5fe4f1a 100644
--- a/tests/test_runasuser.c
+++ b/tests/test_runasuser.c
@@ -1,7 +1,7 @@
#include <stdio.h>
-#include "comm.h"
-#include "calls.h"
+#include <dapi/comm.h>
+#include <dapi/calls.h>
int main()
{
diff --git a/tests/test_screensaving.c b/tests/test_screensaving.c
index d20a13f..2224eeb 100644
--- a/tests/test_screensaving.c
+++ b/tests/test_screensaving.c
@@ -1,8 +1,8 @@
#include <stdio.h>
#include <unistd.h>
-#include "comm.h"
-#include "calls.h"
+#include <dapi/comm.h>
+#include <dapi/calls.h>
int main()
{