Commit 991e6879 authored by Marco Trevisan's avatar Marco Trevisan 🎺

build: Remove autotools support

parent a5c0a335
......@@ -19,34 +19,16 @@ stages:
libgtk-3-dev
libgtk-3-doc
libstartup-notification0-dev
libtool
libx11-dev
libxext-dev
libxres-dev
build:ubuntu:autogen:
<<: *base_build
before_script:
- *ubuntu_deps_install
- apt-get install -q -y --no-install-recommends
autoconf-archive
automake
autopoint
script:
- ./autogen.sh --enable-gtk-doc=yes
- make
- make distcheck
meson
ninja-build
build:ubuntu:meson:
<<: *base_build
before_script:
- *ubuntu_deps_install
- apt-get install -q -y --no-install-recommends
ninja-build
python3-pip
python3-setuptools
- pip3 install meson
script:
- meson _build -Dgtk_doc=true
- ninja -C _build
NULL =
SUBDIRS = libwnck doc po
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libwnck-3.0.pc
EXTRA_DIST = \
HACKING \
MAINTAINERS
MAINTAINERCLEANFILES = \
$(GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL) \
$(GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN) \
$(GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL) \
`find "$(srcdir)/m4" -type f -name "*.m4" -print` \
$(srcdir)/ABOUT-NLS \
$(srcdir)/INSTALL \
$(srcdir)/build-aux/config.rpath \
$(srcdir)/config.h.in~ \
$(srcdir)/configure \
$(srcdir)/gtk-doc.make \
$(srcdir)/po/Makefile.in.in \
$(srcdir)/po/Makevars.template \
$(srcdir)/po/Rules-quot \
$(srcdir)/po/boldquot.sed \
$(srcdir)/po/en@boldquot.header \
$(srcdir)/po/en@quot.header \
$(srcdir)/po/libwnck-3.0.pot \
$(srcdir)/po/insert-header.sin \
$(srcdir)/po/quot.sed \
$(srcdir)/po/remove-potcdate.sin \
$(srcdir)/po/stamp-po \
$(NULL)
CHANGELOG_GIT_RANGE = LIBWNCK_2_26_1..
dist-hook:
$(AM_V_GEN)if test -d "$(srcdir)/.git"; then \
( echo '# Generated by Makefile. Do not edit.'; echo; \
GIT_DIR="$(top_srcdir)/.git" ./missing --run \
git log $(CHANGELOG_GIT_RANGE) --no-color -M -C --name-status ) \
> ChangeLog.tmp \
&& mv -f ChangeLog.tmp $(distdir)/ChangeLog \
|| ( rm -f ChangeLog.tmp ; echo Failed to generate ChangeLog >&2 ); \
else \
echo A git checkout is required to generate ChangeLog >&2; \
fi
GITIGNOREFILES = $(PACKAGE)-\*.tar.{gz,bz2,xz}
-include $(top_srcdir)/git.mk
#!/bin/sh
# Run this to generate all the initial makefiles, etc.
srcdir=$(dirname "$0")
test -z "$srcdir" && srcdir=.
if [ ! -f $srcdir/configure.ac ]; then
echo "**Error**: Directory "\'$srcdir\'" does not look like the top-level" \
"project directory."
exit 1
fi
olddir=$(pwd)
cd "$srcdir"
PKG_NAME=$(autoconf --trace 'AC_INIT:$1' "$srcdir/configure.ac")
if [ "$#" = 0 ] && [ -z "$NOCONFIGURE" ]; 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 '$0'" \
"command line." >&2
fi
set -x
aclocal --install || exit 1
gtkdocize --copy || exit 1
autoreconf --verbose --force --install -Wno-portability || exit 1
{ set +x; } 2>/dev/null
cd "$olddir"
if [ -z "$NOCONFIGURE" ]; then
set -x
$srcdir/configure "$@" || exit 1
{ set +x; } 2>/dev/null
if [ "$1" = "--help" ]; then
exit 0
else
echo "Now type 'make' to compile $PKG_NAME." || exit 1
fi
else
echo "Skipping configure process."
fi
AC_PREREQ(2.62)
m4_define([wnck_major_version], [3])
m4_define([wnck_minor_version], [32])
m4_define([wnck_micro_version], [0])
m4_define([wnck_version],
[wnck_major_version.wnck_minor_version.wnck_micro_version])
AC_INIT([libwnck], [wnck_version],
[http://bugzilla.gnome.org/enter_bug.cgi?product=libwnck])
AX_IS_RELEASE([git-directory])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_HEADERS(config.h)
AM_INIT_AUTOMAKE([1.11 no-dist-gzip dist-xz tar-ustar])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
AC_CONFIG_MACRO_DIR([m4])
AX_CHECK_ENABLE_DEBUG([yes])
dnl libtool versioning for libwnck
dnl increment if the interface has additions, changes, removals.
LIBWNCK_CURRENT=3
dnl increment any time the source changes; set to
dnl 0 if you increment CURRENT
LIBWNCK_REVISION=0
dnl increment if any interfaces have been added; set to 0
dnl if any interfaces have been changed or removed. removal has
dnl precedence over adding, so set to 0 if both happened.
LIBWNCK_AGE=3
AC_SUBST(LIBWNCK_CURRENT)
AC_SUBST(LIBWNCK_REVISION)
AC_SUBST(LIBWNCK_AGE)
WNCK_MAJOR_VERSION=wnck_major_version
WNCK_MINOR_VERSION=wnck_minor_version
WNCK_MICRO_VERSION=wnck_micro_version
AC_SUBST(WNCK_MAJOR_VERSION)
AC_SUBST(WNCK_MINOR_VERSION)
AC_SUBST(WNCK_MICRO_VERSION)
LT_PREREQ([2.2.6])
LT_INIT([dlopen disable-static])
AC_PROG_CC
AX_COMPILER_FLAGS([WARN_CFLAGS], [WARN_LDFLAGS])
AC_ARG_ENABLE(deprecation_flags,
[AC_HELP_STRING([--enable-deprecation-flags],
[use *_DISABLE_DEPRECATED flags @<:@default=no@:>@])],,
[enable_deprecation_flags=no])
if test "x$enable_deprecation_flags" = "xyes"; then
DISABLE_DEPRECATED_CFLAGS=$DISABLE_DEPRECATED
AC_SUBST(DISABLE_DEPRECATED_CFLAGS)
fi
AC_ARG_ENABLE(tools,
[AC_HELP_STRING([--enable-tools],
[install wnck-based tools @<:@default=yes@:>@])],,
[enable_tools=yes])
AM_CONDITIONAL(ENABLE_TOOLS, test "x$enable_tools" != "xno")
AM_GNU_GETTEXT_VERSION([0.19.6])
AM_GNU_GETTEXT_REQUIRE_VERSION([0.19.6])
AM_GNU_GETTEXT([external])
GETTEXT_PACKAGE=libwnck-3.0
AC_SUBST(GETTEXT_PACKAGE)
AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Package name])
AC_PATH_PROG([GLIB_COMPILE_RESOURCES], [glib-compile-resources])
AC_PATH_PROG(PKG_CONFIG, pkg-config)
AC_CHECK_LIBM
AC_SUBST(LIBM)
AC_ARG_ENABLE(startup-notification,
[AC_HELP_STRING([--enable-startup-notification],
[startup notification library @<:@default=auto@:>@])],,
[enable_startup_notification=auto])
STARTUP_NOTIFICATION_PACKAGE=
if test "$enable_startup_notification" != "no"; then
STARTUP_NOTIFICATION_REQUIRED=0.4
PKG_CHECK_MODULES(STARTUP_NOTIFICATION,
[libstartup-notification-1.0 >= $STARTUP_NOTIFICATION_REQUIRED],
[have_sn=yes],
[have_sn=no])
if test "$have_sn" = "no" -a "$enable_start_notification" = "yes"; then
AC_MSG_ERROR([startup-notification support required but not found])
fi
if test "$have_sn" = "yes"; then
AC_DEFINE_UNQUOTED(HAVE_STARTUP_NOTIFICATION, 1, [Define if you have libstartup-notification])
STARTUP_NOTIFICATION_PACKAGE=libstartup-notification-1.0
fi
else
have_sn=no
fi
AC_SUBST(STARTUP_NOTIFICATION_PACKAGE)
PKG_CHECK_MODULES(XLIB, x11,
X11_PACKAGE=x11,
[X11_PACKAGE=
AC_PATH_XTRA
if test "x$no_x" = xyes; then
AC_MSG_ERROR("no (requires X development libraries)")
else
XLIB_LIBS="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS"
XLIB_CFLAGS=$X_CFLAGS
fi])
AC_SUBST(X11_PACKAGE)
PKG_CHECK_EXISTS([cairo-xlib-xrender],
[AC_DEFINE_UNQUOTED([HAVE_CAIRO_XLIB_XRENDER], [1],
[Define if building against cairo-xlib-xrender])
CAIRO_XLIB_XRENDER_PACKAGE=cairo-xlib-xrender])
AC_MSG_CHECKING([if building with X Resource Information Extension Library])
if $PKG_CONFIG xres; then
AC_MSG_RESULT([yes])
have_xres=yes
AC_DEFINE_UNQUOTED(HAVE_XRES, 1, [Define if you have the XRes library])
XRES_PACKAGE=xres
else
AC_CHECK_LIB(XRes, XResQueryExtension,
[XLIB_LIBS="$XLIB_LIBS -lXRes -lXext"
have_xres=yes
AC_DEFINE_UNQUOTED(HAVE_XRES, 1, [Define if you have the XRes library])
AC_MSG_RESULT([yes])],
[have_xres=no
AC_MSG_RESULT([no])],
$XLIB_LIBS -lXext)
XRES_PACKAGE=
fi
AC_SUBST(XRES_PACKAGE)
AC_SUBST(XLIB_CFLAGS)
AC_SUBST(XLIB_LIBS)
PKG_CHECK_MODULES([LIBWNCK],[
gtk+-3.0 >= 3.22.0
glib-2.0 >= 2.34
gobject-2.0 >= 2.13.0
$CAIRO_XLIB_XRENDER_PACKAGE
$STARTUP_NOTIFICATION_PACKAGE
$XRES_PACKAGE
])
##################################################
# Checks for gtk-doc and docbook-tools
##################################################
GTK_DOC_CHECK([1.9])
GOBJECT_INTROSPECTION_CHECK([0.6.14])
if test "$enable_introspection" = "yes"; then
# Redefine introspection dirs using proper prefixes
INTROSPECTION_GIRDIR=`$PKG_CONFIG --define-variable=datadir=${datadir} --variable=girdir gobject-introspection-1.0`
AC_SUBST(INTROSPECTION_GIRDIR)
INTROSPECTION_TYPELIBDIR=`$PKG_CONFIG --define-variable=libdir=${libdir} --variable=typelibdir gobject-introspection-1.0`
AC_SUBST(INTROSPECTION_TYPELIBDIR)
fi
AC_OUTPUT([
Makefile
doc/Makefile
po/Makefile.in
libwnck/Makefile
libwnck/version.h
libwnck-3.0.pc
libwnck-3.0-uninstalled.pc
])
dnl ---------------------------------------------------------------------------
dnl - Show summary
dnl ---------------------------------------------------------------------------
echo "
libwnck $VERSION
`echo libwnck $VERSION | sed "s/./=/g"`
prefix: ${prefix}
exec_prefix: ${exec_prefix}
libdir: ${libdir}
bindir: ${bindir}
sbindir: ${sbindir}
sysconfdir: ${sysconfdir}
localstatedir: ${localstatedir}
datadir: ${datadir}
source code location: ${srcdir}
compiler: ${CC}
cflags: ${CFLAGS}
Maintainer mode: ${USE_MAINTAINER_MODE}
Use *_DISABLE_DEPRECATED: ${enable_deprecation_flags}
Startup notification support: ${have_sn}
XRes support: ${have_xres}
Build introspection support: ${found_introspection}
Build gtk-doc documentation: ${enable_gtk_doc}
Install wnck-based tools: ${enable_tools}
"
## Process this file with automake to produce Makefile.in
# The name of the module.
DOC_MODULE=libwnck
DOC_MODULE_VERSION=3.0
# The top-level SGML file.
DOC_MAIN_SGML_FILE=libwnck-docs.sgml
# The directory containing the source code. Relative to $(srcdir)
DOC_SOURCE_DIR=../libwnck
# Extra options to pass to gtkdoc-scangobj
SCANGOBJ_OPTIONS=
# Extra options to supply to gtkdoc-scan
SCAN_OPTIONS=--deprecated-guards="WNCK_DISABLE_DEPRECATED"
# Extra options to supply to gtkdoc-mkdb
MKDB_OPTIONS=--sgml-mode --output-format=xml
# Extra options to supply to gtkdoc-fixref
FIXXREF_OPTIONS=
# Used for dependencies
HFILE_GLOB=$(top_srcdir)/libwnck/*.h
CFILE_GLOB=$(top_srcdir)/libwnck/*.c
# Header files to ignore when scanning
IGNORE_HFILES=
EXTRA_HFILES =
# Images to copy into HTML directory
HTML_IMAGES =
# Extra SGML files that are included by $(DOC_MAIN_SGML_FILE)
content_files = example-force-update.c example-lazy-initialization.c
# Other files to distribute
extra_files =
# CFLAGS and LDFLAGS for compiling scan program. Only needed
# if $(DOC_MODULE).types is non-empty.
GTKDOC_CFLAGS = -I$(top_builddir) -I$(top_srcdir) $(LIBWNCK_CFLAGS) -DWNCK_I_KNOW_THIS_IS_UNSTABLE -DWNCK_COMPILATION
GTKDOC_LIBS = $(top_builddir)/libwnck/libwnck-3.la $(LIBWNCK_LIBS)
include $(top_srcdir)/gtk-doc.make
CLEANFILES += gsf-scan.*
.PHONY : dist-hook-local
-include $(top_srcdir)/git.mk
# git.mk, a small Makefile to autogenerate .gitignore files
# for autotools-based projects.
#
# Copyright 2009, Red Hat, Inc.
# Copyright 2010,2011,2012,2013 Behdad Esfahbod
# Written by Behdad Esfahbod
#
# Copying and distribution of this file, with or without modification,
# is permitted in any medium without royalty provided the copyright
# notice and this notice are preserved.
#
# The latest version of this file can be downloaded from:
GIT_MK_URL = https://raw.githubusercontent.com/behdad/git.mk/master/git.mk
#
# Bugs, etc, should be reported upstream at:
# https://github.com/behdad/git.mk
#
# To use in your project, import this file in your git repo's toplevel,
# then do "make -f git.mk". This modifies all Makefile.am files in
# your project to -include git.mk. Remember to add that line to new
# Makefile.am files you create in your project, or just rerun the
# "make -f git.mk".
#
# This enables automatic .gitignore generation. If you need to ignore
# more files, add them to the GITIGNOREFILES variable in your Makefile.am.
# But think twice before doing that. If a file has to be in .gitignore,
# chances are very high that it's a generated file and should be in one
# of MOSTLYCLEANFILES, CLEANFILES, DISTCLEANFILES, or MAINTAINERCLEANFILES.
#
# The only case that you need to manually add a file to GITIGNOREFILES is
# when remove files in one of mostlyclean-local, clean-local, distclean-local,
# or maintainer-clean-local make targets.
#
# Note that for files like editor backup, etc, there are better places to
# ignore them. See "man gitignore".
#
# If "make maintainer-clean" removes the files but they are not recognized
# by this script (that is, if "git status" shows untracked files still), send
# me the output of "git status" as well as your Makefile.am and Makefile for
# the directories involved and I'll diagnose.
#
# For a list of toplevel files that should be in MAINTAINERCLEANFILES, see
# Makefile.am.sample in the git.mk git repo.
#
# Don't EXTRA_DIST this file. It is supposed to only live in git clones,
# not tarballs. It serves no useful purpose in tarballs and clutters the
# build dir.
#
# This file knows how to handle autoconf, automake, libtool, gtk-doc,
# gnome-doc-utils, yelp.m4, mallard, intltool, gsettings, dejagnu, appdata,
# appstream, hotdoc.
#
# This makefile provides the following targets:
#
# - all: "make all" will build all gitignore files.
# - gitignore: makes all gitignore files in the current dir and subdirs.
# - .gitignore: make gitignore file for the current dir.
# - gitignore-recurse: makes all gitignore files in the subdirs.
#
# KNOWN ISSUES:
#
# - Recursive configure doesn't work as $(top_srcdir)/git.mk inside the
# submodule doesn't find us. If you have configure.{in,ac} files in
# subdirs, add a proxy git.mk file in those dirs that simply does:
# "include $(top_srcdir)/../git.mk". Add more ..'s to your taste.
# And add those files to git. See vte/gnome-pty-helper/git.mk for
# example.
#
###############################################################################
# Variables user modules may want to add to toplevel MAINTAINERCLEANFILES:
###############################################################################
#
# Most autotools-using modules should be fine including this variable in their
# toplevel MAINTAINERCLEANFILES:
GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL = \
$(srcdir)/aclocal.m4 \
$(srcdir)/autoscan.log \
$(srcdir)/configure.scan \
`AUX_DIR=$(srcdir)/$$(cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_AUX_DIR:$$1' ./configure.ac); \
test "x$$AUX_DIR" = "x$(srcdir)/" && AUX_DIR=$(srcdir); \
for x in \
ar-lib \
compile \
config.guess \
config.rpath \
config.sub \
depcomp \
install-sh \
ltmain.sh \
missing \
mkinstalldirs \
test-driver \
ylwrap \
; do echo "$$AUX_DIR/$$x"; done` \
`cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_HEADERS:$$1' ./configure.ac | \
head -n 1 | while read f; do echo "$(srcdir)/$$f.in"; done`
#
# All modules should also be fine including the following variable, which
# removes automake-generated Makefile.in files:
GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN = \
`cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_FILES:$$1' ./configure.ac | \
while read f; do \
case $$f in Makefile|*/Makefile) \
test -f "$(srcdir)/$$f.am" && echo "$(srcdir)/$$f.in";; esac; \
done`
#
# Modules that use libtool and use AC_CONFIG_MACRO_DIR() may also include this,
# though it's harmless to include regardless.
GITIGNORE_MAINTAINERCLEANFILES_M4_LIBTOOL = \
`MACRO_DIR=$(srcdir)/$$(cd $(top_srcdir); $(AUTOCONF) --trace 'AC_CONFIG_MACRO_DIR:$$1' ./configure.ac); \
if test "x$$MACRO_DIR" != "x$(srcdir)/"; then \
for x in \
libtool.m4 \
ltoptions.m4 \
ltsugar.m4 \
ltversion.m4 \
lt~obsolete.m4 \
; do echo "$$MACRO_DIR/$$x"; done; \
fi`
###############################################################################
# Default rule is to install ourselves in all Makefile.am files:
###############################################################################
git-all: git-mk-install
git-mk-install:
@echo "Installing git makefile"
@any_failed=; \
find "`test -z "$(top_srcdir)" && echo . || echo "$(top_srcdir)"`" -name Makefile.am | while read x; do \
if grep 'include .*/git.mk' $$x >/dev/null; then \
echo "$$x already includes git.mk"; \
else \
failed=; \
echo "Updating $$x"; \
{ cat $$x; \
echo ''; \
echo '-include $$(top_srcdir)/git.mk'; \
} > $$x.tmp || failed=1; \
if test x$$failed = x; then \
mv $$x.tmp $$x || failed=1; \
fi; \
if test x$$failed = x; then : else \
echo "Failed updating $$x"; >&2 \
any_failed=1; \
fi; \
fi; done; test -z "$$any_failed"
git-mk-update:
wget $(GIT_MK_URL) -O $(top_srcdir)/git.mk
.PHONY: git-all git-mk-install git-mk-update
###############################################################################
# Actual .gitignore generation:
###############################################################################
$(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
@echo "git.mk: Generating $@"
@{ \
if test "x$(DOC_MODULE)" = x -o "x$(DOC_MAIN_SGML_FILE)" = x; then :; else \
for x in \
$(DOC_MODULE)-decl-list.txt \
$(DOC_MODULE)-decl.txt \
tmpl/$(DOC_MODULE)-unused.sgml \
"tmpl/*.bak" \
$(REPORT_FILES) \
$(DOC_MODULE).pdf \
xml html \
; do echo "/$$x"; done; \
FLAVOR=$$(cd $(top_srcdir); $(AUTOCONF) --trace 'GTK_DOC_CHECK:$$2' ./configure.ac); \
case $$FLAVOR in *no-tmpl*) echo /tmpl;; esac; \
if echo "$(SCAN_OPTIONS)" | grep -q "\-\-rebuild-types"; then \
echo "/$(DOC_MODULE).types"; \
fi; \
if echo "$(SCAN_OPTIONS)" | grep -q "\-\-rebuild-sections"; then \
echo "/$(DOC_MODULE)-sections.txt"; \
fi; \
if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \
for x in \
$(SETUP_FILES) \
$(DOC_MODULE).types \
; do echo "/$$x"; done; \
fi; \
fi; \
if test "x$(DOC_MODULE)$(DOC_ID)" = x -o "x$(DOC_LINGUAS)" = x; then :; else \
for lc in $(DOC_LINGUAS); do \
for x in \
$(if $(DOC_MODULE),$(DOC_MODULE).xml) \
$(DOC_PAGES) \
$(DOC_INCLUDES) \
; do echo "/$$lc/$$x"; done; \
done; \
for x in \
$(_DOC_OMF_ALL) \
$(_DOC_DSK_ALL) \
$(_DOC_HTML_ALL) \
$(_DOC_MOFILES) \
$(DOC_H_FILE) \
"*/.xml2po.mo" \
"*/*.omf.out" \
; do echo /$$x; done; \
fi; \
if test "x$(HOTDOC)" = x; then :; else \
$(foreach project, $(HOTDOC_PROJECTS),echo "/$(call HOTDOC_TARGET,$(project))"; \
echo "/$(shell $(call HOTDOC_PROJECT_COMMAND,$(project)) --get-conf-path output)" ; \
echo "/$(shell $(call HOTDOC_PROJECT_COMMAND,$(project)) --get-private-folder)" ; \
) \
for x in \
.hotdoc.d \
; do echo "/$$x"; done; \
fi; \
if test "x$(HELP_ID)" = x -o "x$(HELP_LINGUAS)" = x; then :; else \
for lc in $(HELP_LINGUAS); do \
for x in \
$(HELP_FILES) \
"$$lc.stamp" \
"$$lc.mo" \
; do echo "/$$lc/$$x"; done; \
done; \
fi; \
if test "x$(gsettings_SCHEMAS)" = x; then :; else \
for x in \
$(gsettings_SCHEMAS:.xml=.valid) \
$(gsettings__enum_file) \
; do echo "/$$x"; done; \
fi; \
if test "x$(appdata_XML)" = x; then :; else \
for x in \
$(appdata_XML:.xml=.valid) \
; do echo "/$$x"; done; \
fi; \
if test "x$(appstream_XML)" = x; then :; else \
for x in \
$(appstream_XML:.xml=.valid) \