nutcracker 0.2.4.12 → 0.3.0.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +8 -8
  2. data/Rakefile +1 -1
  3. data/ext/nutcracker/ChangeLog +10 -0
  4. data/ext/nutcracker/Makefile.am +2 -0
  5. data/ext/nutcracker/Makefile.in +101 -14
  6. data/ext/nutcracker/README.md +18 -1
  7. data/ext/nutcracker/config.h.in +18 -0
  8. data/ext/nutcracker/configure +196 -25
  9. data/ext/nutcracker/configure.ac +64 -6
  10. data/ext/nutcracker/extconf.rb +1 -1
  11. data/ext/nutcracker/man/nutcracker.8 +76 -0
  12. data/ext/nutcracker/notes/debug.txt +116 -16
  13. data/ext/nutcracker/notes/kqueue.pdf +0 -0
  14. data/ext/nutcracker/notes/recommendation.md +20 -0
  15. data/ext/nutcracker/notes/redis.md +2 -2
  16. data/ext/nutcracker/scripts/nutcracker.spec +1 -1
  17. data/ext/nutcracker/scripts/redis-check.sh +3 -1
  18. data/ext/nutcracker/src/Makefile.am +15 -6
  19. data/ext/nutcracker/src/Makefile.in +39 -36
  20. data/ext/nutcracker/src/event/Makefile.am +16 -0
  21. data/ext/nutcracker/src/event/Makefile.in +492 -0
  22. data/ext/nutcracker/src/event/nc_epoll.c +344 -0
  23. data/ext/nutcracker/src/event/nc_event.h +88 -0
  24. data/ext/nutcracker/src/event/nc_evport.c +420 -0
  25. data/ext/nutcracker/src/event/nc_kqueue.c +412 -0
  26. data/ext/nutcracker/src/hashkit/nc_crc32.c +19 -1
  27. data/ext/nutcracker/src/hashkit/nc_hashkit.h +3 -1
  28. data/ext/nutcracker/src/hashkit/nc_md5.c +257 -315
  29. data/ext/nutcracker/src/nc.c +12 -1
  30. data/ext/nutcracker/src/nc_connection.c +18 -1
  31. data/ext/nutcracker/src/nc_connection.h +1 -0
  32. data/ext/nutcracker/src/nc_core.c +22 -30
  33. data/ext/nutcracker/src/nc_core.h +22 -7
  34. data/ext/nutcracker/src/nc_proxy.c +8 -9
  35. data/ext/nutcracker/src/nc_queue.h +2 -0
  36. data/ext/nutcracker/src/nc_request.c +3 -4
  37. data/ext/nutcracker/src/nc_response.c +25 -8
  38. data/ext/nutcracker/src/nc_server.c +8 -6
  39. data/ext/nutcracker/src/nc_stats.c +46 -43
  40. data/ext/nutcracker/src/nc_stats.h +37 -30
  41. data/ext/nutcracker/src/nc_util.c +6 -1
  42. data/ext/nutcracker/src/proto/nc_redis.c +19 -5
  43. data/lib/nutcracker/version.rb +1 -1
  44. data/lib/nutcracker.rb +1 -1
  45. metadata +10 -4
  46. data/ext/nutcracker/src/nc_event.c +0 -214
  47. data/ext/nutcracker/src/nc_event.h +0 -39
@@ -73,6 +73,18 @@ All memory for incoming requests and outgoing responses is allocated in mbuf. Mb
73
73
 
74
74
  If nutcracker is meant to handle a large number of concurrent client connections, you should set the mbuf size to 512 or 1K bytes.
75
75
 
76
+ ## How to interpret mbuf-size=N argument?
77
+
78
+ Every client connection consumes at least one mbuf. To service a request we need two connections (one from client to proxy and another from proxy to server). So we would need two mbufs.
79
+
80
+ A fragmentable request like 'get foo bar\r\n', which btw gets fragmented to 'get foo\r\n' and 'get bar\r\n' would consume two mbuf for request and two mbuf for response. So a fragmentable request with N fragments needs N * 2 mbufs. The good thing about mbuf is that the memory comes from a reuse pool. Once a mbuf is allocated, it is never freed but just put back into the reuse pool. The bad thing is that once mbuf is allocated it is never freed, since a freed mbuf always goes back to the [reuse pool](https://github.com/twitter/twemproxy/blob/master/src/nc_mbuf.c#L23-L24). This can however be easily fixed if needed by putting a threshold parameter on the reuse pool.
81
+
82
+ So, if nutcracker is handling say 1K client connections and 100 server connections, it would consume (max(1000, 100) * 2 * mbuf-size) memory for mbuf. If we assume that clients are sending non-pipelined request, then with default mbuf-size of 16K this would in total consume 32M.
83
+
84
+ Furthermore, if on average every requests has 10 fragments, then the memory consumption would be 320M. Instead of handling 1K client connections, lets say you were handling 10K, then the memory consumption would be 3.2G. Now instead of using a default mbuf-size of 16K, you used 512 bytes, then memory consumption for the same scenario would drop to 1000 * 2 * 512 * 10 = 10M
85
+
86
+ This is the reason why for 'large number' of connections or for wide multi-get like requests, you want to choose a small value for mbuf-size like 512
87
+
76
88
  ## Maximum Key Length
77
89
  The memcache ascii protocol [specification](notes/memcache.txt) limits the maximum length of the key to 250 characters. The key should not include whitespace, or '\r' or '\n' character. For redis, we have no such limitation. However, nutcracker requires the key to be stored in a contiguous memory region. Since all requests and responses in nutcracker are stored in mbuf, the maximum length of the redis key is limited by the size of the maximum available space for data in mbuf (mbuf_data_size()). This means that if you want your redis instances to handle large keys, you might want to choose large mbuf size set using -m or --mbuf-size=N command-line argument.
78
90
 
@@ -135,3 +147,11 @@ So, on a given server, the cumulative number of times a server is ejected can be
135
147
  ```
136
148
 
137
149
  A diff of the above value between two successive time intervals would generate a nice timeseries graph for ejected servers.
150
+
151
+ You can also graph the timestamp at which any given server was ejected by graphing `server_ejected_at` stat.
152
+
153
+ ## server_connections: > 1
154
+
155
+ By design, twemproxy multiplexes several client connections over few server connections. It is important to note that **"read my last write"** constraint doesn't necessarily hold true when twemproxy is configured with `server_connections: > 1`.
156
+
157
+ To illustrate this, consider a scenario where twemproxy is configured with `server_connections: 2`. If a client makes pipelined requests with the first request in pipeline being `set foo 0 0 3\r\nbar\r\n` (write) and the second request being `get foo\r\n` (read), the expectation is that the read of key `foo` would return the value `bar`. However, with configuration of two server connections it is possible that write and read request are sent on different server connections which would mean that their completion could race with one another. In summary, if the client expects "read my last write" constraint, you either configure twemproxy to use `server_connections:1` or use clients that only make synchronous requests to twemproxy.
@@ -83,7 +83,7 @@
83
83
  +-------------------+------------+---------------------------------------------------------------------------------------------------------------------+
84
84
  | PSETEX | Yes | PSETEX key milliseconds value |
85
85
  +-------------------+------------+---------------------------------------------------------------------------------------------------------------------+
86
- | SET | Yes | SET key value |
86
+ | SET | Yes | SET key value [EX seconds] [PX milliseconds] [NX|XX] |
87
87
  +-------------------+------------+---------------------------------------------------------------------------------------------------------------------+
88
88
  | SETBIT | Yes | SETBIT key offset value |
89
89
  +-------------------+------------+---------------------------------------------------------------------------------------------------------------------+
@@ -195,7 +195,7 @@
195
195
  +-------------------+------------+---------------------------------------------------------------------------------------------------------------------+
196
196
  | SPOP | Yes | SPOP key |
197
197
  +-------------------+------------+---------------------------------------------------------------------------------------------------------------------+
198
- | SRANDMEMBER | Yes | SRANDMEMBER key |
198
+ | SRANDMEMBER | Yes | SRANDMEMBER key [count] |
199
199
  +-------------------+------------+---------------------------------------------------------------------------------------------------------------------+
200
200
  | SREM | Yes | SREM key member [member ...] |
201
201
  +-------------------+------------+---------------------------------------------------------------------------------------------------------------------+
@@ -30,7 +30,7 @@ autoreconf -fvi
30
30
  #Install init script
31
31
  %{__install} -p -D -m 0755 scripts/%{name}.init %{buildroot}%{_initrddir}/%{name}
32
32
 
33
- #Install example confog file
33
+ #Install example config file
34
34
  %{__install} -p -D -m 0644 conf/%{name}.yml %{buildroot}%{_sysconfdir}/%{name}/%{name}.yml
35
35
 
36
36
  %post
@@ -90,6 +90,7 @@ printf '\ndecrby\n'
90
90
  printf '*3\r\n$6\r\ndecrby\r\n$7\r\ncounter\r\n$3\r\n100\r\n' | socat ${debug} ${timeout} - TCP:localhost:${port},shut-close
91
91
 
92
92
  printf '\nget\n'
93
+ printf '*2\r\n$3\r\nget\r\n$16\r\nnon-existent-key\r\n' | socat ${debug} ${timeout} - TCP:localhost:${port},shut-close
93
94
  printf '*2\r\n$3\r\nget\r\n$3\r\nfoo\r\n' | socat ${debug} ${timeout} - TCP:localhost:${port},shut-close
94
95
  printf '*2\r\n$3\r\ndel\r\n$3\r\nfoo\r\n' | socat ${debug} ${timeout} - TCP:localhost:${port},shut-close
95
96
  printf '*2\r\n$3\r\nget\r\n$3\r\nfoo\r\n' | socat ${debug} ${timeout} - TCP:localhost:${port},shut-close
@@ -432,6 +433,7 @@ printf '*4\r\n$4\r\nsadd\r\n$4\r\nsfoo\r\n$3\r\nbar\r\n$3\r\nbas\r\n' | socat ${
432
433
  printf '*2\r\n$11\r\nsrandmember\r\n$4\r\nsfoo\r\n' | socat ${debug} ${timeout} - TCP:localhost:${port},shut-close
433
434
  printf '*2\r\n$11\r\nsrandmember\r\n$4\r\nsfoo\r\n' | socat ${debug} ${timeout} - TCP:localhost:${port},shut-close
434
435
  printf '*2\r\n$11\r\nsrandmember\r\n$4\r\nsfoo\r\n' | socat ${debug} ${timeout} - TCP:localhost:${port},shut-close
436
+ printf '*3\r\n$11\r\nsrandmember\r\n$4\r\nsfoo\r\n$1\r\n2\r\n' | socat ${debug} ${timeout} - TCP:localhost:${port},shut-close
435
437
 
436
438
  printf '\nsrem\n'
437
439
  printf '*2\r\n$3\r\ndel\r\n$4\r\nsfoo\r\n' | socat ${debug} ${timeout} - TCP:localhost:${port},shut-close
@@ -570,4 +572,4 @@ printf '*3\r\n$4\r\neval\r\n$10\r\nreturn 123\r\n$1\r\n1\r\n' | socat ${debug} $
570
572
  printf '*4\r\n$4\r\neval\r\n$10\r\nreturn 123\r\n$1\r\n1\r\n$1\r\n1\r\n' | socat ${debug} ${timeout} - TCP:localhost:${port},shut-close
571
573
  printf '*7\r\n$4\r\neval\r\n$40\r\nreturn {KEYS[1],KEYS[2],ARGV[1],ARGV[2]}\r\n$1\r\n2\r\n$9\r\nkey1{tag}\r\n$4\r\narg1\r\n$9\r\nkey2{tag}\r\n$4\r\narg2\r\n' | socat ${debug} ${timeout} - TCP:localhost:${port},shut-close
572
574
  printf '*9\r\n$4\r\neval\r\n$56\r\nreturn {KEYS[1],KEYS[2],KEYS[3],ARGV[1],ARGV[2],ARGV[3]}\r\n$1\r\n3\r\n$9\r\nkey1{tag}\r\n$4\r\narg1\r\n$9\r\nkey2{tag}\r\n$4\r\narg2\r\n$9\r\nkey3{tag}\r\n$4\r\narg3\r\n' | socat ${debug} ${timeout} - TCP:localhost:${port},shut-close
573
-
575
+ printf '*4\r\n$4\r\neval\r\n$11\r\nreturn {10}\r\n$1\r\n1\r\n$4\r\nTEMP\r\n' | socat ${debug} ${timeout} - TCP:localhost:${port},shut-close
@@ -1,11 +1,16 @@
1
1
  MAINTAINERCLEANFILES = Makefile.in
2
2
 
3
- AM_CPPFLAGS = -D_GNU_SOURCE -D_XOPEN_SOURCE
3
+ AM_CPPFLAGS =
4
+ if !OS_SOLARIS
5
+ AM_CPPFLAGS += -D_GNU_SOURCE
6
+ endif
4
7
  AM_CPPFLAGS += -I $(top_srcdir)/src/hashkit
5
8
  AM_CPPFLAGS += -I $(top_srcdir)/src/proto
9
+ AM_CPPFLAGS += -I $(top_srcdir)/src/event
6
10
  AM_CPPFLAGS += -I $(top_srcdir)/contrib/yaml-0.1.4/include
7
11
 
8
- AM_CFLAGS = -Wall -Wshadow
12
+ AM_CFLAGS =
13
+ AM_CFLAGS += -Wall -Wshadow
9
14
  AM_CFLAGS += -Wpointer-arith
10
15
  AM_CFLAGS += -Winline
11
16
  AM_CFLAGS += -Wunused-function -Wunused-variable -Wunused-value
@@ -13,11 +18,15 @@ AM_CFLAGS += -Wno-unused-parameter -Wno-unused-value
13
18
  AM_CFLAGS += -Wconversion -Wsign-compare
14
19
  AM_CFLAGS += -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations
15
20
 
16
- AM_LDFLAGS = -lm -lpthread -rdynamic
21
+ AM_LDFLAGS =
22
+ AM_LDFLAGS += -lm -lpthread -rdynamic
23
+ if OS_SOLARIS
24
+ AM_LDFLAGS += -lnsl -lsocket
25
+ endif
17
26
 
18
- SUBDIRS = hashkit proto
27
+ SUBDIRS = hashkit proto event
19
28
 
20
- bin_PROGRAMS = nutcracker
29
+ sbin_PROGRAMS = nutcracker
21
30
 
22
31
  nutcracker_SOURCES = \
23
32
  nc_core.c nc_core.h \
@@ -29,7 +38,6 @@ nutcracker_SOURCES = \
29
38
  nc_request.c \
30
39
  nc_response.c \
31
40
  nc_mbuf.c nc_mbuf.h \
32
- nc_event.c nc_event.h \
33
41
  nc_conf.c nc_conf.h \
34
42
  nc_stats.c nc_stats.h \
35
43
  nc_signal.c nc_signal.h \
@@ -43,4 +51,5 @@ nutcracker_SOURCES = \
43
51
 
44
52
  nutcracker_LDADD = $(top_builddir)/src/hashkit/libhashkit.a
45
53
  nutcracker_LDADD += $(top_builddir)/src/proto/libproto.a
54
+ nutcracker_LDADD += $(top_builddir)/src/event/libevent.a
46
55
  nutcracker_LDADD += $(top_builddir)/contrib/yaml-0.1.4/src/.libs/libyaml.a
@@ -34,7 +34,9 @@ PRE_UNINSTALL = :
34
34
  POST_UNINSTALL = :
35
35
  build_triplet = @build@
36
36
  host_triplet = @host@
37
- bin_PROGRAMS = nutcracker$(EXEEXT)
37
+ @OS_SOLARIS_FALSE@am__append_1 = -D_GNU_SOURCE
38
+ @OS_SOLARIS_TRUE@am__append_2 = -lnsl -lsocket
39
+ sbin_PROGRAMS = nutcracker$(EXEEXT)
38
40
  subdir = src
39
41
  DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
40
42
  ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -48,18 +50,19 @@ mkinstalldirs = $(install_sh) -d
48
50
  CONFIG_HEADER = $(top_builddir)/config.h
49
51
  CONFIG_CLEAN_FILES =
50
52
  CONFIG_CLEAN_VPATH_FILES =
51
- am__installdirs = "$(DESTDIR)$(bindir)"
52
- PROGRAMS = $(bin_PROGRAMS)
53
+ am__installdirs = "$(DESTDIR)$(sbindir)"
54
+ PROGRAMS = $(sbin_PROGRAMS)
53
55
  am_nutcracker_OBJECTS = nc_core.$(OBJEXT) nc_connection.$(OBJEXT) \
54
56
  nc_client.$(OBJEXT) nc_server.$(OBJEXT) nc_proxy.$(OBJEXT) \
55
57
  nc_message.$(OBJEXT) nc_request.$(OBJEXT) \
56
- nc_response.$(OBJEXT) nc_mbuf.$(OBJEXT) nc_event.$(OBJEXT) \
57
- nc_conf.$(OBJEXT) nc_stats.$(OBJEXT) nc_signal.$(OBJEXT) \
58
- nc_rbtree.$(OBJEXT) nc_log.$(OBJEXT) nc_string.$(OBJEXT) \
59
- nc_array.$(OBJEXT) nc_util.$(OBJEXT) nc.$(OBJEXT)
58
+ nc_response.$(OBJEXT) nc_mbuf.$(OBJEXT) nc_conf.$(OBJEXT) \
59
+ nc_stats.$(OBJEXT) nc_signal.$(OBJEXT) nc_rbtree.$(OBJEXT) \
60
+ nc_log.$(OBJEXT) nc_string.$(OBJEXT) nc_array.$(OBJEXT) \
61
+ nc_util.$(OBJEXT) nc.$(OBJEXT)
60
62
  nutcracker_OBJECTS = $(am_nutcracker_OBJECTS)
61
63
  nutcracker_DEPENDENCIES = $(top_builddir)/src/hashkit/libhashkit.a \
62
64
  $(top_builddir)/src/proto/libproto.a \
65
+ $(top_builddir)/src/event/libevent.a \
63
66
  $(top_builddir)/contrib/yaml-0.1.4/src/.libs/libyaml.a
64
67
  DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
65
68
  depcomp = $(SHELL) $(top_srcdir)/config/depcomp
@@ -237,16 +240,16 @@ top_build_prefix = @top_build_prefix@
237
240
  top_builddir = @top_builddir@
238
241
  top_srcdir = @top_srcdir@
239
242
  MAINTAINERCLEANFILES = Makefile.in
240
- AM_CPPFLAGS = -D_GNU_SOURCE -D_XOPEN_SOURCE -I \
241
- $(top_srcdir)/src/hashkit -I $(top_srcdir)/src/proto -I \
243
+ AM_CPPFLAGS = $(am__append_1) -I $(top_srcdir)/src/hashkit -I \
244
+ $(top_srcdir)/src/proto -I $(top_srcdir)/src/event -I \
242
245
  $(top_srcdir)/contrib/yaml-0.1.4/include
243
246
  AM_CFLAGS = -Wall -Wshadow -Wpointer-arith -Winline -Wunused-function \
244
247
  -Wunused-variable -Wunused-value -Wno-unused-parameter \
245
248
  -Wno-unused-value -Wconversion -Wsign-compare \
246
249
  -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls \
247
250
  -Wmissing-declarations
248
- AM_LDFLAGS = -lm -lpthread -rdynamic
249
- SUBDIRS = hashkit proto
251
+ AM_LDFLAGS = -lm -lpthread -rdynamic $(am__append_2)
252
+ SUBDIRS = hashkit proto event
250
253
  nutcracker_SOURCES = \
251
254
  nc_core.c nc_core.h \
252
255
  nc_connection.c nc_connection.h \
@@ -257,7 +260,6 @@ nutcracker_SOURCES = \
257
260
  nc_request.c \
258
261
  nc_response.c \
259
262
  nc_mbuf.c nc_mbuf.h \
260
- nc_event.c nc_event.h \
261
263
  nc_conf.c nc_conf.h \
262
264
  nc_stats.c nc_stats.h \
263
265
  nc_signal.c nc_signal.h \
@@ -271,6 +273,7 @@ nutcracker_SOURCES = \
271
273
 
272
274
  nutcracker_LDADD = $(top_builddir)/src/hashkit/libhashkit.a \
273
275
  $(top_builddir)/src/proto/libproto.a \
276
+ $(top_builddir)/src/event/libevent.a \
274
277
  $(top_builddir)/contrib/yaml-0.1.4/src/.libs/libyaml.a
275
278
  all: all-recursive
276
279
 
@@ -306,10 +309,10 @@ $(top_srcdir)/configure: $(am__configure_deps)
306
309
  $(ACLOCAL_M4): $(am__aclocal_m4_deps)
307
310
  cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
308
311
  $(am__aclocal_m4_deps):
309
- install-binPROGRAMS: $(bin_PROGRAMS)
312
+ install-sbinPROGRAMS: $(sbin_PROGRAMS)
310
313
  @$(NORMAL_INSTALL)
311
- test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
312
- @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
314
+ test -z "$(sbindir)" || $(MKDIR_P) "$(DESTDIR)$(sbindir)"
315
+ @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
313
316
  for p in $$list; do echo "$$p $$p"; done | \
314
317
  sed 's/$(EXEEXT)$$//' | \
315
318
  while read p p1; do if test -f $$p || test -f $$p1; \
@@ -326,23 +329,23 @@ install-binPROGRAMS: $(bin_PROGRAMS)
326
329
  while read type dir files; do \
327
330
  if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
328
331
  test -z "$$files" || { \
329
- echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
330
- $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
332
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \
333
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \
331
334
  } \
332
335
  ; done
333
336
 
334
- uninstall-binPROGRAMS:
337
+ uninstall-sbinPROGRAMS:
335
338
  @$(NORMAL_UNINSTALL)
336
- @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
339
+ @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \
337
340
  files=`for p in $$list; do echo "$$p"; done | \
338
341
  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
339
342
  -e 's/$$/$(EXEEXT)/' `; \
340
343
  test -n "$$list" || exit 0; \
341
- echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
342
- cd "$(DESTDIR)$(bindir)" && rm -f $$files
344
+ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \
345
+ cd "$(DESTDIR)$(sbindir)" && rm -f $$files
343
346
 
344
- clean-binPROGRAMS:
345
- @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
347
+ clean-sbinPROGRAMS:
348
+ @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \
346
349
  echo " rm -f" $$list; \
347
350
  rm -f $$list || exit $$?; \
348
351
  test -n "$(EXEEXT)" || exit 0; \
@@ -365,7 +368,6 @@ distclean-compile:
365
368
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nc_conf.Po@am__quote@
366
369
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nc_connection.Po@am__quote@
367
370
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nc_core.Po@am__quote@
368
- @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nc_event.Po@am__quote@
369
371
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nc_log.Po@am__quote@
370
372
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nc_mbuf.Po@am__quote@
371
373
  @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nc_message.Po@am__quote@
@@ -604,7 +606,7 @@ check: check-recursive
604
606
  all-am: Makefile $(PROGRAMS)
605
607
  installdirs: installdirs-recursive
606
608
  installdirs-am:
607
- for dir in "$(DESTDIR)$(bindir)"; do \
609
+ for dir in "$(DESTDIR)$(sbindir)"; do \
608
610
  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
609
611
  done
610
612
  install: install-recursive
@@ -640,7 +642,8 @@ maintainer-clean-generic:
640
642
  -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
641
643
  clean: clean-recursive
642
644
 
643
- clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am
645
+ clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \
646
+ mostlyclean-am
644
647
 
645
648
  distclean: distclean-recursive
646
649
  -rm -rf ./$(DEPDIR)
@@ -666,7 +669,7 @@ install-dvi: install-dvi-recursive
666
669
 
667
670
  install-dvi-am:
668
671
 
669
- install-exec-am: install-binPROGRAMS
672
+ install-exec-am: install-sbinPROGRAMS
670
673
 
671
674
  install-html: install-html-recursive
672
675
 
@@ -706,26 +709,26 @@ ps: ps-recursive
706
709
 
707
710
  ps-am:
708
711
 
709
- uninstall-am: uninstall-binPROGRAMS
712
+ uninstall-am: uninstall-sbinPROGRAMS
710
713
 
711
714
  .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
712
715
  install-am install-strip tags-recursive
713
716
 
714
717
  .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
715
- all all-am check check-am clean clean-binPROGRAMS \
716
- clean-generic clean-libtool ctags ctags-recursive distclean \
718
+ all all-am check check-am clean clean-generic clean-libtool \
719
+ clean-sbinPROGRAMS ctags ctags-recursive distclean \
717
720
  distclean-compile distclean-generic distclean-libtool \
718
721
  distclean-tags distdir dvi dvi-am html html-am info info-am \
719
- install install-am install-binPROGRAMS install-data \
720
- install-data-am install-dvi install-dvi-am install-exec \
721
- install-exec-am install-html install-html-am install-info \
722
- install-info-am install-man install-pdf install-pdf-am \
723
- install-ps install-ps-am install-strip installcheck \
722
+ install install-am install-data install-data-am install-dvi \
723
+ install-dvi-am install-exec install-exec-am install-html \
724
+ install-html-am install-info install-info-am install-man \
725
+ install-pdf install-pdf-am install-ps install-ps-am \
726
+ install-sbinPROGRAMS install-strip installcheck \
724
727
  installcheck-am installdirs installdirs-am maintainer-clean \
725
728
  maintainer-clean-generic mostlyclean mostlyclean-compile \
726
729
  mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
727
730
  tags tags-recursive uninstall uninstall-am \
728
- uninstall-binPROGRAMS
731
+ uninstall-sbinPROGRAMS
729
732
 
730
733
 
731
734
  # Tell versions [3.59,3.63) of GNU make to not export all variables.
@@ -0,0 +1,16 @@
1
+ MAINTAINERCLEANFILES = Makefile.in
2
+
3
+ AM_CPPFLAGS = -I $(top_srcdir)/src
4
+
5
+ AM_CFLAGS = -Wall -Wshadow
6
+ AM_CFLAGS += -Wno-unused-parameter -Wno-unused-value
7
+
8
+ noinst_LIBRARIES = libevent.a
9
+
10
+ noinst_HEADERS = nc_event.h
11
+
12
+ libevent_a_SOURCES = \
13
+ nc_epoll.c \
14
+ nc_kqueue.c \
15
+ nc_evport.c
16
+