summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Friloux <guillaume.friloux@gmail.com>2013-12-12 15:04:44 +0100
committerGuillaume Friloux <guillaume.friloux@gmail.com>2013-12-12 15:04:44 +0100
commit371d0cfc0c02dfc6889be3b7e3100d380e65410a (patch)
tree11e2ae6a47b7230a6640738e2848bcd06ad3b7c2
parentbaadbb3ca615ca34a09244bcdf3924664816c91d (diff)
Change copyright as ASP64 is dead and ive always been the only one
working on this.
-rw-r--r--Makefile.am43
-rwxr-xr-xautogen.sh1
-rw-r--r--configure.ac44
-rw-r--r--src/bin/global.h4
-rw-r--r--src/bin/libconf.c13
-rw-r--r--src/bin/logfiles.c5
-rw-r--r--src/bin/main.c17
-rw-r--r--src/bin/send.c5
8 files changed, 87 insertions, 45 deletions
diff --git a/Makefile.am b/Makefile.am
index 6cfd95b..4a706fb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
1ACLOCAL_AMFLAGS = -I m4 1ACLOCAL_AMFLAGS = -I m4
2 2AUTOMAKE_OPTIONS = subdir-objects
3SUBDIRS = src doc 3AM_MAKEFLAGS = --no-print-directory
4 4
5MAINTAINERCLEANFILES = \ 5MAINTAINERCLEANFILES = \
6ABOUT-NLS \ 6ABOUT-NLS \
@@ -49,3 +49,42 @@ debian/files \
49debian/smman.debhelper.log \ 49debian/smman.debhelper.log \
50debian/smman.substvars \ 50debian/smman.substvars \
51debian/stamp* 51debian/stamp*
52
53EXTRA_DIST =
54
55bin_PROGRAMS =
56BIN_CPPFLAGS = -I$(top_srcdir)
57
58include src/bin/Makefile.mk
59
60maintainer-clean-local:
61 rm -rf autom4te.cache
62
63if ENABLE_TESTS
64
65lcov-reset:
66 @rm -rf $(top_builddir)/coverage
67 @find $(top_builddir) -name "*.gcda" -delete
68 @lcov --zerocounters --directory $(top_builddir)
69
70lcov-report:
71 @mkdir $(top_builddir)/coverage
72 lcov --capture --compat-libtool --output-file $(top_builddir)/coverage/coverage.info --directory $(top_builddir)
73 lcov --remove $(top_builddir)/coverage/coverage.info '*.h' --output-file $(top_builddir)/coverage/coverage.cleaned.info
74 genhtml -t "$(PACKAGE_STRING)" -o $(top_builddir)/coverage/html $(top_builddir)/coverage/coverage.cleaned.info
75 @echo "Coverage Report at $(top_builddir)/coverage/html"
76 if test -d $(top_builddir)/doc/html/; then cp -vfr $(top_builddir)/coverage/html $(top_builddir)/doc/html/; mv $(top_builddir)/doc/html/html $(top_builddir)/doc/html/coverage/; fi
77
78check-local:
79 @$(MAKE) lcov-reset
80else
81
82lcov-reset:
83 @echo "reconfigure with --enable-tests"
84
85lcov-report:
86 @echo "reconfigure with --enable-tests"
87
88check-local:
89 @echo "reconfigure with --enable-tests"
90endif
diff --git a/autogen.sh b/autogen.sh
index aaaa004..8c1ce2f 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -9,6 +9,7 @@ touch README
9touch ABOUT-NLS 9touch ABOUT-NLS
10 10
11echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS -I m4 || exit 1 11echo "Running aclocal..." ; aclocal $ACLOCAL_FLAGS -I m4 || exit 1
12echo "Running autoheader..." ; autoheader || exit 1
12echo "Running autoconf..." ; autoconf || exit 1 13echo "Running autoconf..." ; autoconf || exit 1
13echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1 14echo "Running libtoolize..." ; (libtoolize --copy --automake || glibtoolize --automake) || exit 1
14echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1 15echo "Running automake..." ; automake --add-missing --copy --gnu || exit 1
diff --git a/configure.ac b/configure.ac
index 05e8e5f..2323699 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,8 +3,7 @@ m4_define([v_min], [0])
3m4_define([v_mic], [1]) 3m4_define([v_mic], [1])
4m4_define([v_ver], [v_maj.v_min.v_mic]) 4m4_define([v_ver], [v_maj.v_min.v_mic])
5 5
6 6AC_INIT([smman], [v_ver], [guillaume.friloux@aspfrance.com])
7AC_INIT([Smman], [v_ver], [guillaume.friloux@aspfrance.com])
8 7
9AC_PREREQ(2.01) 8AC_PREREQ(2.01)
10AC_CONFIG_SRCDIR([configure.ac]) 9AC_CONFIG_SRCDIR([configure.ac])
@@ -13,30 +12,50 @@ AM_INIT_AUTOMAKE([1.6 dist-bzip2])
13 12
14define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl 13define([AC_LIBTOOL_LANG_CXX_CONFIG], [:])dnl
15define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl 14define([AC_LIBTOOL_LANG_F77_CONFIG], [:])dnl
16AC_PROG_LIBTOOL
17AC_CONFIG_MACRO_DIR([m4]) 15AC_CONFIG_MACRO_DIR([m4])
18 16
19dnl we just have set the version info, then: 17dnl we just have set the version info, then:
20version_number=v_ver 18version_number=v_ver
21AC_SUBST(version_number) 19AC_SUBST(version_number)
22 20
21AC_PROG_LIBTOOL
23GCC_STACK_PROTECT_LIB 22GCC_STACK_PROTECT_LIB
24GCC_STACK_PROTECT_CC 23GCC_STACK_PROTECT_CC
24AC_PROG_LIBTOOL
25AC_PROG_INSTALL
25AC_PROG_CC 26AC_PROG_CC
26AM_PROG_CC_C_O 27AM_PROG_CC_C_O
27AC_PROG_MKDIR_P 28AC_PROG_MKDIR_P
29AC_PROG_MAKE_SET
30
31PKG_PROG_PKG_CONFIG
32
33EFL_CHECK_FUNCS([smman], [fnmatch])
34EFL_CHECK_TESTS([smman], [enable_tests="yes"], [enable_tests="no"])
35
36if test "x${enable_tests}" = "xyes" ; then
37 CFLAGS="-W -Wall -g -O1 -DDEBUG -fprofile-arcs -ftest-coverage"
38 LDFLAGS="-lgcov -rdynamic -fvisibility=default"
39else
40 CFLAGS="$CFLAGS -W -Wall -O2"
41 LDFLAGS="-Wl,--as-needed -rdynamic -fvisibility=default"
42fi
28 43
29AC_CONFIG_FILES([ 44AC_CONFIG_FILES([
30Makefile 45Makefile
31doc/Makefile
32src/Makefile
33src/bin/Makefile
34]) 46])
35 47
48BIN_REQUIRES="eina ecore ecore-file libcurl"
49PKG_CHECK_MODULES(BIN, [$BIN_REQUIRES], [build_smman=yes], [build_smman=no])
50
51AC_DEFINE(_LARGEFILE64_SOURCE, 1, "Needed for 64 bit on 32")
52AC_DEFINE(_LARGEFILE_SOURCE, 1, "Needed for 64 bit on 32")
53AC_DEFINE(_FILE_OFFSET_BITS, 64, "Needed for 64 bit on 32")
54
55AM_CONDITIONAL(ENABLE_TESTS, [test "x${enable_tests}" = "xyes"])
56
57AC_CONFIG_HEADER([config.h])
36 58
37PKG_CHECK_MODULES([eina], [eina], [have_eina="yes"], [have_eina="no"])
38PKG_CHECK_MODULES([ecore], [ecore ecore-file], [have_ecore="yes"], [have_ecore="no"])
39PKG_CHECK_MODULES([libcurl], [libcurl], [have_curl="yes"], [have_curl="no"])
40AC_OUTPUT 59AC_OUTPUT
41 60
42echo 61echo
@@ -47,10 +66,9 @@ echo "------------------------------------------------------------------------"
47echo 66echo
48echo "Configuration Options Summary:" 67echo "Configuration Options Summary:"
49echo 68echo
50echo " eina.........: ${have_eina}" 69echo " deps.........: ${build_smman}"
51echo " ecore........: ${have_ecore}" 70echo " prefix.......: ${prefix}"
52echo " curl.........: ${have_curl}" 71echo " tests........: ${enable_tests} (Coverage: ${efl_enable_coverage})"
53echo " prefix.......: $prefix"
54echo 72echo
55echo "Build Options:" 73echo "Build Options:"
56echo " CPPFLAGS.....: $CPPFLAGS" 74echo " CPPFLAGS.....: $CPPFLAGS"
diff --git a/src/bin/global.h b/src/bin/global.h
index b812464..cc6fe43 100644
--- a/src/bin/global.h
+++ b/src/bin/global.h
@@ -25,6 +25,10 @@
25 * 25 *
26 * Contains all global variables we need 26 * Contains all global variables we need
27 */ 27 */
28#ifdef HAVE_CONFIG_H
29# include "config.h"
30#endif
31
28#include <Eina.h> 32#include <Eina.h>
29#include <Ecore.h> 33#include <Ecore.h>
30#include <Ecore_File.h> 34#include <Ecore_File.h>
diff --git a/src/bin/libconf.c b/src/bin/libconf.c
index 40edef5..0be5eba 100644
--- a/src/bin/libconf.c
+++ b/src/bin/libconf.c
@@ -217,16 +217,3 @@ int libconfig_free(struct libconfig *myconf)
217 eina_list_free(myconf->lconfig); 217 eina_list_free(myconf->lconfig);
218 return(0); 218 return(0);
219} 219}
220
221/**
222 * @fn void libconfig_version(char *version)
223 * @brief Gets revision number of the library
224 *
225 * @param version buffer to use to store revision number
226 *
227 */
228void libconfig_version(char *version)
229{
230 strcpy(version, REVISION);
231 return;
232}
diff --git a/src/bin/logfiles.c b/src/bin/logfiles.c
index e2cf98c..dcc1e77 100644
--- a/src/bin/logfiles.c
+++ b/src/bin/logfiles.c
@@ -26,6 +26,11 @@
26 * @see logfile 26 * @see logfile
27 * @see list_logfiles 27 * @see list_logfiles
28 */ 28 */
29#ifdef HAVE_CONFIG_H
30# include "config.h"
31#endif
32
33
29#include "logfiles.h" 34#include "logfiles.h"
30 35
31/** 36/**
diff --git a/src/bin/main.c b/src/bin/main.c
index 0a94e1c..11ea95e 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -102,19 +102,15 @@ int main(int argc, char **argv)
102 int option_index = 0; 102 int option_index = 0;
103 103
104 static struct option long_options[] = { 104 static struct option long_options[] = {
105 {"version", 0, 0, 'v'},
106 {"help", 0, 0, 'h'}, 105 {"help", 0, 0, 'h'},
107 {0, 0, 0, 0} 106 {0, 0, 0, 0}
108 }; 107 };
109 108
110 c = getopt_long(argc, argv, "vh", long_options, &option_index); 109 c = getopt_long(argc, argv, "h", long_options, &option_index);
111 if (c == -1) break; 110 if (c == -1) break;
112 111
113 switch (c) 112 switch (c)
114 { 113 {
115 case 'v':
116 version(argv[0]);
117 exit(0);
118 case 'h': 114 case 'h':
119 usage(argv[0]); 115 usage(argv[0]);
120 exit(0); 116 exit(0);
@@ -168,14 +164,3 @@ void usage(char *progname)
168 printf("\tDebugging : \n"); 164 printf("\tDebugging : \n");
169 printf("\t\tEINA_LOG_LEVEL=5 %s\n", progname); 165 printf("\t\tEINA_LOG_LEVEL=5 %s\n", progname);
170} 166}
171
172/**
173 * @fn void version(char *progname)
174 * @brief Shows program revision
175 *
176 * @param progname (char *) Name of program
177 */
178void version(char *progname)
179{
180 printf("%s r%s\n", progname, REVISION);
181}
diff --git a/src/bin/send.c b/src/bin/send.c
index 9c40d70..872cf76 100644
--- a/src/bin/send.c
+++ b/src/bin/send.c
@@ -259,7 +259,10 @@ int send_toES(char *jsondata)
259 * 259 *
260 * @return Number of bytes received 260 * @return Number of bytes received
261 */ 261 */
262size_t send_fromES(void *ptr, size_t size, size_t nmemb, void *data) 262size_t send_fromES(void *ptr,
263 size_t size,
264 size_t nmemb,
265 void *data EINA_UNUSED)
263{ 266{
264 if( strncmp((char *)ptr, "{\"ok\":", 6) ) 267 if( strncmp((char *)ptr, "{\"ok\":", 6) )
265 EINA_LOG_DOM_ERR(einadom_send, "Indexing of JSON data failed"); 268 EINA_LOG_DOM_ERR(einadom_send, "Indexing of JSON data failed");