From 6cf0a254cd9e4892a941bb5ad6f8d9ed317b1617 Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Thu, 12 Apr 2018 05:30:12 +0200 Subject: [PATCH] Build system and directory structure cleanup Signed-off-by: David Oberhollenzer --- Makefile.am | 2 +- cmd/Makemodule.am | 15 ++++++++++++++- {servicecmd => cmd/service}/disable.c | 0 {servicecmd => cmd/service}/dumpscript.c | 0 {servicecmd => cmd/service}/enable.c | 0 {servicecmd => cmd/service}/help.c | 0 {servicecmd => cmd/service}/list.c | 0 {servicecmd => cmd/service}/servicecmd.c | 0 {servicecmd => cmd/service}/servicecmd.h | 0 scripts/Makemodule.am | 5 ++--- servicecmd/Makemodule.am | 13 ------------- 11 files changed, 17 insertions(+), 18 deletions(-) rename {servicecmd => cmd/service}/disable.c (100%) rename {servicecmd => cmd/service}/dumpscript.c (100%) rename {servicecmd => cmd/service}/enable.c (100%) rename {servicecmd => cmd/service}/help.c (100%) rename {servicecmd => cmd/service}/list.c (100%) rename {servicecmd => cmd/service}/servicecmd.c (100%) rename {servicecmd => cmd/service}/servicecmd.h (100%) delete mode 100644 servicecmd/Makemodule.am diff --git a/Makefile.am b/Makefile.am index 2323042..5f3823a 100644 --- a/Makefile.am +++ b/Makefile.am @@ -9,13 +9,13 @@ EXTRA_DIST = README LICENSE helperdir = @SCRIPTDIR@ helper_PROGRAMS = +helper_SCRIPTS = include lib/Makemodule.am include cmd/Makemodule.am include initd/Makemodule.am include scripts/Makemodule.am include services/Makemodule.am -include servicecmd/Makemodule.am install-data-local: $(MKDIR_P) $(DESTDIR)$(SVCDIR) diff --git a/cmd/Makemodule.am b/cmd/Makemodule.am index 40c0933..f0ae3f9 100644 --- a/cmd/Makemodule.am +++ b/cmd/Makemodule.am @@ -15,5 +15,18 @@ killall5_CPPFLAGS = $(AM_CPPFLAGS) killall5_CFLAGS = $(AM_CFLAGS) killall5_LDFLAGS = $(AM_LDFLAGS) -sbin_PROGRAMS += reboot shutdown +SRVHEADERS = cmd/service/servicecmd.h + +service_SOURCES = cmd/service/servicecmd.c cmd/service/help.c +service_SOURCES += cmd/service/enable.c cmd/service/disable.c +service_SOURCES += cmd/service/dumpscript.c cmd/service/list.c +service_SOURCES += $(SRVHEADERS) +service_CPPFLAGS = $(AM_CPPFLAGS) +service_CFLAGS = $(AM_CFLAGS) +service_LDFLAGS = $(AM_LDFLAGS) +service_LDADD = libinit.a + +EXTRA_DIST += $(SRVHEADERS) + +sbin_PROGRAMS += service reboot shutdown helper_PROGRAMS += killall5 diff --git a/servicecmd/disable.c b/cmd/service/disable.c similarity index 100% rename from servicecmd/disable.c rename to cmd/service/disable.c diff --git a/servicecmd/dumpscript.c b/cmd/service/dumpscript.c similarity index 100% rename from servicecmd/dumpscript.c rename to cmd/service/dumpscript.c diff --git a/servicecmd/enable.c b/cmd/service/enable.c similarity index 100% rename from servicecmd/enable.c rename to cmd/service/enable.c diff --git a/servicecmd/help.c b/cmd/service/help.c similarity index 100% rename from servicecmd/help.c rename to cmd/service/help.c diff --git a/servicecmd/list.c b/cmd/service/list.c similarity index 100% rename from servicecmd/list.c rename to cmd/service/list.c diff --git a/servicecmd/servicecmd.c b/cmd/service/servicecmd.c similarity index 100% rename from servicecmd/servicecmd.c rename to cmd/service/servicecmd.c diff --git a/servicecmd/servicecmd.h b/cmd/service/servicecmd.h similarity index 100% rename from servicecmd/servicecmd.h rename to cmd/service/servicecmd.h diff --git a/scripts/Makemodule.am b/scripts/Makemodule.am index 7ed5b10..6832788 100644 --- a/scripts/Makemodule.am +++ b/scripts/Makemodule.am @@ -1,6 +1,5 @@ -scriptdir = @SCRIPTDIR@ -script_SCRIPTS = scripts/devfs.sh scripts/trymount.sh +helper_SCRIPTS += scripts/devfs.sh scripts/trymount.sh if PYGOSCFG -script_SCRIPTS += scripts/overlay.sh +helper_SCRIPTS += scripts/overlay.sh endif diff --git a/servicecmd/Makemodule.am b/servicecmd/Makemodule.am deleted file mode 100644 index 7b85e3f..0000000 --- a/servicecmd/Makemodule.am +++ /dev/null @@ -1,13 +0,0 @@ -SRVHEADERS = servicecmd/servicecmd.h - -service_SOURCES = servicecmd/servicecmd.c servicecmd/help.c servicecmd/list.c -service_SOURCES += servicecmd/enable.c servicecmd/disable.c -service_SOURCES += servicecmd/dumpscript.c $(SRVHEADERS) -service_CPPFLAGS = $(AM_CPPFLAGS) -service_CFLAGS = $(AM_CFLAGS) -service_LDFLAGS = $(AM_LDFLAGS) -service_LDADD = libinit.a - -EXTRA_DIST += $(SRVHEADERS) - -sbin_PROGRAMS += service