build: Remove autotools build
This commit is contained in:
@@ -1,8 +0,0 @@
|
||||
SUBDIRS = data src docs
|
||||
|
||||
DISTCHECK_CONFIGURE_FLAGS = \
|
||||
--enable-gtk-doc \
|
||||
--with-udevrulesdir=$$dc_install_base/$(udevrulesdir) \
|
||||
--with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir)
|
||||
|
||||
EXTRA_DIST = README.md
|
@@ -1,54 +0,0 @@
|
||||
# Note, we need this set for umockdev to be available in tests
|
||||
GTESTER = gtester # in $PATH for non-GLIB packages
|
||||
GTESTER_REPORT = gtester-report # in $PATH for non-GLIB packages
|
||||
|
||||
# initialize variables for unconditional += appending
|
||||
TEST_PROGS =
|
||||
|
||||
# test: run all tests in cwd and subdirs
|
||||
test: ${TEST_PROGS}
|
||||
@test -z "${TEST_PROGS}" || ${GTESTER} --verbose ${TEST_PROGS}
|
||||
@ for subdir in $(SUBDIRS) . ; do \
|
||||
test "$$subdir" = "." -o "$$subdir" = "po" || \
|
||||
( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \
|
||||
done
|
||||
|
||||
# test-report: run tests in subdirs and generate report
|
||||
# perf-report: run tests in subdirs with -m perf and generate report
|
||||
# full-report: like test-report: with -m perf and -m slow
|
||||
test-report perf-report full-report: ${TEST_PROGS}
|
||||
@test -z "${TEST_PROGS}" || { \
|
||||
case $@ in \
|
||||
test-report) test_options="-k";; \
|
||||
perf-report) test_options="-k -m=perf";; \
|
||||
full-report) test_options="-k -m=perf -m=slow";; \
|
||||
esac ; \
|
||||
if test -z "$$GTESTER_LOGDIR" ; then \
|
||||
${GTESTER} --verbose $$test_options -o test-report.xml ${TEST_PROGS} ; \
|
||||
elif test -n "${TEST_PROGS}" ; then \
|
||||
${GTESTER} --verbose $$test_options -o `mktemp "$$GTESTER_LOGDIR/log-XXXXXX"` ${TEST_PROGS} ; \
|
||||
fi ; \
|
||||
}
|
||||
@ ignore_logdir=true ; \
|
||||
if test -z "$$GTESTER_LOGDIR" ; then \
|
||||
GTESTER_LOGDIR=`mktemp -d "\`pwd\`/.testlogs-XXXXXX"`; export GTESTER_LOGDIR ; \
|
||||
ignore_logdir=false ; \
|
||||
fi ; \
|
||||
for subdir in $(SUBDIRS) . ; do \
|
||||
test "$$subdir" = "." -o "$$subdir" = "po" || \
|
||||
( cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@ ) || exit $? ; \
|
||||
done ; \
|
||||
$$ignore_logdir || { \
|
||||
echo '<?xml version="1.0"?>' > $@.xml ; \
|
||||
echo '<report-collection>' >> $@.xml ; \
|
||||
for lf in `ls -L "$$GTESTER_LOGDIR"/.` ; do \
|
||||
sed '1,1s/^<?xml\b[^>?]*?>//' <"$$GTESTER_LOGDIR"/"$$lf" >> $@.xml ; \
|
||||
done ; \
|
||||
echo >> $@.xml ; \
|
||||
echo '</report-collection>' >> $@.xml ; \
|
||||
rm -rf "$$GTESTER_LOGDIR"/ ; \
|
||||
${GTESTER_REPORT} --version 2>/dev/null 1>&2 ; test "$$?" != 0 || ${GTESTER_REPORT} $@.xml >$@.html ; \
|
||||
}
|
||||
.PHONY: test test-report perf-report full-report
|
||||
# run make test as part of make check
|
||||
check-local: test
|
38
autogen.sh
38
autogen.sh
@@ -1,38 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Run this to generate all the initial makefiles, etc.
|
||||
test -n "$srcdir" || srcdir=$(dirname "$0")
|
||||
test -n "$srcdir" || srcdir=.
|
||||
|
||||
olddir=$(pwd)
|
||||
|
||||
cd $srcdir
|
||||
|
||||
(test -f configure.ac) || {
|
||||
echo "*** ERROR: Directory '$srcdir' does not look like the top-level project directory ***"
|
||||
exit 1
|
||||
}
|
||||
|
||||
# shellcheck disable=SC2016
|
||||
PKG_NAME=$(autoconf --trace 'AC_INIT:$1' configure.ac)
|
||||
|
||||
if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
|
||||
echo "*** WARNING: I am going to run 'configure' with no arguments." >&2
|
||||
echo "*** If you wish to pass any to it, please specify them on the" >&2
|
||||
echo "*** '$0' command line." >&2
|
||||
echo "" >&2
|
||||
fi
|
||||
|
||||
aclocal --install || exit 1
|
||||
gtkdocize --copy --flavour no-tmpl || exit 1
|
||||
autoreconf --verbose --force --install || exit 1
|
||||
|
||||
cd "$olddir"
|
||||
if [ "$NOCONFIGURE" = "" ]; then
|
||||
$srcdir/configure "$@" || exit 1
|
||||
|
||||
if [ "$1" = "--help" ]; then exit 0 else
|
||||
echo "Now type 'make' to compile $PKG_NAME" || exit 1
|
||||
fi
|
||||
else
|
||||
echo "Skipping configure process."
|
||||
fi
|
70
configure.ac
70
configure.ac
@@ -1,70 +0,0 @@
|
||||
AC_PREREQ(2.59)
|
||||
|
||||
AC_INIT([iio-sensor-proxy], [3.0], [hadess@hadess.net])
|
||||
|
||||
AX_IS_RELEASE([git-directory])
|
||||
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
|
||||
AM_INIT_AUTOMAKE(1.9 dist-xz no-dist-gzip check-news)
|
||||
|
||||
# Enable silent build when available (Automake 1.11)
|
||||
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])])
|
||||
|
||||
AC_PROG_CC
|
||||
AC_PROG_MAKE_SET
|
||||
AC_PROG_INSTALL
|
||||
AC_PROG_SED
|
||||
AM_PROG_CC_C_O
|
||||
|
||||
AC_CHECK_LIBM
|
||||
AC_SUBST(LIBM)
|
||||
|
||||
AX_COMPILER_FLAGS([WARN_CFLAGS],[WARN_LDFLAGS])
|
||||
|
||||
GTK_DOC_CHECK([1.11],[--flavour no-tmpl])
|
||||
|
||||
PKG_CHECK_EXISTS(udev, [], [AC_MSG_ERROR(udev development libraries are required)])
|
||||
AC_ARG_WITH([udevrulesdir],
|
||||
AS_HELP_STRING([--with-udevrulesdir=DIR], [Directory for udev rules]),
|
||||
[],
|
||||
[with_udevrulesdir=$($PKG_CONFIG --variable=udevdir udev)"/rules.d"])
|
||||
AC_SUBST([udevrulesdir], [$with_udevrulesdir])
|
||||
|
||||
PKG_CHECK_EXISTS(systemd, [], [AC_MSG_ERROR(systemd development libraries are required)])
|
||||
AC_ARG_WITH([systemdsystemunitdir],
|
||||
AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
|
||||
[],
|
||||
[with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)])
|
||||
if test x$with_systemdsystemunitdir != xno; then
|
||||
AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])
|
||||
fi
|
||||
|
||||
AC_ARG_ENABLE([gtk-tests],
|
||||
[AS_HELP_STRING([--disable-gtk-tests],[do not build GTK+ test tools])],
|
||||
[],[enable_gtk_tests=yes])
|
||||
if test x$enable_gtk_tests = xyes; then
|
||||
PKG_CHECK_MODULES(GTK_TESTS, gtk+-3.0)
|
||||
fi
|
||||
AM_CONDITIONAL(HAVE_GTK_TESTS, test "x$enable_gtk_tests" = "xyes")
|
||||
|
||||
PKG_CHECK_MODULES(IIO_SENSOR_PROXY, gio-2.0 glib-2.0 >= 2.56 gudev-1.0 >= 232)
|
||||
|
||||
AC_ARG_WITH(geoclue-user,
|
||||
AS_HELP_STRING([--with-geoclue-user=USER],
|
||||
[The USER (existing) as which geoclue service is running (default: geoclue)]),
|
||||
geoclue_user="$with_geoclue_user",
|
||||
geoclue_user="geoclue")
|
||||
AC_SUBST(geoclue_user)
|
||||
|
||||
AC_PATH_PROG([GDBUS_CODEGEN],[gdbus-codegen])
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
Makefile
|
||||
data/Makefile
|
||||
src/Makefile
|
||||
docs/Makefile
|
||||
docs/version.xml
|
||||
])
|
||||
AC_OUTPUT
|
@@ -1,17 +0,0 @@
|
||||
udevrules_DATA = 80-iio-sensor-proxy.rules
|
||||
|
||||
systemdservicedir = $(systemdsystemunitdir)
|
||||
systemdservice_in_files = iio-sensor-proxy.service.in
|
||||
systemdservice_DATA = iio-sensor-proxy.service
|
||||
iio-sensor-proxy.service: iio-sensor-proxy.service.in Makefile
|
||||
$(AM_V_GEN) $(SED) -e "s|\@sbindir\@|$(sbindir)|" $< > $@
|
||||
|
||||
dbusconfdir = $(sysconfdir)/dbus-1/system.d
|
||||
dbusconf_DATA = net.hadess.SensorProxy.conf
|
||||
|
||||
net.hadess.SensorProxy.conf: net.hadess.SensorProxy.conf.in Makefile
|
||||
@sed -e "s|\@geoclue_user\@|$(geoclue_user)|" $< > $@
|
||||
|
||||
|
||||
CLEANFILES = iio-sensor-proxy.service net.hadess.SensorProxy.conf
|
||||
EXTRA_DIST = $(udevrules_DATA) $(dbusconf_DATA) $(systemdservice_in_files) net.hadess.SensorProxy.conf.in
|
@@ -1,61 +0,0 @@
|
||||
NULL =
|
||||
|
||||
AUTOMAKE_OPTIONS = 1.7
|
||||
|
||||
# The name of the module.
|
||||
DOC_MODULE=iio-sensor-proxy
|
||||
|
||||
# The top-level SGML file.
|
||||
DOC_MAIN_SGML_FILE=iio-sensor-proxy-docs.xml
|
||||
|
||||
# Extra options to supply to gtkdoc-scan
|
||||
SCAN_OPTIONS= \
|
||||
--ignore-headers="config.h iio-sensor-proxy-resources.h drivers.h iio-buffer-utils.h orientation.h uinput.h" \
|
||||
--rebuild-sections --rebuild-types
|
||||
|
||||
# The directory containing the source code. Relative to $(srcdir)
|
||||
DOC_SOURCE_DIR=
|
||||
|
||||
# Used for dependencies
|
||||
HFILE_GLOB=
|
||||
CFILE_GLOB=
|
||||
|
||||
# Headers to ignore
|
||||
IGNORE_HFILES= \
|
||||
$(NULL)
|
||||
|
||||
GTKDOC_LIBS =
|
||||
|
||||
# Extra options to supply to gtkdoc-mkdb
|
||||
MKDB_OPTIONS=--sgml-mode --output-format=xml
|
||||
|
||||
docs-net.hadess.SensorProxy.xml: $(top_srcdir)/src/net.hadess.SensorProxy.xml
|
||||
$(AM_V_GEN)$(GDBUS_CODEGEN) --generate-docbook=docs $<
|
||||
|
||||
# Non-autogenerated SGML files to be included in $(DOC_MAIN_SGML_FILE)
|
||||
content_files = \
|
||||
version.xml \
|
||||
docs-net.hadess.SensorProxy.xml \
|
||||
$(NULL)
|
||||
|
||||
# FIXME
|
||||
MAINTAINERCLEANFILES = \
|
||||
*~ \
|
||||
Makefile.in \
|
||||
iio-sensor-proxy.types \
|
||||
iio-sensor-proxy-*.txt \
|
||||
$(NULL)
|
||||
|
||||
include $(top_srcdir)/gtk-doc.make
|
||||
|
||||
EXTRA_DIST = iio-sensor-proxy-docs.xml
|
||||
|
||||
CLEANFILES += \
|
||||
docs-net.hadess.SensorProxy.xml \
|
||||
docs-net.hadess.SensorProxy.Compass.xml \
|
||||
$(NULL)
|
||||
|
||||
# Version information for marking the documentation
|
||||
EXTRA_DIST += version.xml.in
|
||||
|
||||
-include $(top_srcdir)/git.mk
|
123
src/Makefile.am
123
src/Makefile.am
@@ -1,123 +0,0 @@
|
||||
BUILT_SOURCES = \
|
||||
iio-sensor-proxy-resources.c \
|
||||
iio-sensor-proxy-resources.h
|
||||
|
||||
resource_files = $(shell glib-compile-resources --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/iio-sensor-proxy.gresource.xml)
|
||||
iio-sensor-proxy-resources.c: iio-sensor-proxy.gresource.xml $(resource_files)
|
||||
$(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-source --c-name iio_sensor_proxy $<
|
||||
iio-sensor-proxy-resources.h: iio-sensor-proxy.gresource.xml $(resource_files)
|
||||
$(AM_V_GEN) glib-compile-resources --target=$@ --sourcedir=$(srcdir) --generate-header --c-name iio_sensor_proxy $<
|
||||
|
||||
sbin_PROGRAMS = iio-sensor-proxy
|
||||
|
||||
iio_sensor_proxy_SOURCES = \
|
||||
iio-sensor-proxy.c \
|
||||
drivers.c \
|
||||
drivers.h \
|
||||
orientation.c \
|
||||
orientation.h \
|
||||
drv-iio-buffer-accel.c \
|
||||
drv-iio-poll-accel.c \
|
||||
drv-iio-poll-proximity.c \
|
||||
drv-input-accel.c \
|
||||
drv-fake-compass.c \
|
||||
drv-fake-light.c \
|
||||
drv-iio-poll-light.c \
|
||||
drv-hwmon-light.c \
|
||||
drv-iio-buffer-light.c \
|
||||
drv-iio-buffer-compass.c \
|
||||
iio-buffer-utils.h \
|
||||
iio-buffer-utils.c \
|
||||
accel-mount-matrix.h \
|
||||
accel-mount-matrix.c \
|
||||
accel-attributes.h \
|
||||
accel-attributes.c \
|
||||
accel-scale.h \
|
||||
accel-scale.c \
|
||||
$(BUILT_SOURCES)
|
||||
|
||||
iio_sensor_proxy_CPPFLAGS = \
|
||||
$(IIO_SENSOR_PROXY_CFLAGS) \
|
||||
-D_GNU_SOURCE=1 \
|
||||
$(WARN_CFLAGS)
|
||||
iio_sensor_proxy_LDADD = $(IIO_SENSOR_PROXY_LIBS) $(LIBM)
|
||||
|
||||
noinst_PROGRAMS = fake-input-accelerometer test-mount-matrix test-accel-location test-orientation
|
||||
|
||||
fake_input_accelerometer_SOURCES = \
|
||||
fake-input-accelerometer.c \
|
||||
uinput.h
|
||||
|
||||
fake_input_accelerometer_CPPFLAGS = \
|
||||
$(IIO_SENSOR_PROXY_CFLAGS) \
|
||||
-D_GNU_SOURCE=1 \
|
||||
$(WARN_CFLAGS)
|
||||
fake_input_accelerometer_LDADD = $(IIO_SENSOR_PROXY_LIBS)
|
||||
|
||||
include $(top_srcdir)/Makefile.decl
|
||||
TEST_PROGS += test-mount-matrix test-accel-location test-orientation
|
||||
|
||||
test_mount_matrix_SOURCES = \
|
||||
test-mount-matrix.c \
|
||||
accel-mount-matrix.h \
|
||||
accel-mount-matrix.c
|
||||
|
||||
test_mount_matrix_CPPFLAGS = \
|
||||
$(IIO_SENSOR_PROXY_CFLAGS) \
|
||||
$(WARN_CFLAGS)
|
||||
test_mount_matrix_LDADD = $(IIO_SENSOR_PROXY_LIBS)
|
||||
|
||||
test_accel_location_SOURCES = \
|
||||
test-accel-location.c \
|
||||
accel-attributes.h \
|
||||
accel-attributes.c \
|
||||
accel-scale.h \
|
||||
accel-scale.c
|
||||
|
||||
test_accel_location_CPPFLAGS = \
|
||||
$(IIO_SENSOR_PROXY_CFLAGS) \
|
||||
$(WARN_CFLAGS)
|
||||
test_accel_location_LDADD = $(IIO_SENSOR_PROXY_LIBS)
|
||||
|
||||
test_orientation_SOURCES = \
|
||||
test-orientation.c \
|
||||
orientation.c \
|
||||
orientation.h \
|
||||
accel-mount-matrix.c \
|
||||
accel-mount-matrix.h \
|
||||
accel-scale.h \
|
||||
accel-scale.c
|
||||
|
||||
test_orientation_CPPFLAGS = \
|
||||
$(IIO_SENSOR_PROXY_CFLAGS) \
|
||||
$(WARN_CFLAGS)
|
||||
test_orientation_LDADD = $(IIO_SENSOR_PROXY_LIBS) $(LIBM)
|
||||
|
||||
if HAVE_GTK_TESTS
|
||||
noinst_PROGRAMS += test-orientation-gtk
|
||||
test_orientation_gtk_SOURCES = \
|
||||
test-orientation-gtk.c \
|
||||
orientation.c \
|
||||
orientation.h \
|
||||
accel-scale.h \
|
||||
accel-scale.c
|
||||
test_orientation_gtk_CPPFLAGS = \
|
||||
$(GTK_TESTS_CFLAGS) \
|
||||
$(WARN_CFLAGS)
|
||||
test_orientation_gtk_LDADD = $(GTK_TESTS_LIBS) $(LIBM)
|
||||
endif
|
||||
|
||||
bin_PROGRAMS = monitor-sensor
|
||||
|
||||
monitor_sensor_SOURCES = \
|
||||
monitor-sensor.c
|
||||
|
||||
monitor_sensor_CPPFLAGS = \
|
||||
$(IIO_SENSOR_PROXY_CFLAGS) \
|
||||
$(WARN_CFLAGS)
|
||||
monitor_sensor_LDADD = $(IIO_SENSOR_PROXY_LIBS)
|
||||
|
||||
EXTRA_DIST = \
|
||||
test-orientation-gtk.c \
|
||||
net.hadess.SensorProxy.xml \
|
||||
iio-sensor-proxy.gresource.xml
|
Reference in New Issue
Block a user