diff options
author | Peter Hutterer <peter.hutterer@who-t.net> | 2021-12-02 11:19:49 +1000 |
---|---|---|
committer | Peter Hutterer <peter.hutterer@who-t.net> | 2021-12-13 08:58:26 +1000 |
commit | 67f24d60dbd6cf20fa99ee635afa560678f1b710 (patch) | |
tree | 1253a583d035e2a8d655d82bcc2f10a55f4e97e4 | |
parent | 395ad7a1d2cb49cdee30a392b1661232cd0f9b0c (diff) | |
download | libwacom-67f24d60dbd6cf20fa99ee635afa560678f1b710.tar.gz |
Remove autotools, it's meson only now
This allows us to drop the .gitignore file as well since meson doesn't
dirty the git tree.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
-rw-r--r-- | .github/workflows/main.yml | 86 | ||||
-rw-r--r-- | .gitignore | 43 | ||||
-rw-r--r-- | Makefile.am | 23 | ||||
-rw-r--r-- | configure.ac | 58 | ||||
-rw-r--r-- | doc/Makefile.am | 23 | ||||
-rw-r--r-- | libwacom/Makefile.am | 31 | ||||
-rw-r--r-- | meson.build | 2 | ||||
-rwxr-xr-x | run-full-test.sh | 31 | ||||
-rw-r--r-- | test/Makefile.am | 50 | ||||
-rw-r--r-- | tools/Makefile.am | 45 | ||||
-rwxr-xr-x | tools/libwacom-update-db.py | 2 |
11 files changed, 19 insertions, 375 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2a2b080..211e3a0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -8,57 +8,7 @@ env: PIP_PACKAGES: meson ninja libevdev pyudev pytest yq jobs: - ### - # - # autotools build job - # - autotools: - runs-on: ubuntu-20.04 - strategy: - matrix: - compiler: - - gcc - - clang - make_args: - - distcheck - steps: - - uses: actions/checkout@v2 - - uses: ./.github/actions/pkginstall - with: - apt: $UBUNTU_PACKAGES - - name: autotools make ${{matrix.make_args}} - run: | - mkdir _build && pushd _build > /dev/null - ../autogen.sh --disable-silent-rules - make - make ${{matrix.make_args}} - popd > /dev/null - env: - CC: ${{matrix.compiler}} - - name: capture build logs - uses: actions/upload-artifact@v2 - if: ${{ always() }} # even if we fail - with: - name: autotools test logs - path: | - _build/config.log - _build/test-suite.log - # And for the distcheck job, let's save the tarball for later use - - name: move tarballs to top level - if: matrix.make_args == 'distcheck' - run: mv _build/libwacom-*tar.* . - - name: capture tarball from distcheck - uses: actions/upload-artifact@v2 - if: matrix.make_args == 'distcheck' - with: - name: tarball - path: libwacom-*.tar.bz2 - - ### - # - # meson build job - # - meson: + build-and-dist: runs-on: ubuntu-20.04 strategy: matrix: @@ -86,6 +36,11 @@ jobs: meson_args: ${{matrix.meson_options}} env: CC: ${{matrix.compiler}} + # create the tarball + - name: meson dist + uses: ./.github/actions/meson + with: + ninja_args: dist # Capture all the meson logs, even if we failed - uses: actions/upload-artifact@v2 if: ${{ always() }} # even if we fail @@ -94,6 +49,13 @@ jobs: path: | builddir/meson-logs/testlog*.txt builddir/meson-logs/meson-log.txt + # move the tarball to the top level + - name: move tarballs to top level + run: mv builddir/meson-dist/libwacom-*tar.xz . + - uses: actions/upload-artifact@v2 + with: + name: tarball + path: libwacom-*tar.xz ### # # valgrind run @@ -129,7 +91,7 @@ jobs: #### # /etc/ loading check etcdir: - needs: meson + needs: build-and-dist runs-on: ubuntu-20.04 strategy: matrix: @@ -175,7 +137,7 @@ jobs: #### # duplicate device check duplicate-devices: - needs: meson + needs: build-and-dist runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 @@ -223,13 +185,8 @@ jobs: # tarball verification # build-from-tarball: - needs: autotools + needs: build-and-dist runs-on: ubuntu-20.04 - strategy: - matrix: - buildtool: - - meson - - autotools env: TARBALLDIR: '_tarball_dir' INSTALLDIR: '/tmp/libwacom/_inst' @@ -250,20 +207,11 @@ jobs: - name: extract tarball run: | mkdir -p "$TARBALLDIR" - tar xf libwacom-*.tar.bz2 -C "$TARBALLDIR" + tar xf libwacom-*.tar.xz -C "$TARBALLDIR" - run: mkdir -p "$INSTALLDIR" - # The next jobs are conditional on the buildtool, - # it's the easiest way to save on duplication - name: build from tarball with meson - if: matrix.buildtool == 'meson' uses: ./.github/actions/meson with: srcdir: $TARBALLDIR/libwacom-*/ meson_args: --prefix="$INSTALLDIR" ninja_args: test install - - name: build from tarball with autotools - if: matrix.buildtool == 'autotools' - run: | - pushd "$TARBALLDIR"/libwacom-*/ - ./autogen.sh --disable-silent-rules --prefix="$INSTALLDIR" - make && make install diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 11ab092..0000000 --- a/.gitignore +++ /dev/null @@ -1,43 +0,0 @@ -INSTALL -Makefile -Makefile.in -aclocal.m4 -autom4te.cache -config.guess -config.h -config.h.in -config.log -config.status -config.sub -configure -install-sh -missing -depcomp -doc/html -doc/latex -ltmain.sh -libtool -stamp-h1 -*.pc -*.o -*.lo -*.la -*.swp -*.trs -*.log -.deps -.libs -test-driver -test/test-load -test/test-tablet-svg-validity -test/test-dbverify -test/test-deprecated -test/test-tablet-validity -test/test-stylus-validity -test/test-soname -tools/show-svg-image -tools/generate-udev-rules -tools/libwacom-list-local-devices -tools/list-devices -tools/list-compatible-styli -doc/doxygen.conf diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index f9488c1..0000000 --- a/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -SUBDIRS = libwacom doc test tools - -libwacomtabletdir = $(datadir)/libwacom -tablet_files = $(shell cd $(top_srcdir)/data; printf 'data/%s\n' *.tablet) -dist_libwacomtablet_DATA = $(tablet_files) - -libwacomstylusdir = $(datadir)/libwacom -stylus_files = $(shell cd $(top_srcdir)/data; printf 'data/%s\n' *.stylus) -dist_libwacomstylus_DATA = $(stylus_files) - -libwacomlayoutsdir = $(datadir)/libwacom/layouts -layouts = $(shell cd $(top_srcdir)/data/layouts; printf 'data/layouts/%s\n' *.svg) -dist_libwacomlayouts_DATA = $(layouts) - -EXTRA_DIST = \ - data/wacom.example \ - $(NULL) - - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libwacom.pc - -EXTRA_DIST = libwacom.pc.in NEWS README.md meson.build meson_options.txt autogen.sh diff --git a/configure.ac b/configure.ac deleted file mode 100644 index b9ccf17..0000000 --- a/configure.ac +++ /dev/null @@ -1,58 +0,0 @@ -# Initialize Autoconf -AC_PREREQ([2.60]) -AC_INIT([libwacom], [1.12]) # change meson.build as well -AC_CONFIG_HEADERS([config.h]) - -# Initialize Automake -AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip check-news]) -AM_MAINTAINER_MODE([enable]) - -# Enable silent build when available (Automake 1.11) -m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) - -# Do not modify this, use symbol versioning instead. -LIBWACOM_LT_VERSION=9:0:0 -AC_SUBST(LIBWACOM_LT_VERSION) - -# Initialize libtool -LT_INIT([disable-static]) - -# Checks for programs. -AC_PROG_CC -AC_PROG_CC_C99 -AC_PROG_INSTALL -AM_PATH_PYTHON([3]) -PKG_PROG_PKG_CONFIG - -AC_CHECK_PROG(HAVE_DOXYGEN, [doxygen], [yes], [no]) -AM_CONDITIONAL(HAVE_DOXYGEN, test "x$HAVE_DOXYGEN" = xyes) - -AC_CHECK_LIB([dl], [dlsym]) -AC_SUBST(DL_LIBS) - -PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.36] gudev-1.0) - -PKG_CHECK_MODULES(LIBXML, libxml-2.0 glib-2.0, HAVE_LIBXML="yes", HAVE_LIBXML="no") -AM_CONDITIONAL(HAVE_LIBXML, test x$HAVE_LIBXML = xyes) - -udev_dir_default="$libdir/udev" -AC_ARG_WITH(udev-dir, - AS_HELP_STRING([--with-udev-dir=DIR], - [udev base directory [[default=$udev_dir_default]]]), - [], - [with_udev_dir="yes"]) -AS_CASE($with_udev_dir, - [no|""], [AC_MSG_ERROR([You must define a udev base directory])], - [yes], [udevdir="$udev_dir_default"], - [udevdir="$with_udev_dir"]) -UDEV_DIR=${udevdir} -AC_SUBST(UDEV_DIR) - -AC_CONFIG_FILES([Makefile - doc/Makefile - test/Makefile - tools/Makefile - tools/65-libwacom.rules - libwacom/Makefile - libwacom.pc]) -AC_OUTPUT diff --git a/doc/Makefile.am b/doc/Makefile.am deleted file mode 100644 index d082831..0000000 --- a/doc/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -EXTRA_DIST = doxygen.conf.in - -if HAVE_DOXYGEN -EXTRA_DIST += html - -all-local: doxygen - -doxygen.conf: doxygen.conf.in - $(AM_V_GEN) sed -e "s|\@TOPSRCDIR\@|$(top_srcdir)|" $< > $@ - -doxygen: $(top_srcdir)/libwacom/libwacom.h doxygen.conf - $(AM_V_GEN) doxygen $(builddir)/doxygen.conf - -html: doxygen - -clean-local: - rm -rf html - -CLEANFILES = doxygen.conf - -.PHONY: doxygen -endif - diff --git a/libwacom/Makefile.am b/libwacom/Makefile.am deleted file mode 100644 index b6b18ec..0000000 --- a/libwacom/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -lib_LTLIBRARIES=libwacom.la - -AM_CPPFLAGS = \ - -DDATADIR="\"$(datadir)/libwacom\"" \ - -DETCDIR="\"$(sysconfdir)/libwacom\"" \ - -DG_LOG_DOMAIN="\"$(PACKAGE)\"" \ - -I$(top_srcdir)/include \ - -fvisibility=hidden - -libwacom_la_SOURCES = \ - $(top_srcdir)/include/linux/input-event-codes.h \ - libwacom.h \ - libwacomint.h \ - util-strings.h \ - libwacom.c \ - libwacom-error.c \ - libwacom-database.c \ - $(NULL) - -libwacom_la_LIBADD = $(GLIB_LIBS) -libwacom_la_CFLAGS = $(AM_CPPFLAGS) $(GLIB_CFLAGS) - -libwacom_la_LDFLAGS = \ - -version-info $(LIBWACOM_LT_VERSION) \ - -Wl,--version-script="$(srcdir)/libwacom.sym" \ - $(NULL) - -libwacomincludedir = $(includedir)/libwacom-1.0/libwacom/ -libwacominclude_HEADERS = libwacom.h - -EXTRA_DIST = libwacom.sym diff --git a/meson.build b/meson.build index 912f747..82385fd 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project('libwacom', 'c', - version: '1.12', # change configure.ac as well + version: '1.12', license: 'MIT/Expat', default_options: [ 'c_std=gnu99', 'warning_level=2' ], meson_version: '>= 0.51.0') diff --git a/run-full-test.sh b/run-full-test.sh index 17c1223..28c9718 100755 --- a/run-full-test.sh +++ b/run-full-test.sh @@ -26,36 +26,5 @@ echo "####################################### running scan-build" meson configure $builddir -Db_sanitize=none ninja -C $builddir scan-build -echo "####################################### running make distcheck" - -# we can't configure with a custom sourcetree if we have run configure -# previously. So let's only do this where we have a clean tree that we can -# clone. -if git diff --exit-code -s; then - unset GIT_WORK_TREE - mkdir -p "$builddir/autotools/build" - mkdir -p "$builddir/autotools/inst" - pushd "$builddir/autotools" > /dev/null - git clone ../.. "src" - pushd src > /dev/null - autoreconf -ivf - popd - pushd build > /dev/null - ../src/configure --prefix=$PWD/../inst/ - make && make check - make install - make distcheck - echo "############### running meson off tarball" - mkdir -p _tarball_dir - tar xf libwacom-*.tar.bz2 -C _tarball_dir - pushd _tarball_dir/libwacom-*/ > /dev/null - meson $builddir && ninja -C $builddir test - popd > /dev/null - popd > /dev/null - popd > /dev/null -else - echo "local changes present, skipping make distcheck" -fi - echo "######## Success. Removing builddir #########" rm -rf "$buildir" diff --git a/test/Makefile.am b/test/Makefile.am deleted file mode 100644 index afbf10b..0000000 --- a/test/Makefile.am +++ /dev/null @@ -1,50 +0,0 @@ -noinst_PROGRAMS= \ - test-load \ - test-dbverify \ - test-tablet-validity \ - test-stylus-validity \ - test-ltversion \ - $(NULL) - -TESTS=$(noinst_PROGRAMS) - -AM_CPPFLAGS= \ - -I$(top_srcdir)/libwacom \ - -I$(top_srcdir)/include \ - -DTOPSRCDIR="\"$(abs_top_srcdir)\"" - -test_load_SOURCES = test-load.c -test_load_LDADD=$(top_builddir)/libwacom/libwacom.la $(GLIB_LIBS) -test_load_LDFLAGS = -no-install -test_load_CFLAGS=$(AM_CFLAGS) $(GLIB_CFLAGS) -test_dbverify_SOURCES = test-dbverify.c -test_dbverify_LDADD=$(top_builddir)/libwacom/libwacom.la $(GLIB_LIBS) -test_dbverify_LDFLAGS = -no-install -test_dbverify_CFLAGS=$(AM_CFLAGS) $(GLIB_CFLAGS) -test_tablet_validity_SOURCES = test-tablet-validity.c -test_tablet_validity_LDADD=$(top_builddir)/libwacom/libwacom.la $(GLIB_LIBS) -test_tablet_validity_LDFLAGS = -no-install -test_tablet_validity_CFLAGS = $(AM_CFLAGS) $(GLIB_CFLAGS) -test_stylus_validity_SOURCES = test-stylus-validity.c -test_stylus_validity_LDADD=$(top_builddir)/libwacom/libwacom.la $(GLIB_LIBS) -test_stylus_validity_LDFLAGS = -no-install -test_stylus_validity_CFLAGS = $(AM_CFLAGS) $(GLIB_CFLAGS) -test_ltversion_SOURCES = test-ltversion.c -test_ltversion_CFLAGS = $(AM_CFLAGS) -DLIBWACOM_LT_VERSION="\"$(LIBWACOM_LT_VERSION)\"" -test_deprecated_SOURCES = test-deprecated.c -test_deprecated_LDADD=$(top_builddir)/libwacom/libwacom.la $(DL_LIBS) -test_deprecated_LDFLAGS = -no-install - -if HAVE_LIBXML -noinst_PROGRAMS += test-tablet-svg-validity -test_tablet_svg_validity_SOURCES = test-tablet-svg-validity.c -test_tablet_svg_validity_LDADD = $(top_builddir)/libwacom/libwacom.la $(LIBXML_LIBS) -test_tablet_svg_validity_LDFLAGS = -no-install -test_tablet_svg_validity_CFLAGS = $(LIBXML_CFLAGS) -endif - -noinst_SCRIPTS = check-files-in-git.sh test_data_files.py -EXTRA_DIST = $(noinst_SCRIPTS) - -AM_TESTS_ENVIRONMENT=top_srcdir="$(abs_top_srcdir)"; export top_srcdir; -TESTS = $(noinst_SCRIPTS) diff --git a/tools/Makefile.am b/tools/Makefile.am deleted file mode 100644 index b7d9fef..0000000 --- a/tools/Makefile.am +++ /dev/null @@ -1,45 +0,0 @@ -AM_CPPFLAGS=-I$(top_srcdir)/libwacom - -DBPATH_CFLAGS=-DDATABASEPATH="\"$(abs_top_srcdir)/data\"" - -noinst_PROGRAMS = list-devices list-compatible-styli -list_devices_SOURCES = list-devices.c -list_devices_LDADD=$(top_builddir)/libwacom/libwacom.la $(GLIB_LIBS) -list_devices_CFLAGS=$(GLIB_CFLAGS) $(DBPATH_CFLAGS) - -list_compatible_styli_SOURCES = list-compatible-styli.c -list_compatible_styli_LDADD=$(top_builddir)/libwacom/libwacom.la -list_compatible_styli_CFLAGS=$(DBPATH_CFLAGS) - -bin_PROGRAMS = libwacom-list-local-devices libwacom-list-devices - -libwacom_list_devices_SOURCES = list-devices.c -libwacom_list_devices_LDADD=$(top_builddir)/libwacom/libwacom.la $(GLIB_LIBS) -libwacom_list_devices_CFLAGS=$(GLIB_CFLAGS) - -libwacom_list_local_devices_SOURCES = list-local-devices.c -libwacom_list_local_devices_LDADD=$(top_builddir)/libwacom/libwacom.la $(GLIB_LIBS) -libwacom_list_local_devices_CFLAGS=$(GLIB_CFLAGS) - -dist_man1_MANS = libwacom-list-local-devices.man libwacom-list-devices.man - -rules = 65-libwacom.rules -udev_rulesdir=$(UDEV_DIR)/rules.d -dist_udev_rules_DATA = $(rules) - -hwdb = 65-libwacom.hwdb -udev_hwdbdir=$(UDEV_DIR)/hwdb.d -dist_udev_hwdb_DATA = $(hwdb) - -$(hwdb): libwacom-update-db - $(PYTHON) $(builddir)/libwacom-update-db --buildsystem-mode $(abs_top_srcdir)/data > $@ - -bin_SCRIPTS = libwacom-show-stylus libwacom-update-db -libwacom-show-stylus: show-stylus.py - sed -e 's|@DATADIR@|$(datadir)/libwacom|' -e 's|@ETCDIR@|$(sysconfdir)/libwacom|' $< > $@ - -libwacom-update-db: libwacom-update-db.py - cp $< $@ - -CLEANFILES = $(hwdb) $(bin_SCRIPTS) -EXTRA_DIST = $(rules) $(hwdb) show-stylus.py libwacom-update-db.py diff --git a/tools/libwacom-update-db.py b/tools/libwacom-update-db.py index dddcc7d..54298cf 100755 --- a/tools/libwacom-update-db.py +++ b/tools/libwacom-update-db.py @@ -192,7 +192,7 @@ if __name__ == "__main__": "path", nargs="?", type=Path, default='/etc/libwacom', help="Directory to load .tablet files from" ) - # buildsystem-mode is what we use from meson/autotools, it changes the + # buildsystem-mode is what we use from meson, it changes the # the behavior to just generate the file and print it parser.add_argument( "--buildsystem-mode", |