/client
/tomc
/tests/find_lines/a.out
+/src/tomc
+*.o
+/src/tomd
+Makefile
+*.in
+/aclocal.m4
+/compile
+*.log
+/config.status
+/configure
+/depcomp
+/install-sh
+/missing
+.deps
+autom4te.cache
+++ /dev/null
-# TODO > Use GNU automake tools
-
-all:tomd tomc
-
-tomd:./src/tomd/main.c ./src/common/guile_helpers.c
- gcc -static -o tomd \
- -I/usr/local/include/guile/2.2 \
- ./src/tomd/main.c ./src/common/guile_helpers.c
-
-tomc:./src/tomc/main.c ./src/common/socketio.c
- gcc -o tomc ./src/tomc/main.c ./src/common/socketio.c -static
--- /dev/null
+SUBDIRS=src
+# dis_doc_DATA = README, CONTRIBUTING, COPYING
--- /dev/null
+AC_INIT([tomd], [0.0.1], [tbalzer2012@gmail.com])
+AM_INIT_AUTOMAKE([-Wall -Werror foreign])
+AC_PROG_CC
+dnl AC_CONFIG_HEADERS([])
+AC_CONFIG_FILES([
+ Makefile
+ src/Makefile
+])
+AC_OUTPUT
--- /dev/null
+bin_PROGRAMS=tomc tomd
+tomc_SOURCES=tomc.c guile_helpers.c socketio.c
+tomd_SOURCES=tomd.c guile_helpers.c socketio.c
+++ /dev/null
-/* Copyright (C) 2018 Thomas Balzer */
-
-/* This file is part of tomd. */
-
-/* tomd is free software: you can redistribute it and/or modify */
-/* it under the terms of the GNU General Public License as published by */
-/* the Free Software Foundation, either version 3 of the License, or */
-/* (at your option) any later version. */
-
-/* tomd is distributed in the hope that it will be useful, */
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-/* GNU General Public License for more details. */
-
-/* You should have received a copy of the GNU General Public License */
-/* along with tomd. If not, see <http://www.gnu.org/licenses/>. */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/un.h>
-#include <sys/socket.h>
-#include <unistd.h>
-
-static int sfd;
-
-static void init(void)
-{
- /* init socket connection */
- sfd =
- socket(PF_LOCAL,
- SOCK_STREAM,
- 0);
- if(sfd < 0){
- perror("socket");
- exit(EXIT_FAILURE);
- }
-
- struct sockaddr_un addr;
- addr.sun_family = AF_LOCAL;
- sprintf(addr.sun_path, "/run/user/1000/tomd/socket");
-
- if(connect(sfd, (struct sockaddr *) &addr, SUN_LEN(&addr)) != 0){
- perror("connect");
- exit(EXIT_FAILURE);
- }
-}
-
-#define HALLO "hallo there from dumb-client"
-
-void write_hallo(void)
-{
- printf("writing hallo\n");
- ssize_t wrote =
- write(sfd, HALLO, sizeof HALLO);
- printf("wrote %d bytes.\n", wrote);
-}
-
-int main(int argc, char **argv)
-{
- printf("dumb client startup.\n");
-
- init();
- write_hallo();
-
- return EXIT_SUCCESS;
-}
/* You should have received a copy of the GNU General Public License */
/* along with tomd. If not, see <http://www.gnu.org/licenses/>. */
-#include <libguile.h>
#include <pwd.h>
#include <fcntl.h>
#include <string.h>
+#include <stdio.h>
#include <sys/wait.h>
-#include "../../include/job.h"
-#include "../../include/macros.h"
+#include "../include/job.h"
+#include "../include/macros.h"
#ifdef GUILE_CAPABLE
-#include "../../include/scm_interface.h"
+#include <libguile.h>
+#include "../include/scm_interface.h"
#endif
#define MANIFEST_LOC "/.config/tomd/init/manifest.scm"
#include <sys/socket.h>
#include <unistd.h>
-#include "../../include/macros.h"
-#include "../../include/manifest.h"
+#include "../include/macros.h"
+#include "../include/manifest.h"
static int sfd;
#include <sys/socket.h>
#include <sys/wait.h>
-#include "../../include/macros.h"
-#include "../../include/manifest.h"
-#include "../../include/job.h"
+#include "../include/macros.h"
+#include "../include/manifest.h"
+#include "../include/job.h"
static void header(void)
{
+++ /dev/null
-/* Copyright (C) 2018 Thomas Balzer */
-
-/* This file is part of tomd. */
-
-/* tomd is free software: you can redistribute it and/or modify */
-/* it under the terms of the GNU General Public License as published by */
-/* the Free Software Foundation, either version 3 of the License, or */
-/* (at your option) any later version. */
-
-/* tomd is distributed in the hope that it will be useful, */
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-/* GNU General Public License for more details. */
-
-/* You should have received a copy of the GNU General Public License */
-/* along with tomd. If not, see <http://www.gnu.org/licenses/>. */
-
-#define DEFAULT_INIT_DIR "~/.config/tomd/init
-
-static void run_init(void)
-{
- /* load all recognized files in the init directory */
- /* check for a manifest (defines run order) */
- /* loop through the manifest */
-}
+++ /dev/null
-/* Copyright (C) 2018 Thomas Balzer */
-
-/* This file is part of tomd. */
-
-/* tomd is free software: you can redistribute it and/or modify */
-/* it under the terms of the GNU General Public License as published by */
-/* the Free Software Foundation, either version 3 of the License, or */
-/* (at your option) any later version. */
-
-/* tomd is distributed in the hope that it will be useful, */
-/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
-/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */
-/* GNU General Public License for more details. */
-
-/* You should have received a copy of the GNU General Public License */
-/* along with tomd. If not, see <http://www.gnu.org/licenses/>. */
-
-
-
-static void load_manifest(const char const *manifest_path)
-{
-
-}