Relocate source files to an src/ subdirectory

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2017-01-16 01:31:02 +01:00
1 parent 044ded3045
commit fff68b7b06
61 files changed
+155 -154

No files matched your search

+3 -97
View File
@@ -1,105 +1,11 @@
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
sbin_PROGRAMS = finit initctl reboot SUBDIRS = plugins src
finit_SOURCES = api.c \
cond.c cond-w.c cond.h \
client.c \
conf.c conf.h \
exec.c finit.c finit.h \
getty.c \
helpers.c helpers.h \
mdadm.c mount.c pid.c \
plugin.c plugin.h private.h \
service.c service.h \
sig.c sig.h \
sm.c sm.h \
svc.c svc.h \
tty.c tty.h \
util.c util.h \
utmp-api.c utmp-api.h
pkginclude_HEADERS = cond.h finit.h helpers.h inetd.h plugin.h svc.h
if INETD
finit_SOURCES += inetd.c inetd.h
endif
if WATCHDOGD
finit_SOURCES += watchdog.c watchdog.h
endif
finit_CFLAGS = -W -Wall -Wextra -std=gnu99 $(lite_CFLAGS) $(uev_CFLAGS)
finit_LDADD = $(lite_LIBS) $(uev_LIBS)
if STATIC
finit_LDADD += plugins/libplug.la
else
finit_LDADD += -ldl
endif
initctl_SOURCES = initctl.c svc.c svc.h helpers.c helpers.h cond.c cond.h \
util.c util.h utmp-api.c utmp-api.h
initctl_CFLAGS = $(lite_CFLAGS)
initctl_LDADD = $(lite_LIBS)
reboot_SOURCES = reboot.c util.c util.h
INIT_LNKS = telinit init
REBOOT_LNKS = shutdown halt poweroff suspend
SUBDIRS = plugins
doc_DATA = README.md LICENSE finit.conf doc_DATA = README.md LICENSE finit.conf
EXTRA_DIST = README.md LICENSE ChangeLog.md finit.conf EXTRA_DIST = README.md LICENSE ChangeLog.md finit.conf
AM_CPPFLAGS = -U_FORTIFY_SOURCE
AM_CPPFLAGS += -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_GNU_SOURCE -D_DEFAULT_SOURCE
if STATIC
AM_CPPFLAGS += -DENABLE_STATIC
AM_LDFLAGS = -static-libtool-libs
else
AM_CPPFLAGS += -DPLUGIN_PATH=\"$(pkglibdir)\"
AM_LDFLAGS = -export-dynamic
endif
# Compat hook # Compat hook
install-dev: install-pkgincludeHEADERS install-dev:
@make -C src install-pkgincludeHEADERS
# Hook in install to add finit and reboot symlink(s)
install-exec-hook:
@for file in $(INIT_LNKS); do \
lnk=$(DESTDIR)$(sbindir)/$$file; \
if [ -e $$lnk ]; then \
echo "Skipping $$lnk exists already."; \
else \
$(LN_S) finit $$lnk; \
fi; \
done
@if [ -L $(DESTDIR)$(sbindir)/reboot ]; then \
echo "Non-finit reboot, skipping install."; \
else \
for file in $(REBOOT_LNKS); do \
link=$(DESTDIR)$(sbindir)/$$file; \
if [ -e $$link ]; then \
echo "$$link exists, skipping.";\
else \
$(LN_S) reboot $$link; \
fi; \
done; \
fi
uninstall-hook:
@for file in $(INIT_LNKS); do \
lnk=`readlink $(DESTDIR)$(sbindir)/$$file`; \
if [ "$$lnk" != "finit" ]; then \
echo "Skipping non-finit $$file."; \
continue; \
fi; \
$(RM) $(DESTDIR)$(sbindir)/$$file; \
done
@if [ -L $(DESTDIR)$(sbindir)/reboot ]; then \
echo "Non-finit reboot, skipping uninstall."; \
else \
for file in $(REBOOT_LNKS); do \
if [ "`readlink $$file`" != "reboot" ]; \
then continue; \
fi; \
$(RM) $(DESTDIR)$(sbindir)/$$file; \
done; \
fi
# Target to run when building a release # Target to run when building a release
release: dist release: dist
+2 -2
View File
@@ -2,9 +2,9 @@ AC_INIT(Finit, 3.0-rc2, https://github.com/troglobit/finit/issues, finit, http:/
AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz subdir-objects]) AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz subdir-objects])
AM_SILENT_RULES([yes]) AM_SILENT_RULES([yes])
AC_CONFIG_SRCDIR([finit.c]) AC_CONFIG_SRCDIR([src/finit.c])
AC_CONFIG_HEADER([config.h]) AC_CONFIG_HEADER([config.h])
AC_CONFIG_FILES([Makefile plugins/Makefile]) AC_CONFIG_FILES([Makefile plugins/Makefile src/Makefile])
# Older versions of autoconf (<2.58) do not have AC_CONFIG_MACRO_DIR() # Older versions of autoconf (<2.58) do not have AC_CONFIG_MACRO_DIR()
#m4_include([m4/plugin.m4]) #m4_include([m4/plugin.m4])
+1 -1
View File
@@ -1,6 +1,6 @@
AM_LDFLAGS = -module -avoid-version -shared AM_LDFLAGS = -module -avoid-version -shared
AM_CFLAGS = -W -Wall -Wextra -std=gnu99 AM_CFLAGS = -W -Wall -Wextra -std=gnu99
AM_CPPFLAGS = -U_FORTIFY_SOURCE AM_CPPFLAGS = -I../src -U_FORTIFY_SOURCE
AM_CPPFLAGS += -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_GNU_SOURCE -D_DEFAULT_SOURCE AM_CPPFLAGS += -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_GNU_SOURCE -D_DEFAULT_SOURCE
AM_CPPFLAGS += $(lite_CFLAGS) AM_CPPFLAGS += $(lite_CFLAGS)
+3 -3
View File
@@ -22,9 +22,9 @@
*/ */
#include <lite/lite.h> #include <lite/lite.h>
#include "../finit.h" #include "finit.h"
#include "../helpers.h" #include "helpers.h"
#include "../plugin.h" #include "plugin.h"
#define ALSACTL "/usr/sbin/alsactl" #define ALSACTL "/usr/sbin/alsactl"
+5 -5
View File
@@ -26,11 +26,11 @@
#include <string.h> #include <string.h>
#include <lite/lite.h> #include <lite/lite.h>
#include "../config.h" #include "config.h"
#include "../finit.h" #include "finit.h"
#include "../helpers.h" #include "helpers.h"
#include "../plugin.h" #include "plugin.h"
#include "../utmp-api.h" #include "utmp-api.h"
static int is_tmpfs(char *path) static int is_tmpfs(char *path)
{ {
+1 -1
View File
@@ -25,7 +25,7 @@
#include <unistd.h> /* STDIN_FILENO */ #include <unistd.h> /* STDIN_FILENO */
#include <sys/socket.h> #include <sys/socket.h>
#include "../plugin.h" #include "plugin.h"
#define NAME "chargen" #define NAME "chargen"
#define PATTERN "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ " #define PATTERN "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ "
+1 -1
View File
@@ -26,7 +26,7 @@
#include <unistd.h> /* STDIN_FILENO */ #include <unistd.h> /* STDIN_FILENO */
#include <sys/socket.h> #include <sys/socket.h>
#include "../plugin.h" #include "plugin.h"
#define NAME "daytime" #define NAME "daytime"
+4 -4
View File
@@ -24,10 +24,10 @@
#include <sys/types.h> #include <sys/types.h>
#include <lite/lite.h> #include <lite/lite.h>
#include "../finit.h" #include "finit.h"
#include "../config.h" #include "config.h"
#include "../helpers.h" #include "helpers.h"
#include "../plugin.h" #include "plugin.h"
static void setup(void *UNUSED(arg)) static void setup(void *UNUSED(arg))
{ {
+1 -1
View File
@@ -25,7 +25,7 @@
#include <unistd.h> /* STDIN_FILENO */ #include <unistd.h> /* STDIN_FILENO */
#include <sys/socket.h> #include <sys/socket.h>
#include "../plugin.h" #include "plugin.h"
static int cb(int UNUSED(type)) static int cb(int UNUSED(type))
{ {
+1 -1
View File
@@ -25,7 +25,7 @@
#include <unistd.h> /* STDIN_FILENO */ #include <unistd.h> /* STDIN_FILENO */
#include <sys/socket.h> #include <sys/socket.h>
#include "../plugin.h" #include "plugin.h"
#define NAME "echo" #define NAME "echo"
+3 -3
View File
@@ -23,9 +23,9 @@
#include <lite/lite.h> #include <lite/lite.h>
#include "../finit.h" #include "finit.h"
#include "../helpers.h" #include "helpers.h"
#include "../plugin.h" #include "plugin.h"
static void save(void *UNUSED(arg)) static void save(void *UNUSED(arg))
{ {
+7 -7
View File
@@ -22,7 +22,7 @@
* THE SOFTWARE. * THE SOFTWARE.
*/ */
#include "../config.h" /* Generated by configure script */ #include "config.h" /* Generated by configure script */
#include <errno.h> #include <errno.h>
#include <fcntl.h> /* O_RDONLY et al */ #include <fcntl.h> /* O_RDONLY et al */
@@ -32,12 +32,12 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <lite/lite.h> #include <lite/lite.h>
#include "../finit.h" #include "finit.h"
#include "../conf.h" #include "conf.h"
#include "../helpers.h" #include "helpers.h"
#include "../plugin.h" #include "plugin.h"
#include "../sig.h" #include "sig.h"
#include "../service.h" #include "service.h"
static void parse(void *arg, int fd, int events); static void parse(void *arg, int fd, int events);
static void setup(void *arg); static void setup(void *arg);
+3 -3
View File
@@ -21,9 +21,9 @@
* THE SOFTWARE. * THE SOFTWARE.
*/ */
#include "../finit.h" #include "finit.h"
#include "../svc.h" #include "svc.h"
#include "../plugin.h" #include "plugin.h"
static void lost_pid(void *arg) static void lost_pid(void *arg)
{ {
+4 -4
View File
@@ -25,10 +25,10 @@
#include <linux/rtnetlink.h> #include <linux/rtnetlink.h>
#include <unistd.h> #include <unistd.h>
#include "../finit.h" #include "finit.h"
#include "../cond.h" #include "cond.h"
#include "../helpers.h" #include "helpers.h"
#include "../plugin.h" #include "plugin.h"
static int nlmsg_validate(struct nlmsghdr *nh, size_t len) static int nlmsg_validate(struct nlmsghdr *nh, size_t len)
{ {
+5 -5
View File
@@ -26,11 +26,11 @@
#include <sys/inotify.h> #include <sys/inotify.h>
#include "../finit.h" #include "finit.h"
#include "../cond.h" #include "cond.h"
#include "../helpers.h" #include "helpers.h"
#include "../plugin.h" #include "plugin.h"
#include "../service.h" #include "service.h"
struct context { struct context {
int fd; int fd;
+1 -1
View File
@@ -23,7 +23,7 @@
#include <glob.h> #include <glob.h>
#include <lite/lite.h> #include <lite/lite.h>
#include "../plugin.h" #include "plugin.h"
static void setup(void *UNUSED(arg)) static void setup(void *UNUSED(arg))
{ {
+3 -3
View File
@@ -23,9 +23,9 @@
#include <lite/lite.h> #include <lite/lite.h>
#include "../finit.h" #include "finit.h"
#include "../helpers.h" #include "helpers.h"
#include "../plugin.h" #include "plugin.h"
/* /*
* No need to clean up files in /etc/resolvconf/run/interface/ * No need to clean up files in /etc/resolvconf/run/interface/
+1 -1
View File
@@ -26,7 +26,7 @@
#include <unistd.h> /* STDIN_FILENO */ #include <unistd.h> /* STDIN_FILENO */
#include <sys/socket.h> #include <sys/socket.h>
#include "../plugin.h" #include "plugin.h"
#define NAME "time" #define NAME "time"
+4 -4
View File
@@ -29,10 +29,10 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <lite/lite.h> #include <lite/lite.h>
#include "../finit.h" #include "finit.h"
#include "../helpers.h" #include "helpers.h"
#include "../plugin.h" #include "plugin.h"
#include "../tty.h" #include "tty.h"
static void watcher(void *arg, int fd, int events); static void watcher(void *arg, int fd, int events);
+4 -4
View File
@@ -27,10 +27,10 @@
#include <sys/types.h> #include <sys/types.h>
#include <lite/lite.h> #include <lite/lite.h>
#include "../config.h" #include "config.h"
#include "../finit.h" #include "finit.h"
#include "../helpers.h" #include "helpers.h"
#include "../plugin.h" #include "plugin.h"
static void setup(void *UNUSED(arg)) static void setup(void *UNUSED(arg))
{ {
+3 -3
View File
@@ -26,9 +26,9 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <lite/lite.h> #include <lite/lite.h>
#include "../finit.h" #include "finit.h"
#include "../helpers.h" #include "helpers.h"
#include "../plugin.h" #include "plugin.h"
static void setup(void *UNUSED(arg)) static void setup(void *UNUSED(arg))
{ {
+95
View File
@@ -0,0 +1,95 @@
AM_CPPFLAGS = -U_FORTIFY_SOURCE
AM_CPPFLAGS += -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_GNU_SOURCE -D_DEFAULT_SOURCE
if STATIC
AM_CPPFLAGS += -DENABLE_STATIC
AM_LDFLAGS = -static-libtool-libs
else
AM_CPPFLAGS += -DPLUGIN_PATH=\"$(pkglibdir)\"
AM_LDFLAGS = -export-dynamic
endif
sbin_PROGRAMS = finit initctl reboot
finit_SOURCES = api.c \
cond.c cond-w.c cond.h \
client.c \
conf.c conf.h \
exec.c finit.c finit.h \
getty.c \
helpers.c helpers.h \
mdadm.c mount.c pid.c \
plugin.c plugin.h private.h \
service.c service.h \
sig.c sig.h \
sm.c sm.h \
svc.c svc.h \
tty.c tty.h \
util.c util.h \
utmp-api.c utmp-api.h
pkginclude_HEADERS = cond.h finit.h helpers.h inetd.h plugin.h svc.h
if INETD
finit_SOURCES += inetd.c inetd.h
endif
if WATCHDOGD
finit_SOURCES += watchdog.c watchdog.h
endif
finit_CFLAGS = -W -Wall -Wextra -std=gnu99 $(lite_CFLAGS) $(uev_CFLAGS)
finit_LDADD = $(lite_LIBS) $(uev_LIBS)
if STATIC
finit_LDADD += plugins/libplug.la
else
finit_LDADD += -ldl
endif
initctl_SOURCES = initctl.c svc.c svc.h helpers.c helpers.h cond.c cond.h \
util.c util.h utmp-api.c utmp-api.h
initctl_CFLAGS = $(lite_CFLAGS)
initctl_LDADD = $(lite_LIBS)
reboot_SOURCES = reboot.c util.c util.h
INIT_LNKS = telinit init
REBOOT_LNKS = shutdown halt poweroff suspend
# Hook in install to add finit and reboot symlink(s)
install-exec-hook:
@for file in $(INIT_LNKS); do \
lnk=$(DESTDIR)$(sbindir)/$$file; \
if [ -e $$lnk ]; then \
echo "Skipping $$lnk exists already."; \
else \
$(LN_S) finit $$lnk; \
fi; \
done
@if [ -L $(DESTDIR)$(sbindir)/reboot ]; then \
echo "Non-finit reboot, skipping install."; \
else \
for file in $(REBOOT_LNKS); do \
link=$(DESTDIR)$(sbindir)/$$file; \
if [ -e $$link ]; then \
echo "$$link exists, skipping.";\
else \
$(LN_S) reboot $$link; \
fi; \
done; \
fi
uninstall-hook:
@for file in $(INIT_LNKS); do \
lnk=`readlink $(DESTDIR)$(sbindir)/$$file`; \
if [ "$$lnk" != "finit" ]; then \
echo "Skipping non-finit $$file."; \
continue; \
fi; \
$(RM) $(DESTDIR)$(sbindir)/$$file; \
done
@if [ -L $(DESTDIR)$(sbindir)/reboot ]; then \
echo "Non-finit reboot, skipping uninstall."; \
else \
for file in $(REBOOT_LNKS); do \
if [ "`readlink $$file`" != "reboot" ]; \
then continue; \
fi; \
$(RM) $(DESTDIR)$(sbindir)/$$file; \
done; \
fi
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.
View File
File renamed without changes.