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 <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson 2018-08-02 22:23:26 +02:00
parent f4110c8571
commit 880cb2aa4d
28 changed files with 117 additions and 0 deletions

14
.gitignore vendored
View File

@ -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

37
Makefile.am Normal file
View File

@ -0,0 +1,37 @@
# Copyright (c) 2018 Joachim Nilsson <troglobit@gmail.com>
#
# 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

3
autogen.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
autoreconf -W portability -visfm

31
configure.ac Normal file
View File

@ -0,0 +1,31 @@
# Copyright (c) 2018 Joachim Nilsson <troglobit@gmail.com>
#
# 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

2
man/Makefile.am Normal file
View File

@ -0,0 +1,2 @@
dist_man5_MANS = syslog.conf.5
dist_man8_MANS = syslogd.8 klogd.8 sysklogd.8

30
src/Makefile.am Normal file
View File

@ -0,0 +1,30 @@
# Copyright (c) 2018 Joachim Nilsson <troglobit@gmail.com>
#
# 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

View File

View File