Commit Graph

105 Commits

Author SHA1 Message Date
Ryan Schmidt
881fcb776d
Use absolute install_name
Fixes #437.
2018-05-14 14:32:05 -05:00
Jan-Erik Rediger
43284ee495
Merge pull request #561 from zshipko/master
Fix "make install" on OpenBSD
2018-01-05 15:50:31 +01:00
Dmitri Vorobiev
12a9d1a32b Strip compiler options from the CC variable
The Makefile checks validity of the compiler command in the CC
variable by feeding the contents of that variable to the `type'
utility. Some environments include compiler options in the CC
variable such as architecture specific tuning flags. For such
cases it is necessary to first strip everything except the
command itself from the contents of the CC variable prior to
checking the command with the type utility, which is what this
patch is introducing. We use shell parameter expansion mechanism
for this purpose.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.com>
2017-12-28 11:42:45 +02:00
Dmitri Vorobiev
3238cf4fe7 Remove $(ARCH) expansion from the Makefile
Some compilation environments (such as Yocto) define the ARCH
environment variable to indicate the target architecture. For
such enviroments, hiredis build fails, because the expanded
$(ARCH) variable in the Makefile gets erroneously interpreted
as an argument to the `-ggdb' command line option during the
compilation stage or as an input file name during the linking
stage.

This patch removes $(ARCH) expansions from the Makefile. This
doesn't harm cross-compilation, the latter goes fine with the
properly assigned CC environment variable. For native builds,
this patch does not imply any changes.

Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.com>
2017-12-27 14:46:07 +02:00
Zach Shipko
a2ef2b69bf Fix "make install" on OpenBSD 2017-11-28 17:43:11 -08:00
Igor Gnatenko
725a96aaa2 build: do not assume that INSTALL is cp
INSTALL is supposed to be `install` in most of the cases which
doesn't work with directories, but works perfectly with files.

Don't do this assumption.

Reported-by: Jiří Vymazal <jvymazal@redhat.com>
References: https://bugzilla.redhat.com/show_bug.cgi?id=1506251
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-10-30 10:22:05 +01:00
Trustfarm-heart
06eedd8a24 Build error patch with glib-2.0
In case of some glib-2.0 linker error ,
make examples 
can't link with glib2.0,  in this case -lglib-2.0  to after includes and move to last will solve the issues.
2016-10-10 04:17:28 +09:00
Jan-Erik Rediger
acf8950041 fix: Rename DEBUG to DEBUG_FLAGS
This avoids issues with environments where DEBUG is set to an arbitrary
value to force debug mode in other tools.

BREAKING CHANGE: This breaks builds that explicitely set `DEBUG` to
                 some value (even the empty value).
                 To get back the old behaviour change the `DEBUG_FLAGS`
                 variable now.
2016-04-20 18:46:35 +02:00
Jan-Erik Rediger
8e6d8195a9 Merge branch 'soname-stable' into unstable 2015-08-24 16:54:48 +02:00
Jan-Erik Rediger
a9a0af1d35 Use container-based Travis by installing packages through the addon 2015-07-28 00:21:24 +02:00
Dmitry Bakhvalov
c18a564818 Added MacOS X addapter and corresponding example.
Added MacOS X support via CoreFoundation run loop.
2015-07-27 23:19:14 +02:00
Pietro Cerutti
8ef7d595ac Add Qt adapter and relative example. 2015-07-27 23:17:41 +02:00
Gergely Nagy
3b153cbf9d Add an Ivykis adapter
This adds a new adapter and an example for using hiredis with the ivykis
async I/O library.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2015-07-27 22:48:05 +02:00
Jan-Erik Rediger
9644a96a48 Use stable soname version 2015-07-27 22:14:03 +02:00
w359405949
485d0a148f Update Makefile
fix link error while run "make hiredis-example-libuv":

undefined reference to `clock_gettime'
undefined reference to `clock_getres'
2015-05-30 09:45:20 +08:00
Jan-Erik Rediger
26999505d6 Make sure to compile example to trigger edge-cases in compiling 2015-05-03 22:33:39 +02:00
Jan-Erik Rediger
8999750f12 Revert "Always compile with C99 standard."
This reverts commit d8145d79ce.
2015-05-03 22:32:42 +02:00
Jan-Erik Rediger
d8145d79ce Always compile with C99 standard.
Turns out: gnu9x defines `unix` to 1, making it unusable as a variable
name.
2015-04-16 22:51:32 +02:00
David Watson
dc13bc8627 Add PKGCONFNAME to install dependencies.
Attempting to use the install target before the make target works fine,
except for the missing pkgconfig file.  Adding that file to the
dependencies for the install target to make sure it gets created first.
2015-03-28 12:17:11 -04:00
Jan-Erik Rediger
30814af63c Correct escaping for prefix in pkgconf file 2015-03-19 09:21:25 +01:00
Dan Skorupski
97364ed59a Fix hiredis.pc generation. 2015-03-18 18:56:11 -05:00
Dominique Leuenberger
37c06facda Fix pkgconf file: escaping needed
Due to the various processors going over the command, we need more
escaping.

1) Make parses it, so $${libdir} becomes ${libdir}
2) 'shell' parses it for the 'echo command', whereas echo ${libdir}
would be an empty string; escape it as \${libdir} to ensure we get what
we want.

Closes #312
2015-03-03 08:12:49 -08:00
Matt Stancliff
6b122d43f9 Fix pkgconf when used with DESTDIR
Closes #302
2015-02-12 13:58:14 -05:00
Matt Stancliff
2b2b512dca Build test binary by default
This is the only way to force a 32-bit build of the test binary
2015-01-26 10:08:12 -05:00
Matt Stancliff
74f53e30db Fix pkgconf build dependency
We need to re-gen pkgconf when the version changes, and the version
is kept in hiredis.h, so make pkgconf depend on hiredis.h.
2015-01-26 09:41:11 -05:00
Sebastian Wiedenroth
4355ab3c8f Fix Makefile install problems
Adds DESTDIR support
Fixes INSTALL_PKGCONF_PATH
Properly copies {read,shs}.h now during make install

Closes #297
2015-01-26 09:30:17 -05:00
Matt Stancliff
dd680fcc14 Add valgrind to TravisCI testing 2015-01-22 16:00:38 -05:00
Matt Stancliff
dad0516423 Update dependency list in Makefile 2015-01-05 16:53:23 -05:00
Matt Stancliff
9abfdf9405 Build static library by default 2015-01-05 16:53:23 -05:00
Matt Stancliff
1d2b4d38db Generate pkgconf during build
The pkgconf source is localized to the Makefile, so we're not dropping
an unnecessary "hiredis.pc.in" in the source directory.

Closes #129
Closes #136
2015-01-05 16:53:23 -05:00
tzickel
ba3e74c408 Refactor reading code into read.c
Makes hiredis reading functions easier to include in external projects

[fixed all merge conflicts against current version]

Closes #249
2015-01-05 16:53:22 -05:00
Christian Hergert
0c9ff5bb03 Add GLib 2.0 adapter
[Cleaned up Makefile and header includes.  Didn't change crazy
coding style because it's the convention for GLib systems.]

Closes #83
Closes #71
2015-01-05 16:39:30 -05:00
Pieter Noordhuis
f225c276be Fix HIREDIS_MINOR
Closes #219.
2014-04-09 23:16:33 -07:00
Eddy Jansson
05fb7be3ea Fix Makefile test to use more compatible syntax
The existing way is not compatible with a lot of shells, including most
bash installations, because the echos that generates the configuration
sent to redis-server doesn't expand the escapes. Adding '-e' to the
echo works under bash, but breaks on the Travis CI server.

This is my attempt to find an alternative that works everywhere.
[committer note: it doesn't work under Solaris make, but the Makefile
was already broken under Solaris make.  Solaris users must use gmake.]

Closes #224 and Closes #221
2014-04-09 17:02:43 -04:00
Aaron Bedra
c552ca6904 Move examples into their own folder
Closes #166.
2013-07-10 22:16:53 -07:00
Pieter Noordhuis
c8234a3193 Merge branch 'libuv'
Closes #172.
2013-07-10 21:47:53 -07:00
Pieter Noordhuis
efe990d07d Fix path to static libuv library 2013-07-10 21:47:44 -07:00
Pieter Noordhuis
9d9e4a3b4f Remove unused Makefile variables
Fixes #176.
2013-07-10 21:24:46 -07:00
Erik Dubbelboer
fc55afb1b6 Made example-ae work again 2013-07-02 19:24:02 +02:00
Erik Dubbelboer
61277d0925 Added libuv adapter 2013-06-04 15:06:43 +02:00
antirez
7f346477c8 Add ARCH to Makefile CFLAGS / LDFLAGS.
This makes builiding with an optional 32 bit target simpler. For
instance Redis (that contains an embedded copy of hiredis) when compiled
with "make 32bit" uses to pass an ARCH parameter to force an hiredis
32 bit build.
2012-08-21 14:29:49 +02:00
Pieter Noordhuis
f9a3229873 Fix gprof target 2011-06-19 13:13:39 +02:00
Pieter Noordhuis
54a10a27e7 Coverage report 2011-06-19 13:07:12 +02:00
Pieter Noordhuis
be5e943ddd Use CFLAGS and LDFLAGS instead of custom variables 2011-06-19 12:37:45 +02:00
Pieter Noordhuis
cc8ed7360e Append to REAL_LDFLAGS so LDFLAGS can be overridden by the user 2011-06-19 12:34:41 +02:00
Pieter Noordhuis
608e29b375 Pass LDFLAGS to linker when creating dynamic library 2011-06-19 12:33:51 +02:00
Pieter Noordhuis
ff09caa04a Remove unnecessary overrides 2011-06-19 12:16:47 +02:00
Pieter Noordhuis
888b90d6ea Don't pass CFLAGS when linking 2011-06-19 10:21:05 +02:00
Pieter Noordhuis
3331c22eb9 Add phony target 2011-06-18 17:30:59 +02:00
Pieter Noordhuis
b8e0edaabb Remove unused variables
The variable OBJARCH was used to compile objects for both 32-bit and
64-bit architectures. It can be removed because this is only relevant
for the Ruby wrapper for hiredis. This wrapper should put these flags in
CFLAGS to get the same effect.
2011-06-18 17:18:10 +02:00