Permalink
Browse files

go on

  • Loading branch information...
1 parent 20f61b9 commit 86ac5e96a8ec3fe503639290872065019f762090 @HardySimpson committed Jul 24, 2012
View
9 TODO
@@ -1,5 +1,4 @@
[p] 使用valgrind测试性能
-[ ] 和rsyslog对接的问题
[ ] hzlog的可定制
[ ] 分类匹配的可定制化, rcat
[ ] 兼容性问题 zlog.h内,__VA_ARGS__的跨平台
@@ -11,11 +10,13 @@
[ ] gettid()
[ ] 性能对比, log4x, pantheios, glog
[ ] perl, python, go, c++支持
-[ ] 去除auto tools的使用,自行makefile[redis]
-[ ] redis内置绑定
+[ ] redis对接,协议设计
+[ ] 和rsyslog对接的问题
--- 1.1.4 ---
-[ ] 增加版本内置(redis)
+[ ] record忽略第二参数
+[ ] 增加git/版本在代码中的标志(redis)
+[o] 去除auto tools的使用,自行makefile[redis]
[o] 宏都小写化
[o] const
[x] zlog_set("section", "command");
View
@@ -1,77 +0,0 @@
-AC_PREREQ(2.59)
-AC_INIT([zlog], [1.1.3], [HardySimpson1984@gmail.com])
-AM_INIT_AUTOMAKE([foreign -Wall -Werror])
-AC_CONFIG_SRCDIR([libzlog/zlog.h])
-AC_CONFIG_HEADER([config.h])
-AC_GNU_SOURCE
-
-# Checks for programs.
-AC_PROG_CPP
-AC_PROG_CC
-AC_PROG_AWK
-AC_PROG_INSTALL
-AC_PROG_LIBTOOL
-AC_PROG_LN_S
-AC_PROG_MAKE_SET
-
-# Checks for libraries.
-
-AC_CHECK_LIB([pthread], [pthread_rwlock_wrlock], [PTREADLIB=-lpthread])
-if test "x$PTREADLIB" != "x-lpthread"; then
- AC_MSG_ERROR([You need libpthread in order to compile libzlog])
-fi
-
-# Checks for header files.
-AC_HEADER_STDC
-AC_CHECK_HEADERS([fcntl.h limits.h stdint.h stdlib.h string.h strings.h sys/time.h syslog.h unistd.h])
-
-# Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_TYPE_PID_T
-AC_TYPE_SIZE_T
-AC_HEADER_TIME
-AC_STRUCT_TM
-
-# Checks for library functions.
-AC_FUNC_FORK
-AC_FUNC_LSTAT
-AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
-AC_FUNC_MALLOC
-AC_FUNC_REALLOC
-AC_FUNC_STAT
-AC_FUNC_STRFTIME
-AC_FUNC_VPRINTF
-AC_CHECK_FUNCS([gethostname gettimeofday localtime_r memmove memset setenv strchr strrchr strstr strtol])
-
-if test "x$GCC" = "xyes"; then
- CFLAGS="$CFLAGS -D_GNU_SOURCE -pthread"
-fi
-
-AC_ARG_ENABLE(test,
- [AC_HELP_STRING([--enable-test], [Compile tests])],
- enable_test=yes)
-
-AM_CONDITIONAL(ENABLE_TEST, test x$enable_test = xyes)
-
-AC_ARG_ENABLE(doc,
- [AC_HELP_STRING([--enable-doc], [Create pdf from lyx])],
- enable_doc=yes)
-
-# Checks for lyx
-AC_PATH_PROG(LYX, lyx, )
-if test x$LYX = x; then
- enable_doc=no
-fi
-
-AM_CONDITIONAL(ENABLE_DOC, test x$enable_doc = xyes)
-
-AC_CONFIG_FILES([
-zlog.pc
-Makefile
-libzlog/Makefile
-tools/Makefile
-test/Makefile
-doc/Makefile
-])
-
-AC_OUTPUT
View
@@ -1,5 +0,0 @@
-#! /bin/sh
-
-# from configure,Makefile.am->Makefile, developer use
-
-CFLAGS="-Wall -Werror -g -O2 -std=c99" ./configure --prefix=/opt/develop/ --enable-test --enable-doc
View
@@ -1,33 +0,0 @@
-docdir = $(datadir)/doc/$(PACKAGE)
-man3dir = $(mandir)/man3
-
-doc_DATA = \
- UsersGuide-EN.pdf \
- UsersGuide-CN.pdf \
- UsersGuide-EN.tex \
- UsersGuide-CN.tex \
- UsersGuide-EN.html \
- UsersGuide-CN.html \
- GettingStart-EN.txt \
- GettingStart-CN.txt
-
-EXTRA_DIST = $(doc_DATA) \
- UsersGuide-EN.lyx \
- UsersGuide-CN.lyx
-
-
-UsersGuide-EN.pdf : UsersGuide-EN.lyx
- lyx -f -e pdf2 $^
-
-UsersGuide-CN.pdf : UsersGuide-CN.lyx
- lyx -f -e pdf4 $^
-
-.lyx.tex :
- lyx -f -e pdflatex $<
-
-.tex.html :
- hevea book.hva -s $<
- hevea book.hva -s $<
-
-clean-local :
- -rm -f *.pdf *.haux *.html *.htoc *.tex
View
@@ -0,0 +1,27 @@
+doc = \
+ UsersGuide-EN.pdf \
+ UsersGuide-CN.pdf \
+ UsersGuide-EN.tex \
+ UsersGuide-CN.tex \
+ UsersGuide-EN.html \
+ UsersGuide-CN.html \
+ GettingStart-EN.txt \
+ GettingStart-CN.txt
+
+all : $(doc)
+
+UsersGuide-EN.pdf : UsersGuide-EN.lyx
+ lyx -f -e pdf2 $^
+
+UsersGuide-CN.pdf : UsersGuide-CN.lyx
+ lyx -f -e pdf4 $^
+
+%.tex : %.lyx
+ lyx -f -e pdflatex $<
+
+%.html : %.tex
+ hevea book.hva -s $<
+ hevea book.hva -s $<
+
+clean :
+ -rm -f *.pdf *.haux *.html *.htoc *.tex
View
@@ -1,24 +1,29 @@
# Top level makefile, the real shit is at src/makefile
-TARGETS=all test doc 32bit
+TARGETS=noopt 32bit
all:
cd src && $(MAKE) $@
-install: dummy
+install:
cd src && $(MAKE) $@
+$(TARGETS):
+ cd src && $(MAKE) $@
+
+doc:
+ cd doc && $(MAKE)
+
+test:
+ cd test && $(MAKE)
+
clean:
cd src && $(MAKE) $@
cd test && $(MAKE) $@
cd doc && $(MAKE) $@
distclean: clean
-$(TARGETS):
- cd src && $(MAKE) $@
-
-src/help.h:
- @./utils/generate-command-help.rb > $@
-
dummy:
+
+.PHONY: doc install test
View
@@ -1,51 +0,0 @@
-lib_LTLIBRARIES = libzlog.la
-
-libzlog_la_SOURCES = \
- zc_profile.c \
- zc_profile.h \
- zc_arraylist.c \
- zc_arraylist.h \
- zc_hashtable.c \
- zc_hashtable.h \
- zc_util.c \
- zc_util.h \
- zc_xplatform.c \
- zc_xplatform.h \
- zc_defs.h \
- rotater.c \
- rotater.h \
- level.c \
- level.h \
- level_list.c \
- level_list.h \
- spec.c \
- spec.h \
- format.c \
- format.h \
- rule.c \
- rule.h \
- conf.c \
- conf.h \
- buf.c \
- buf.h \
- event.c \
- event.h \
- mdc.c \
- mdc.h \
- thread.c \
- thread.h \
- thread_list.c \
- thread_list.h \
- record.c \
- record.h \
- record_table.c \
- record_table.h \
- category.c \
- category.h \
- category_table.c \
- category_table.h \
- zlog.c
-
-libzlog_la_LIBADD = $(PTREADLIB)
-libzlog_la_LDFLAGS = -version-info 1:0:0
-include_HEADERS = zlog.h
View
@@ -34,14 +34,14 @@ ZLOG_MINOR=1
CC:=$(shell sh -c 'type $(CC) >/dev/null 2>/dev/null && echo $(CC) || echo gcc')
OPTIMIZATION?=-O2
WARNINGS=-Wall -Werror -Wstrict-prototypes
-DEBUG?= -g -ggdb # will this slow down the run speed ?
+DEBUG?= -g -ggdb
REAL_CFLAGS=$(OPTIMIZATION) -fPIC $(CFLAGS) $(WARNINGS) $(DEBUG)
REAL_LDFLAGS=$(LDFLAGS) -lpthread
DYLIBSUFFIX=so
STLIBSUFFIX=a
-DYLIB_MINOR_NAME=$(LIBNAME).$(DYLIBSUFFIX).$(HIREDIS_MAJOR).$(HIREDIS_MINOR)
-DYLIB_MAJOR_NAME=$(LIBNAME).$(DYLIBSUFFIX).$(HIREDIS_MAJOR)
+DYLIB_MINOR_NAME=$(LIBNAME).$(DYLIBSUFFIX).$(ZLOG_MAJOR).$(ZLOG_MINOR)
+DYLIB_MAJOR_NAME=$(LIBNAME).$(DYLIBSUFFIX).$(ZLOG_MAJOR)
DYLIBNAME=$(LIBNAME).$(DYLIBSUFFIX)
DYLIB_MAKE_CMD=$(CC) -shared -Wl,-soname,$(DYLIB_MINOR_NAME) -o $(DYLIBNAME) $(LDFLAGS)
STLIBNAME=$(LIBNAME).$(STLIBSUFFIX)
@@ -179,4 +179,4 @@ coverage: gcov
noopt:
$(MAKE) OPTIMIZATION=""
-.PHONY: all test check clean dep install 32bit gprof gcov noopt
+.PHONY: all clean dep install 32bit gprof gcov noopt
View
@@ -1,25 +0,0 @@
-# use autotools and xlc on aix never success, so use this for test
-
-
-all_o = zlog.o event.o conf.o format.o rule.o level.o buf.o \
- sd_rotate.o sd_error.o sd_list.o sd_xplatform.o sd_util.o
-
-all : libzlog.so
-
-libzlog.so : $(all_o)
- xlc -G -o $@ $(all_o) -lpthread
-
-zlog-chk-conf : zlog-chk-conf.o
- xlc -brtl -o $@ zlog_chkconfig.o -L. -lzlog
-
-.c.o :
- xlc -c -o $@ -c $< -I.
-
-clean :
- -rm -f libzlog.so zlog-chk-conf zlog-chk-conf.o $(all_o)
-
-install :
- cp -f libzlog.so $(HOME)/lib
- cp -f zlog_chkconfig $(HOME)/bin
- cp -f zlog.h $(HOME)/include
- cp -f shbin/* $(HOME)/shbin
View
@@ -1,30 +0,0 @@
-all_o = \
- buf.o \
- category.o \
- conf.o \
- event.o \
- format.o \
- mdc.o \
- level.o \
- rotater.o \
- rule.o \
- spec.o \
- thread.o \
- zlog.o \
- zc_arraylist.o \
- zc_profile.o \
- zc_hashtable.o \
- zc_util.o \
- zc_xplatform.o
-
-all : libzlog.so
-
-libzlog.so : $(all_o)
- gcc -shared -o $@ $(all_o) -lpthread
-
-.c.o :
- gcc -g -Wall -Werror -D_GNU_SOURCE -fPIC -o $@ -c $< -I.
-#-Werror
-
-clean :
- -rm -f libzlog.so $(all_o)
View
@@ -1,38 +0,0 @@
-all_o = \
- buf.o \
- category.o \
- category_table.o \
- conf.o \
- event.o \
- format.o \
- level.o \
- level_list.o \
- mdc.o \
- rotater.o \
- rule.o \
- spec.o \
- thread.o \
- thread_table.o \
- zc_arraylist.o \
- zc_hashtable.o \
- zc_profile.o \
- zc_util.o \
- zc_xplatform.o \
- zlog.o \
-
-all : libzlog.a
-
-libzlog.a : $(all_o)
- ar -rv $@ $(all_o)
-
-.c.o :
- gcc -pg -Wall -D_GNU_SOURCE -o $@ -c $< -I.
-
-clean :
- -rm -f libzlog.a $(all_o) zlog_chk_conf zlog_chk_conf.o
-
-install :
- cp -f libzlog.so $(HOME)/lib
- cp -f zlog_chk_conf $(HOME)/bin
- cp -f zlog.h $(HOME)/include
- cp -f shbin/* $(HOME)/shbin
Oops, something went wrong.

0 comments on commit 86ac5e9

Please sign in to comment.