### Workout Management Tool
-Tool for managing and keeping track of workouts.
-
-### To Do:
-- [ ] workouts rm [!name] [!date]
-- [ ] update date of recent workout from cli
- - [ ] rm then add
-- [ ] make attributes customizable
- - [ ] modify workout.js
-- [ ] add delete functionality
-- [ ] add attribute add functionality to gui
-- [ ] workouts rm attr [!name]
-- [ ] rename workouts functionality
-
-### Later
-- [ ] add --format option to ls commands
-- [ ] bash completion
\ No newline at end of file
+Tool for managing and keeping track of workouts.
\ No newline at end of file
AM_CONDITIONAL([ENABLE_GUI],[test x$enable_gui = xyes])
dnl disable memcheck if valgrind not found
-if test "x$enable_memcheck" != "xyes"; then
- if test -n "$HAVE_VALGRIND"; then
+if test "x$enable_memcheck" != "xno"; then
+ if test -z "$VALGRIND"; then
enable_memcheck=no
fi
fi
void passthru(int sock, char *p,int len) {
char buffer[4096];
char *argv[10] = {NULL};
- const char filename[] = "workouts";
+ char filename[] = "workouts";
char *home = getenv("HOME");
strcpy(buffer,"HOME=");
check_PROGRAMS = attr.tests recent.tests workout.tests
TESTS = $(check_PROGRAMS)
+if ENABLE_MEMCHECK
+LOG_COMPILER = $(VALGRIND)
+AM_LOG_FLAGS = --leak-check=full -v
+endif
+
common_SOURCES = test_utils.c
TEST_SRC_DIR = $(top_srcdir)/src
common_SOURCES += $(TEST_SRC_DIR)/data/setup.c
common_SOURCES += $(TEST_SRC_DIR)/opt/homedir.c $(TEST_SRC_DIR)/opt/rows.c $(TEST_SRC_DIR)/opt/verbose.c
-attr_tests_SOURCES = attr.tests.c $(TEST_SRC_DIR)/data/attr.c $(common_SOURCES)
-recent_tests_SOURCES = recent.tests.c $(TEST_SRC_DIR)/data/recent.c $(TEST_SRC_DIR)/data/workout.c $(TEST_SRC_DIR)/data/attr.c $(common_SOURCES)
-workout_tests_SOURCES = workout.tests.c $(TEST_SRC_DIR)/data/workout.c $(TEST_SRC_DIR)/data/attr.c $(TEST_SRC_DIR)/data/recent.c $(common_SOURCES)
+attr_tests_SOURCES = \
+ $(common_SOURCES) \
+ attr.tests.c \
+ $(TEST_SRC_DIR)/data/attr.c
-if ENABLE_MEMCHECK
-memcheck:
- -valgrind --leak-check=full ./attr.tests
- -valgrind --leak-check=full ./recent.tests
- -valgrind --leak-check=full ./workout.tests
-else
-memcheck:
- @echo "memcheck not enabled"
-endif
\ No newline at end of file
+recent_tests_SOURCES = \
+ $(common_SOURCES) \
+ recent.tests.c \
+ $(TEST_SRC_DIR)/data/recent.c \
+ $(TEST_SRC_DIR)/data/workout.c \
+ $(TEST_SRC_DIR)/data/attr.c
+
+workout_tests_SOURCES = \
+ $(common_SOURCES) \
+ workout.tests.c \
+ $(TEST_SRC_DIR)/data/workout.c \
+ $(TEST_SRC_DIR)/data/attr.c \
+ $(TEST_SRC_DIR)/data/recent.c
\ No newline at end of file