Move C source files to an src/ subdirectory.

It was a bit crowded in here. This makes the source tree a bit nicer.
This commit is contained in:
Sam Hocevar 2017-09-11 19:25:26 +02:00
parent b5f75eae99
commit 9d140d8f87
14 changed files with 6 additions and 25 deletions

View File

@ -1,35 +1,15 @@
AUTOMAKE_OPTIONS = foreign dist-bzip2
SUBDIRS = src
EXTRA_DIST = bootstrap CHANGES.md README.md index.html \
parse.peg getopt.c getopt.h $(man_MANS) $(sysconf_DATA)
$(man_MANS) $(sysconf_DATA)
man_MANS = rinetd.8
sysconf_DATA = rinetd.conf
noinst_DATA = index.html
sbin_PROGRAMS = rinetd
rinetd_SOURCES = rinetd.c rinetd.h \
parse.c parse.h \
match.c match.h \
net.c net.h \
types.h
BUILT_SOURCES = parse.c
# If peg/leg is available, regenerate parse.h
parse.c: parse.peg
if which leg >/dev/null 2>&1; then leg -o $@ $^; else touch $@; fi
# If roffit is available, regenerate index.html
index.html: rinetd.8
if which roffit >/dev/null 2>&1; then roffit < $^ > $@; else touch $@; fi
# _POSIX_C_SOURCE is for SA_RESTART and others
# _XOPEN_SOURCE is for struct sigaction
# _GNU_SOURCE is for h_errno and gethostbyname-related macros
rinetd_CFLAGS = -std=c99 -D_XOPEN_SOURCE -D_GNU_SOURCE -D_POSIX_C_SOURCE=200809L -Wall -Wextra -Wwrite-strings -I.
# This is for Travis CI; we dont have a testsuite yet.
test:

View File

@ -2,8 +2,8 @@
AC_PREREQ(2.52)
AC_INIT(rinetd, 0.70, sam@hocevar.net)
AC_CONFIG_AUX_DIR(.auto)
AC_CONFIG_SRCDIR([getopt.h])
AC_CONFIG_HEADER([config.h])
AC_CONFIG_SRCDIR([src/rinetd.c])
AC_CONFIG_HEADER([src/config.h])
AM_INIT_AUTOMAKE([no-define tar-ustar silent-rules])
# Checks for programs.
@ -34,4 +34,5 @@ AC_FUNC_STRFTIME
AC_CHECK_FUNCS([gethostbyname memset select socket strstr daemon fork sigaction])
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([src/Makefile])
AC_OUTPUT

View File

View File