From 880cb2aa4d563acb015abd140064c249a26447c3 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Thu, 2 Aug 2018 22:23:26 +0200 Subject: [PATCH] Relocate files to man/ and src/ and change to GNU configure & build - Relocate all source files to src/ and manual pages to man/ - Replace static Makefile with GNU configure and build system Signed-off-by: Joachim Nilsson --- .gitignore | 14 ++++++++++ Makefile.am | 37 ++++++++++++++++++++++++++ autogen.sh | 3 +++ configure.ac | 31 +++++++++++++++++++++ man/Makefile.am | 2 ++ klogd.8 => man/klogd.8 | 0 sysklogd.8 => man/sysklogd.8 | 0 syslog.conf.5 => man/syslog.conf.5 | 0 syslogd.8 => man/syslogd.8 | 0 MANIFEST => src/MANIFEST | 0 src/Makefile.am | 30 +++++++++++++++++++++ Makefile => src/Makefile.old | 0 README.1st => src/README.1st | 0 README.linux => src/README.linux | 0 klogd.c => src/klogd.c | 0 klogd.h => src/klogd.h | 0 ksym.c => src/ksym.c | 0 ksym_mod.c => src/ksym_mod.c | 0 ksyms.h => src/ksyms.h | 0 module.h => src/module.h | 0 modutils.patch => src/modutils.patch | 0 oops.c => src/oops.c | 0 pidfile.c => src/pidfile.c | 0 pidfile.h => src/pidfile.h | 0 syslog-tst.conf => src/syslog-tst.conf | 0 syslog.c => src/syslog.c | 0 syslog_tst.c => src/syslog_tst.c | 0 syslogd.c => src/syslogd.c | 0 28 files changed, 117 insertions(+) create mode 100644 Makefile.am create mode 100755 autogen.sh create mode 100644 configure.ac create mode 100644 man/Makefile.am rename klogd.8 => man/klogd.8 (100%) rename sysklogd.8 => man/sysklogd.8 (100%) rename syslog.conf.5 => man/syslog.conf.5 (100%) rename syslogd.8 => man/syslogd.8 (100%) rename MANIFEST => src/MANIFEST (100%) create mode 100644 src/Makefile.am rename Makefile => src/Makefile.old (100%) rename README.1st => src/README.1st (100%) rename README.linux => src/README.linux (100%) rename klogd.c => src/klogd.c (100%) rename klogd.h => src/klogd.h (100%) rename ksym.c => src/ksym.c (100%) rename ksym_mod.c => src/ksym_mod.c (100%) rename ksyms.h => src/ksyms.h (100%) rename module.h => src/module.h (100%) rename modutils.patch => src/modutils.patch (100%) rename oops.c => src/oops.c (100%) rename pidfile.c => src/pidfile.c (100%) rename pidfile.h => src/pidfile.h (100%) rename syslog-tst.conf => src/syslog-tst.conf (100%) rename syslog.c => src/syslog.c (100%) rename syslog_tst.c => src/syslog_tst.c (100%) rename syslogd.c => src/syslogd.c (100%) diff --git a/.gitignore b/.gitignore index 4417566..4412982 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,18 @@ *~ *.o +.deps +Makefile +Makefile.in +aclocal.m4 +autom4te.cache +compile +config.h* +config.log +config.status +configure +depcomp +install-sh klogd +missing +stamp-h1 syslogd diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..d8754d0 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,37 @@ +# Copyright (c) 2018 Joachim Nilsson +# +# This file is part of the sysklogd package, a kernel and system log daemon. +# +# This program 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 2 of the License, or +# (at your option) any later version. +# +# This program 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 this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +SUBDIRS = src man +doc_DATA = README.md +EXTRA_DIST = README.md + +# +# Target to run when building a release +# +release: distcheck + @for file in $(DIST_ARCHIVES); do \ + md5sum $$file > ../$$file.md5; \ + done + @mv $(DIST_ARCHIVES) ../ + @echo + @echo "Resulting release files:" + @echo "=================================================================" + @for file in $(DIST_ARCHIVES); do \ + printf "$$file \tDistribution tarball\n"; \ + printf "$$file.md5\t"; cat ../$$file.md5 | cut -f1 -d' '; \ + done diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..dbbcad3 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +autoreconf -W portability -visfm diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..e0a2dd3 --- /dev/null +++ b/configure.ac @@ -0,0 +1,31 @@ +# Copyright (c) 2018 Joachim Nilsson +# +# This file is part of the sysklogd package, a kernel and system log daemon. +# +# This program 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 2 of the License, or +# (at your option) any later version. +# +# This program 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 this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +AC_INIT([sysklogd], [1.6-beta1], [https://github.com/troglobit/sysklgd/issues]) +AM_INIT_AUTOMAKE([1.11 foreign]) +AM_SILENT_RULES([yes]) + +AC_CONFIG_SRCDIR([src/syslogd.c]) +AC_CONFIG_HEADER([config.h]) +AC_CONFIG_FILES([Makefile src/Makefile man/Makefile]) + +AC_PROG_CC +AC_PROG_INSTALL +AC_HEADER_STDC + +AC_OUTPUT diff --git a/man/Makefile.am b/man/Makefile.am new file mode 100644 index 0000000..69b4683 --- /dev/null +++ b/man/Makefile.am @@ -0,0 +1,2 @@ +dist_man5_MANS = syslog.conf.5 +dist_man8_MANS = syslogd.8 klogd.8 sysklogd.8 diff --git a/klogd.8 b/man/klogd.8 similarity index 100% rename from klogd.8 rename to man/klogd.8 diff --git a/sysklogd.8 b/man/sysklogd.8 similarity index 100% rename from sysklogd.8 rename to man/sysklogd.8 diff --git a/syslog.conf.5 b/man/syslog.conf.5 similarity index 100% rename from syslog.conf.5 rename to man/syslog.conf.5 diff --git a/syslogd.8 b/man/syslogd.8 similarity index 100% rename from syslogd.8 rename to man/syslogd.8 diff --git a/MANIFEST b/src/MANIFEST similarity index 100% rename from MANIFEST rename to src/MANIFEST diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..dda8847 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,30 @@ +# Copyright (c) 2018 Joachim Nilsson +# +# This file is part of the sysklogd package, a kernel and system log daemon. +# +# This program 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 2 of the License, or +# (at your option) any later version. +# +# This program 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 this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +sbin_PROGRAMS = syslogd klogd +doc_DATA = README.1st README.linux + +AM_CFLAGS = -fomit-frame-pointer -fno-strength-reduce -Wno-unused-result + +syslogd_SOURCES = syslogd.c pidfile.c pidfile.h +syslogd_CPPFLAGS = -DSYSV -DFSSTND -DSYSLOG_INET -DINET6 -DNO_SCCS \ + -DSYSLOG_UNIXAF -DSYSLOGD_PIDNAME=\"syslogd.pid\" + +klogd_SOURCES = klogd.c klogd.h syslog.c pidfile.c pidfile.h \ + ksym.c ksyms.h ksym_mod.c module.h +klogd_CPPFLAGS = -DSYSV -DFSSTND diff --git a/Makefile b/src/Makefile.old similarity index 100% rename from Makefile rename to src/Makefile.old diff --git a/README.1st b/src/README.1st similarity index 100% rename from README.1st rename to src/README.1st diff --git a/README.linux b/src/README.linux similarity index 100% rename from README.linux rename to src/README.linux diff --git a/klogd.c b/src/klogd.c similarity index 100% rename from klogd.c rename to src/klogd.c diff --git a/klogd.h b/src/klogd.h similarity index 100% rename from klogd.h rename to src/klogd.h diff --git a/ksym.c b/src/ksym.c similarity index 100% rename from ksym.c rename to src/ksym.c diff --git a/ksym_mod.c b/src/ksym_mod.c similarity index 100% rename from ksym_mod.c rename to src/ksym_mod.c diff --git a/ksyms.h b/src/ksyms.h similarity index 100% rename from ksyms.h rename to src/ksyms.h diff --git a/module.h b/src/module.h similarity index 100% rename from module.h rename to src/module.h diff --git a/modutils.patch b/src/modutils.patch similarity index 100% rename from modutils.patch rename to src/modutils.patch diff --git a/oops.c b/src/oops.c similarity index 100% rename from oops.c rename to src/oops.c diff --git a/pidfile.c b/src/pidfile.c similarity index 100% rename from pidfile.c rename to src/pidfile.c diff --git a/pidfile.h b/src/pidfile.h similarity index 100% rename from pidfile.h rename to src/pidfile.h diff --git a/syslog-tst.conf b/src/syslog-tst.conf similarity index 100% rename from syslog-tst.conf rename to src/syslog-tst.conf diff --git a/syslog.c b/src/syslog.c similarity index 100% rename from syslog.c rename to src/syslog.c diff --git a/syslog_tst.c b/src/syslog_tst.c similarity index 100% rename from syslog_tst.c rename to src/syslog_tst.c diff --git a/syslogd.c b/src/syslogd.c similarity index 100% rename from syslogd.c rename to src/syslogd.c