Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
915b8ef
Fixed dir listing utility function
TheTechmage Nov 1, 2015
255ec90
Switched from yaml config to libconfig
TheTechmage Nov 1, 2015
c8195ad
Switched to libconfig version checks
TheTechmage Nov 30, 2015
bba6c8e
Stopped programs from running all the time
TheTechmage Nov 30, 2015
a917807
Remove a couple of cruft files
TheTechmage Nov 30, 2015
f4aebf2
Added first pass of config parser
TheTechmage Nov 30, 2015
6c0fae8
Implemented rudimentary char escapes
TheTechmage Dec 1, 2015
3332db7
Parser driver now spits out token name
TheTechmage Dec 1, 2015
a0733e1
Added Official Parser
TheTechmage Dec 12, 2015
acc4dfd
Update .gitignore
TheTechmage Dec 17, 2015
044456b
Made progress on parser
TheTechmage Dec 17, 2015
5274f3f
Fix #4
TheTechmage Dec 17, 2015
003c058
Checkpoint
TheTechmage Dec 17, 2015
7d54fcf
First rough pass of step parser
TheTechmage Dec 17, 2015
485b98a
Added some comments
TheTechmage Dec 18, 2015
7d8ebf7
Uncommitted parser changes
TheTechmage May 5, 2016
ea81f69
Committing backup of work
TheTechmage Jul 28, 2016
f7834b6
Update/Fix config parser
TheTechmage Sep 12, 2017
8102ce4
Update .gitignore to ignore log files
TheTechmage Sep 12, 2017
3d66315
Add comment for status codes function
TheTechmage Sep 12, 2017
c3fd79c
Add a mental note
TheTechmage Sep 12, 2017
b6402f1
Fixed parser memory leaks
TheTechmage Sep 12, 2017
4499e7e
Added number conversion logic
TheTechmage Sep 13, 2017
eb1d565
Start config migration
TheTechmage Sep 13, 2017
2939655
Fix parser code so that it works
TheTechmage Dec 7, 2017
b452733
First pass at integrating custom config parser
TheTechmage Dec 28, 2017
077a317
Update readme file
TheTechmage Dec 28, 2017
74a2c41
Misc fixes for CentOS 7
TheTechmage Jan 9, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
a.out
bin
renzoku
src/parser/parser
src/config/renconf
*.a

# Generated files
*.in
Expand All @@ -22,9 +25,22 @@ src/librenzoku.a
test-driver
tests/test-suite.log
tests/test_runner*
tests/*.log
tests/*.trs
test_れんぞく

# Misc
*.swo
*.swp
LICENSE.new
coverage
ignoreme/

build-aux/
renzoku-0.1.0.tar.gz
renzoku-0.1.0/
src/parser/parser.swigcxx
src/parser/parser_wrap.cxx
src/parser/renconf.go
src/parser/renconf_gc.c
tests/PATH
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "tests/bash-tap"]
path = tests/bash-tap
url = https://github.com/rwhitworth/bash-tap.git
5 changes: 4 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
sh_TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
$(top_srcdir)/build-aux/tap-driver.sh

AUTOMAKE_OPTIONS = foreign
SUBDIRS = src doc examples man tests
SUBDIRS = src src/parser doc examples man tests
70 changes: 67 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

AC_PREREQ([2.69])
AC_INIT(renzoku, 0.1.0, renzoku@frostyfrog.net)
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE

# Checks for programs.
Expand All @@ -16,9 +17,69 @@ AC_LANG(C++)
# Checks for header files.
AC_CHECK_HEADERS([stdint.h stdlib.h sys/time.h unistd.h])
# http://lists.gnu.org/archive/html/autoconf/2003-11/msg00155.html
#AC_LANG_PUSH([C++])
AC_LANG_PUSH([C++])
AC_CHECK_HEADERS([yaml-cpp/yaml.h boost/shared_ptr.hpp])
#AC_LANG_POP([C++])

# debug? daemon mode?
AC_ARG_ENABLE(recursion,
[AS_HELP_STRING([--disable-recursion],
[Disable recursive directory searching])],
[feature_recursion=no], #replace with ac_define
[feature_recursion=yes])
AC_ARG_ENABLE(log-level,
[AS_HELP_STRING([--enable-log-level[=level]],
[Specify the logging level:\
debug: The most verbose level\
info: A bit less verbose\
warn: Warnings only\
error: Errors only])],
[ if test "x$enableval" = "xdebug" ; then
AC_DEFINE([LOGLEVEL], [debug],
[Logging set to debug level])
elif test "x$enableval" = "xinfo" ; then
AC_DEFINE([LOGLEVEL], [info],
[Logging set to info level])
elif test "x$enableval" = "xwarn" ; then
AC_DEFINE([LOGLEVEL], [warn],
[Logging set to warning level])
elif test "x$enableval" = "xerror" ; then
AC_DEFINE([LOGLEVEL], [error],
[Logging set to error level])
else
AC_MSG_FAILURE(
[Invalid log level]
)
fi
])

AC_ARG_WITH([yaml],
[AS_HELP_STRING([--without-yaml],
[Disable yaml config support])],
[],
[with_yaml=yes])
LIBYAMLCPP=
AS_IF([test "x$with_yaml" != xno],
[AC_CHECK_LIB([yaml-cpp], [main],
[AC_SUBST([LIBYAMLCPP], ["-lyaml-cpp"])
AC_DEFINE([HAVE_YAML], [1],
[Define if you have libyaml-cpp])
],
[AC_MSG_FAILURE(
[yaml-cpp test failed (--without-yaml to disable)]
)],
[]
)])
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug],
[build with additional debugging code]),
[case "${enableval}" in
yes) debug=true; AC_DEFINE([__DEBUG__]) ;;
no) debug=false ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-debug])
;; esac],
[debug=false])
AM_CONDITIONAL(DEBUG, test x"$debug" = x"true")
AC_LANG_POP([C++])

# Checks for typedefs, structures, and compiler characteristics.
AC_CHECK_HEADER_STDBOOL
Expand All @@ -37,7 +98,10 @@ AC_CHECK_FUNCS([getcwd gettimeofday memset select strerror])
# Static Library
AC_PROG_RANLIB

AC_REQUIRE_AUX_FILE([tap-driver.sh])
AC_PROG_AWK

#AC_CONFIG_FILES([Makefile])
AC_OUTPUT(Makefile src/Makefile doc/Makefile examples/Makefile man/Makefile
tests/Makefile)
tests/Makefile src/parser/Makefile)
AC_OUTPUT
3 changes: 1 addition & 2 deletions doc/README
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@ supposed to do. The goal of this program is as follows:

Yes, there are some programs out there that do similar things (like Grunt), but
they aren't able to fill my need completely or easily. I just want something
that I can install and use with a few simple tweaks to a config file (like
Travis' yaml configs).
that I can install and use with a few simple tweaks to a config file.
30 changes: 16 additions & 14 deletions renzoku.conf
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
watch:
Filter: ['*.cpp', '*.hpp', '*.c', '*.h', 'include/*.hxx']
Include: Makefile
Exclude: src/Config.cpp
compile:
Command: make
Enabled: yes
Test:
command: make test
IgnoreStatus: [2,3,4]
Enabled: yes
program:
command: /usr/bin/echo Hello World
Enabled: yes
Watch "れんぞく C++ Code Base" {
files = "*.cpp", "*.hpp"
exclude = "main.*", "test_driver.*"
dir = "src"
step Compile {
command = "make"
enabled = true
}
step "Build & Run Tests" {
command = "make check"
enabled = yes
}
step Run {
command = "echo 'It built!'"
}
}
22 changes: 22 additions & 0 deletions renzoku_old.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
watch = {
Filter = ["*.cpp", "*.hpp", "*.c", "*.h", "include/*.hxx", "*.conf",
"test_*.sh"]
Include = "Makefile"
Exclude = "src/Config.cpp"
}
compile = {
Command = "make"
Enabled = true
}
Test = {
command = "make check"
IgnoreStatus = [2,3,4]
Enabled = false
}
program = {
command = "make check"
#command = "./test_れんぞく.sh"
# command: /usr/bin/echo Hello World
Enabled = true
}

15 changes: 6 additions & 9 deletions src/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#CFLAGS = --pedantic -Wall -std=c99 -O2
#CXXFLAGS = -Wall -g -Isrc/ -static -lyaml-cpp -std=c++11
AM_CXXFLAGS = --pedantic -Wall -O2 -g -std=c++11
AM_LDFLAGS = -Bstatic -lyaml-cpp -Bdynamic
AM_CXXFLAGS = --pedantic -Wall -O2 -g -std=c++11 -Iparser/ -pthread
AM_LDFLAGS = -Bstatic -Bdynamic
SUBDIRS = parser

# this lists the binaries to produce, the (non-PHONY, binary) targets in
# the previous manual Makefile
Expand All @@ -15,31 +16,27 @@ librenzoku_adir = $(pkglibdir)/@PACKAGE@
# util.hpp \
# watcher.hpp
librenzoku_a_SOURCES = \
config.cpp \
config.hpp \
config_sections.hpp \
exceptions.cpp \
exceptions.hpp \
i_configfile.hpp \
log.cpp \
log.hpp \
process.cpp \
process.hpp \
procman.cpp \
procman.hpp \
threadmgr.cpp \
threadmgr.hpp \
signals.cpp \
signals.hpp \
util.cpp \
util.hpp \
watcher.cpp \
watcher.hpp
# tokenizer.cpp
# tokenizer.hpp


bin_PROGRAMS = renzoku
renzokudir = $(pkglibdir)/@PACKAGE@
renzoku_LDADD = librenzoku.a
renzoku_LDADD = librenzoku.a parser/libparser.a
renzoku_SOURCES = \
main.hpp \
main.cpp
Loading