diff --git a/.gitignore b/.gitignore index e455521..4890898 100644 --- a/.gitignore +++ b/.gitignore @@ -1,9 +1,3 @@ -# Ignore configuration files that may contain sensitive information. -sites/*/*settings*.php - -# Ignore paths that contain generated content. - -# Ignore default text files .deps config /AUTHORS @@ -24,11 +18,7 @@ config.status libtool stamp-h1 # Ignore output files -libpipecolors.o -libpipecolors.so .libs/ -libpipecolors.la -libpipecolors.lo libpipecolors.pc tests/ test/ @@ -36,4 +26,3 @@ test/ # Ignore backup files *~ libpipecolors.h -cpp-btree/ \ No newline at end of file diff --git a/Makefile.am b/Makefile.am index b7c9bb0..f69e149 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,57 +1,15 @@ -pkgconfig_DATA = libpipecolors.pc - -AM_LDFLAGS = $(LDFLAGS) +SUBDIRS = src man ACLOCAL_AMFLAGS = -I m4 -I config -LIBTOOL_DEPS = @LIBTOOL_DEPS@ - -lib_LTLIBRARIES = libpipecolors.la -libpipecolors_la_SOURCES = libpipecolors.cc -libpipecolors_la_LIBS = -lboost_regex -libpipecolors_la_CFLAGS = -fPIC -DPIC -pthread - -if PC_REMOVE_INVALID -AM_CPPFLAGSINVALID = -DPC_REMOVE_INVALID -endif - -AM_CPPFLAGS = $(AM_CPPFLAGSINVALID) - -libpipecolors_la_LDFLAGS = -module \ - -release ${PIPECOLORS_VERSION} - -include_HEADERS = pipecolors.h -noinst_HEADERS = config.h - -man_MANS = libpipecolors.7 pcprintf.3 docdir = $(datadir)/doc/@PACKAGE@ doc_DATA = README NEWS AUTHORS ChangeLog COPYING MAINTAINERCLEANFILES = \ aclocal.m4 \ - config.h \ - config.h.in \ - config.h.in~ \ config.log \ stamp-h1 \ -rf config \ -rf m4 \ configure \ - Makefile.in \ - -rf cpp-btree - -install-man: install-man3 install-man7 install-man-gzip -uninstall-man: uninstall-man3 uninstall-man7 uninstall-man-gzip - -install-man-gzip: - test -f $(mandir)/man3/pcprintf.3 && gzip -qf /usr/share/man/man3/pcprintf.3 - test -f $(mandir)/man7/libpipecolors.7 && gzip -qf /usr/share/man/man7/libpipecolors.7 - test -f $(mandir)/man3/pcprintf.3.gz && ln -sf /usr/share/man/man3/pcprintf.3.gz /usr/share/man/man3/pcsprintf.3.gz - -uninstall-man-gzip: - test -f $(mandir)/man3/pcprintf.3.gz && rm -f /usr/share/man/man3/pcprintf.3.gz - test -h $(mandir)/man3/pcsprintf.3.gz && rm -f /usr/share/man/man3/pcsprintf.3.gz - test -f $(mandir)/man7/libpipecolors.7.gz && rm -f /usr/share/man/man7/libpipecolors.7.gz - -libtool: $(LIBTOOL_DEPS) - $(SHELL) ./config.status libtool + Makefile.in diff --git a/configure.ac b/configure.ac index a5ba89a..5523cde 100644 --- a/configure.ac +++ b/configure.ac @@ -17,8 +17,8 @@ AC_SUBST([PIPECOLORS_VERSION_MICRO], [pipecolors_version_micro]) AC_SUBST([PIPECOLORS_VERSION], [pipecolors_version]) PKG_INSTALLDIR -AC_CONFIG_SRCDIR([libpipecolors.cc]) -AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_SRCDIR([src/libpipecolors.cc]) +AC_CONFIG_HEADERS([src/config.h]) AC_CONFIG_AUX_DIR([config]) AC_CANONICAL_TARGET AC_CANONICAL_HOST @@ -69,7 +69,7 @@ AC_ARG_ENABLE([the-force], AM_CONDITIONAL([ENABLE_THE_FORCE], [test "x$enable_the_force" = "xyes"]) -AC_CONFIG_FILES([Makefile libpipecolors.pc:libpipecolors.pc.in libpipecolors.h:libpipecolors.h.in],[],[APIVERSION=PIPECOLORS_VERSION]) +AC_CONFIG_FILES([Makefile src/Makefile man/Makefile src/libpipecolors.pc:src/libpipecolors.pc.in src/libpipecolors.h:src/libpipecolors.h.in],[],[APIVERSION=PIPECOLORS_VERSION]) AC_CONFIG_COMMANDS([timestamp], [date >timestamp]) AC_OUTPUT diff --git a/man/Makefile.am b/man/Makefile.am new file mode 100644 index 0000000..81e914d --- /dev/null +++ b/man/Makefile.am @@ -0,0 +1,19 @@ + +man_MANS = libpipecolors.7 pcprintf.3 + + +MAINTAINERCLEANFILES = \ + Makefile.in + +install-man: install-man3 install-man7 install-man-gzip +uninstall-man: uninstall-man3 uninstall-man7 uninstall-man-gzip + +install-man-gzip: + test -f $(mandir)/man3/pcprintf.3 && gzip -qf /usr/share/man/man3/pcprintf.3 + test -f $(mandir)/man7/libpipecolors.7 && gzip -qf /usr/share/man/man7/libpipecolors.7 + test -f $(mandir)/man3/pcprintf.3.gz && ln -sf /usr/share/man/man3/pcprintf.3.gz /usr/share/man/man3/pcsprintf.3.gz + +uninstall-man-gzip: + test -f $(mandir)/man3/pcprintf.3.gz && rm -f /usr/share/man/man3/pcprintf.3.gz + test -h $(mandir)/man3/pcsprintf.3.gz && rm -f /usr/share/man/man3/pcsprintf.3.gz + test -f $(mandir)/man7/libpipecolors.7.gz && rm -f /usr/share/man/man7/libpipecolors.7.gz diff --git a/libpipecolors.7 b/man/libpipecolors.7 similarity index 100% rename from libpipecolors.7 rename to man/libpipecolors.7 diff --git a/pcprintf.3 b/man/pcprintf.3 similarity index 100% rename from pcprintf.3 rename to man/pcprintf.3 diff --git a/src/Makefile.am b/src/Makefile.am new file mode 100644 index 0000000..73840ab --- /dev/null +++ b/src/Makefile.am @@ -0,0 +1,35 @@ +pkgconfig_DATA = libpipecolors.pc + +AM_LDFLAGS = $(LDFLAGS) + +ACLOCAL_AMFLAGS = -I m4 -I config +LIBTOOL_DEPS = @LIBTOOL_DEPS@ + +lib_LTLIBRARIES = libpipecolors.la +libpipecolors_la_SOURCES = libpipecolors.cc +libpipecolors_la_LIBS = -lboost_regex +libpipecolors_la_CFLAGS = -fPIC -DPIC -pthread + +if PC_REMOVE_INVALID +AM_CPPFLAGSINVALID = -DPC_REMOVE_INVALID +endif + +AM_CPPFLAGS = $(AM_CPPFLAGSINVALID) + +libpipecolors_la_LDFLAGS = -module \ + -release ${PIPECOLORS_VERSION} + +include_HEADERS = pipecolors.h +noinst_HEADERS = config.h + +MAINTAINERCLEANFILES = \ + aclocal.m4 \ + config.h \ + config.h.in \ + config.h.in~ \ + config.log \ + stamp-h1 \ + Makefile.in + +libtool: $(LIBTOOL_DEPS) + $(SHELL) ../config.status libtool diff --git a/libpipecolors.cc b/src/libpipecolors.cc similarity index 100% rename from libpipecolors.cc rename to src/libpipecolors.cc diff --git a/libpipecolors.h.in b/src/libpipecolors.h.in similarity index 100% rename from libpipecolors.h.in rename to src/libpipecolors.h.in diff --git a/libpipecolors.pc.in b/src/libpipecolors.pc.in similarity index 100% rename from libpipecolors.pc.in rename to src/libpipecolors.pc.in diff --git a/pipecolors.h b/src/pipecolors.h similarity index 100% rename from pipecolors.h rename to src/pipecolors.h