From daf41d326b9a642b0bdfdd01eb0bfc2e410bddb8 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Wed, 22 Nov 2017 09:02:21 +0100 Subject: [PATCH] Relocate source files to an src/ sub directory Signed-off-by: Joachim Nilsson --- Makefile.am | 18 +++--------------- configure.ac | 4 ++-- src/Makefile.am | 13 +++++++++++++ chomp.c => src/chomp.c | 0 conio.h => src/conio.h | 0 copyfile.c => src/copyfile.c | 0 dir.c => src/dir.c | 0 fexist.c => src/fexist.c | 0 fisdir.c => src/fisdir.c | 0 fmode.c => src/fmode.c | 0 fparseln.c => src/fparseln.c | 0 fsendfile.c => src/fsendfile.c | 0 ifconfig.c => src/ifconfig.c | 0 lfile.c => src/lfile.c | 0 lite.h => src/lite.h | 0 makepath.c => src/makepath.c | 0 pidfile.c => src/pidfile.c | 0 pidfilefn.c => src/pidfilefn.c | 0 progress.c => src/progress.c | 0 queue.h => src/queue.h | 0 reallocarray.c => src/reallocarray.c | 0 rsync.c => src/rsync.c | 0 strdupa.h => src/strdupa.h | 0 strlcat.c => src/strlcat.c | 0 strlcpy.c => src/strlcpy.c | 0 strlite.h => src/strlite.h | 0 strndupa.h => src/strndupa.h | 0 strnlen.h => src/strnlen.h | 0 strtonum.c => src/strtonum.c | 0 tempfile.c => src/tempfile.c | 0 tree.c => src/tree.c | 0 tree.h => src/tree.h | 0 which.c => src/which.c | 0 33 files changed, 18 insertions(+), 17 deletions(-) create mode 100644 src/Makefile.am rename chomp.c => src/chomp.c (100%) rename conio.h => src/conio.h (100%) rename copyfile.c => src/copyfile.c (100%) rename dir.c => src/dir.c (100%) rename fexist.c => src/fexist.c (100%) rename fisdir.c => src/fisdir.c (100%) rename fmode.c => src/fmode.c (100%) rename fparseln.c => src/fparseln.c (100%) rename fsendfile.c => src/fsendfile.c (100%) rename ifconfig.c => src/ifconfig.c (100%) rename lfile.c => src/lfile.c (100%) rename lite.h => src/lite.h (100%) rename makepath.c => src/makepath.c (100%) rename pidfile.c => src/pidfile.c (100%) rename pidfilefn.c => src/pidfilefn.c (100%) rename progress.c => src/progress.c (100%) rename queue.h => src/queue.h (100%) rename reallocarray.c => src/reallocarray.c (100%) rename rsync.c => src/rsync.c (100%) rename strdupa.h => src/strdupa.h (100%) rename strlcat.c => src/strlcat.c (100%) rename strlcpy.c => src/strlcpy.c (100%) rename strlite.h => src/strlite.h (100%) rename strndupa.h => src/strndupa.h (100%) rename strnlen.h => src/strnlen.h (100%) rename strtonum.c => src/strtonum.c (100%) rename tempfile.c => src/tempfile.c (100%) rename tree.c => src/tree.c (100%) rename tree.h => src/tree.h (100%) rename which.c => src/which.c (100%) diff --git a/Makefile.am b/Makefile.am index 181c636..e182dbb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,22 +1,10 @@ ACLOCAL_AMFLAGS = -I m4 -lib_LTLIBRARIES = libite.la -pkgincludedir = $(includedir)/lite -pkginclude_HEADERS = lite.h queue.h conio.h tree.h strlite.h strdupa.h strndupa.h strnlen.h -libite_la_SOURCES = chomp.c copyfile.c dir.c fexist.c fisdir.c fmode.c fparseln.c \ - fsendfile.c ifconfig.c lfile.c makepath.c pidfile.c pidfilefn.c \ - progress.c reallocarray.c rsync.c strlcpy.c strlcat.c strtonum.c \ - tempfile.c tree.c which.c - -libite_la_CPPFLAGS = -D_GNU_SOURCE -libite_la_CFLAGS = -W -Wall -Wextra -libite_la_LDFLAGS = $(AM_LDFLAGS) -version-info 4:1:0 - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libite.pc doc_DATA = README.md LICENSE EXTRA_DIST = README.md LICENSE ChangeLog.md -SUBDIRS = tests +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libite.pc +SUBDIRS = src tests ## Generate .deb package package: diff --git a/configure.ac b/configure.ac index e0f4b62..fb7e3d2 100644 --- a/configure.ac +++ b/configure.ac @@ -2,9 +2,9 @@ AC_INIT(libite, 1.9.4-pre, https://github.com/troglobit/libite/issues) AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz]) AM_SILENT_RULES([yes]) -AC_CONFIG_SRCDIR(lite.h) +AC_CONFIG_SRCDIR(src/lite.h) AM_CONFIG_HEADER(config.h) -AC_CONFIG_FILES([Makefile tests/Makefile libite.pc]) +AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile libite.pc]) AC_CONFIG_MACRO_DIR([m4]) AC_PROG_CC diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..2352ec7 --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,13 @@ +lib_LTLIBRARIES = libite.la + +libite_la_CPPFLAGS = -D_GNU_SOURCE +libite_la_CFLAGS = -W -Wall -Wextra +libite_la_LDFLAGS = $(AM_LDFLAGS) -version-info 4:1:0 +libite_la_SOURCES = chomp.c copyfile.c dir.c fexist.c fisdir.c fmode.c fparseln.c \ + fsendfile.c ifconfig.c lfile.c makepath.c pidfile.c pidfilefn.c \ + progress.c reallocarray.c rsync.c strlcpy.c strlcat.c strtonum.c \ + tempfile.c tree.c which.c + +## Distribute these header files in the name space +pkgincludedir = $(includedir)/lite +pkginclude_HEADERS = lite.h queue.h conio.h tree.h strlite.h strdupa.h strndupa.h strnlen.h diff --git a/chomp.c b/src/chomp.c similarity index 100% rename from chomp.c rename to src/chomp.c diff --git a/conio.h b/src/conio.h similarity index 100% rename from conio.h rename to src/conio.h diff --git a/copyfile.c b/src/copyfile.c similarity index 100% rename from copyfile.c rename to src/copyfile.c diff --git a/dir.c b/src/dir.c similarity index 100% rename from dir.c rename to src/dir.c diff --git a/fexist.c b/src/fexist.c similarity index 100% rename from fexist.c rename to src/fexist.c diff --git a/fisdir.c b/src/fisdir.c similarity index 100% rename from fisdir.c rename to src/fisdir.c diff --git a/fmode.c b/src/fmode.c similarity index 100% rename from fmode.c rename to src/fmode.c diff --git a/fparseln.c b/src/fparseln.c similarity index 100% rename from fparseln.c rename to src/fparseln.c diff --git a/fsendfile.c b/src/fsendfile.c similarity index 100% rename from fsendfile.c rename to src/fsendfile.c diff --git a/ifconfig.c b/src/ifconfig.c similarity index 100% rename from ifconfig.c rename to src/ifconfig.c diff --git a/lfile.c b/src/lfile.c similarity index 100% rename from lfile.c rename to src/lfile.c diff --git a/lite.h b/src/lite.h similarity index 100% rename from lite.h rename to src/lite.h diff --git a/makepath.c b/src/makepath.c similarity index 100% rename from makepath.c rename to src/makepath.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/pidfilefn.c b/src/pidfilefn.c similarity index 100% rename from pidfilefn.c rename to src/pidfilefn.c diff --git a/progress.c b/src/progress.c similarity index 100% rename from progress.c rename to src/progress.c diff --git a/queue.h b/src/queue.h similarity index 100% rename from queue.h rename to src/queue.h diff --git a/reallocarray.c b/src/reallocarray.c similarity index 100% rename from reallocarray.c rename to src/reallocarray.c diff --git a/rsync.c b/src/rsync.c similarity index 100% rename from rsync.c rename to src/rsync.c diff --git a/strdupa.h b/src/strdupa.h similarity index 100% rename from strdupa.h rename to src/strdupa.h diff --git a/strlcat.c b/src/strlcat.c similarity index 100% rename from strlcat.c rename to src/strlcat.c diff --git a/strlcpy.c b/src/strlcpy.c similarity index 100% rename from strlcpy.c rename to src/strlcpy.c diff --git a/strlite.h b/src/strlite.h similarity index 100% rename from strlite.h rename to src/strlite.h diff --git a/strndupa.h b/src/strndupa.h similarity index 100% rename from strndupa.h rename to src/strndupa.h diff --git a/strnlen.h b/src/strnlen.h similarity index 100% rename from strnlen.h rename to src/strnlen.h diff --git a/strtonum.c b/src/strtonum.c similarity index 100% rename from strtonum.c rename to src/strtonum.c diff --git a/tempfile.c b/src/tempfile.c similarity index 100% rename from tempfile.c rename to src/tempfile.c diff --git a/tree.c b/src/tree.c similarity index 100% rename from tree.c rename to src/tree.c diff --git a/tree.h b/src/tree.h similarity index 100% rename from tree.h rename to src/tree.h diff --git a/which.c b/src/which.c similarity index 100% rename from which.c rename to src/which.c