Blame Makefile.am

rpm-build 0fba15
# Copyright (C) 2011 Colin Walters <walters@verbum.org>
rpm-build 0fba15
#
rpm-build 0fba15
# SPDX-License-Identifier: LGPL-2.0+
rpm-build 0fba15
#
rpm-build 0fba15
# This library is free software; you can redistribute it and/or
rpm-build 0fba15
# modify it under the terms of the GNU Lesser General Public
rpm-build 0fba15
# License as published by the Free Software Foundation; either
rpm-build 0fba15
# version 2 of the License, or (at your option) any later version.
rpm-build 0fba15
#
rpm-build 0fba15
# This library is distributed in the hope that it will be useful,
rpm-build 0fba15
# but WITHOUT ANY WARRANTY; without even the implied warranty of
rpm-build 0fba15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
rpm-build 0fba15
# Lesser General Public License for more details.
rpm-build 0fba15
#
rpm-build 0fba15
# You should have received a copy of the GNU Lesser General Public
rpm-build 0fba15
# License along with this library; if not, write to the
rpm-build 0fba15
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
rpm-build 0fba15
# Boston, MA 02111-1307, USA.
rpm-build 0fba15
rpm-build 0fba15
include Makefile-decls.am
rpm-build 0fba15
rpm-build 0fba15
shortened_sysconfdir = $$(echo "$(sysconfdir)" | sed -e 's|^$(prefix)||' -e 's|^/||')
rpm-build 0fba15
rpm-build 0fba15
OSTREE_GITREV=$(shell cd $(srcdir) && if command -v git >/dev/null 2>&1 && test -d .git; then git describe --abbrev=42 --tags --always HEAD; fi)
rpm-build 0fba15
rpm-build 0fba15
ACLOCAL_AMFLAGS = -I buildutil -I libglnx ${ACLOCAL_FLAGS}
rpm-build 0fba15
AM_CPPFLAGS += -DDATADIR='"$(datadir)"' -DLIBEXECDIR='"$(libexecdir)"' \
rpm-build 0fba15
	-DLOCALEDIR=\"$(datadir)/locale\" -DSYSCONFDIR=\"$(sysconfdir)\" \
rpm-build 0fba15
	-DTARGET_PREFIX='"$(prefix)"' -DSHORTENED_SYSCONFDIR=\"$(shortened_sysconfdir)\" \
rpm-build 0fba15
	-DOSTREE_FEATURES='"$(OSTREE_FEATURES)"' \
rpm-build 0fba15
	-DOSTREE_COMPILATION \
rpm-build 0fba15
	-DG_LOG_DOMAIN=\"OSTree\" \
rpm-build 0fba15
  -DOSTREE_GITREV='"$(OSTREE_GITREV)"' \
rpm-build 0fba15
	-DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_40 '-DGLIB_VERSION_MAX_ALLOWED=G_ENCODE_VERSION(2,50)' \
rpm-build 0fba15
	-DSOUP_VERSION_MIN_REQUIRED=SOUP_VERSION_2_40 '-DSOUP_VERSION_MAX_ALLOWED=G_ENCODE_VERSION(2,48)'
rpm-build 0fba15
# For strict aliasing, see https://bugzilla.gnome.org/show_bug.cgi?id=791622
rpm-build 0fba15
AM_CFLAGS += -std=gnu99 -fno-strict-aliasing $(WARN_CFLAGS)
rpm-build 0fba15
AM_DISTCHECK_CONFIGURE_FLAGS += \
rpm-build 0fba15
	--enable-gtk-doc \
rpm-build 0fba15
	--enable-man \
rpm-build 0fba15
	--disable-maintainer-mode \
rpm-build 0fba15
	$(NULL)
rpm-build 0fba15
rpm-build 0fba15
GITIGNOREFILES = aclocal.m4 build-aux/ buildutil/*.m4 config.h.in gtk-doc.make
rpm-build 0fba15
Packit Service 6eb7b9
# Generated by coreos-assembler build-fast and kola
Packit Service 6eb7b9
GITIGNOREFILES += fastbuild-*.qcow2 _kola_temp/
Packit Service 6eb7b9
rpm-build 0fba15
SUBDIRS += .
rpm-build 0fba15
rpm-build 0fba15
if ENABLE_GTK_DOC
rpm-build 0fba15
SUBDIRS += apidoc
rpm-build 0fba15
endif
rpm-build 0fba15
rpm-build 0fba15
EXTRA_DIST += autogen.sh COPYING README.md
rpm-build 0fba15
rpm-build 0fba15
OT_INTERNAL_GIO_UNIX_CFLAGS = $(OT_DEP_GIO_UNIX_CFLAGS)
rpm-build 0fba15
OT_INTERNAL_GIO_UNIX_LIBS = $(OT_DEP_GIO_UNIX_LIBS)
rpm-build 0fba15
OT_INTERNAL_SOUP_CFLAGS = $(OT_DEP_SOUP_CFLAGS)
rpm-build 0fba15
OT_INTERNAL_SOUP_LIBS = $(OT_DEP_SOUP_LIBS)
rpm-build 0fba15
rpm-build 0fba15
# This canonicalizes the PKG_CHECK_MODULES or AM_PATH_GPGME results
rpm-build 0fba15
if USE_GPGME
rpm-build 0fba15
OT_INTERNAL_GPGME_CFLAGS = $(OT_DEP_GPGME_CFLAGS) $(GPGME_PTHREAD_CFLAGS)
rpm-build 0fba15
OT_INTERNAL_GPGME_LIBS = $(OT_DEP_GPGME_LIBS) $(GPGME_PTHREAD_LIBS)
rpm-build 0fba15
endif
rpm-build 0fba15
rpm-build 0fba15
if BUILDOPT_INTROSPECTION
rpm-build 0fba15
include $(INTROSPECTION_MAKEFILE)
rpm-build 0fba15
GIRS =
rpm-build 0fba15
TYPELIBS = $(GIRS:.gir=.typelib)
rpm-build 0fba15
endif
rpm-build 0fba15
rpm-build 0fba15
# These bits based on gnome:librsvg/Makefile.am
rpm-build 0fba15
if ENABLE_RUST
rpm-build 0fba15
if RUST_DEBUG
rpm-build 0fba15
CARGO_RELEASE_ARGS=
rpm-build 0fba15
else
rpm-build 0fba15
CARGO_RELEASE_ARGS=--release
rpm-build 0fba15
endif
rpm-build 0fba15
rpm-build 0fba15
check-local:
rpm-build 0fba15
	cd $(srcdir)/rust && CARGO_TARGET_DIR=$(abs_top_builddir)/target cargo test
rpm-build 0fba15
rpm-build 0fba15
clean-local:
rpm-build 0fba15
	cd $(srcdir)/rust && CARGO_TARGET_DIR=$(abs_top_builddir)/target cargo clean
rpm-build 0fba15
rpm-build 0fba15
dist-hook:
rpm-build 0fba15
	(cd $(distdir)/rust && \
rpm-build 0fba15
   cp $(abs_top_srcdir)/rust/Cargo.lock . && \
rpm-build 0fba15
   cargo vendor -q && \
rpm-build 0fba15
   mkdir .cargo && \
rpm-build 0fba15
	 cp cargo-vendor-config .cargo/config)
rpm-build 0fba15
rpm-build 0fba15
EXTRA_DIST += $(srcdir)/rust/Cargo.toml $(srcdir)/rust/cargo-vendor-config
rpm-build 0fba15
endif # end ENABLE_RUST
rpm-build 0fba15
rpm-build 0fba15
libglnx_srcpath := $(srcdir)/libglnx
rpm-build 0fba15
libglnx_cflags := $(OT_DEP_GIO_UNIX_CFLAGS) "-I$(libglnx_srcpath)"
rpm-build 0fba15
libglnx_libs := $(OT_DEP_GIO_UNIX_LIBS)
rpm-build 0fba15
# See also autogen.sh and https://github.com/ostreedev/ostree/pull/1274/
rpm-build 0fba15
#
rpm-build 0fba15
# v2017.12 didn't include test-libglnx-shutil.c, but if you re-run
rpm-build 0fba15
# autogen.sh (as we do in Debian, to update the Autotools build system)
rpm-build 0fba15
# it will try to build it.
rpm-build 0fba15
$(srcdir)/libglnx/Makefile-libglnx.am.inc: $(srcdir)/libglnx/Makefile-libglnx.am
rpm-build 0fba15
	sed -e 's,$$(libglnx_srcpath),libglnx,g' < $< > $@
rpm-build 0fba15
include libglnx/Makefile-libglnx.am.inc
rpm-build 0fba15
EXTRA_DIST += libglnx/Makefile-libglnx.am
rpm-build 0fba15
noinst_LTLIBRARIES += libglnx.la
rpm-build 0fba15
rpm-build 0fba15
libbsdiff_srcpath := $(srcdir)/bsdiff
rpm-build 0fba15
rpm-build 0fba15
libbsdiff_cflags := $(OT_DEP_GIO_UNIX_CFLAGS) "-I$(bsdiff_srcpath)"
rpm-build 0fba15
libbsdiff_libs := $(OT_DEP_GIO_UNIX_LIBS)
rpm-build 0fba15
# See the comment for the similar libglnx bit above
rpm-build 0fba15
$(srcdir)/bsdiff/Makefile-bsdiff.am.inc: $(srcdir)/bsdiff/Makefile-bsdiff.am
rpm-build 0fba15
	sed -e 's,$$(libbsdiff_srcpath),bsdiff,g' < $< > $@
rpm-build 0fba15
include bsdiff/Makefile-bsdiff.am.inc
rpm-build 0fba15
EXTRA_DIST += bsdiff/Makefile-bsdiff.am
rpm-build 0fba15
noinst_LTLIBRARIES += libbsdiff.la
rpm-build 0fba15
rpm-build 0fba15
include Makefile-otutil.am
rpm-build 0fba15
include Makefile-libostree.am
rpm-build 0fba15
include Makefile-ostree.am
rpm-build 0fba15
include Makefile-switchroot.am
rpm-build 0fba15
if BUILDOPT_FUSE
rpm-build 0fba15
include src/rofiles-fuse/Makefile-inc.am
rpm-build 0fba15
endif
rpm-build 0fba15
include Makefile-tests.am
rpm-build 0fba15
include Makefile-boot.am
rpm-build 0fba15
include Makefile-man.am
rpm-build 0fba15
include Makefile-bash.am
rpm-build 0fba15
rpm-build 0fba15
release-tag:
rpm-build 0fba15
	cd $(srcdir) && git $(srcdir) tag -m "Release $(VERSION)" v$(VERSION)
rpm-build 0fba15
rpm-build 0fba15
embed_dependency=tar -C $(srcdir) --append --exclude='.git/*' --transform="s,^embedded-dependencies/,ostree-embeddeps-$${GITVERSION}/embedded-dependencies/," --file=$${TARFILE_TMP}
rpm-build 0fba15
rpm-build 0fba15
git_version_rpm = $$(cd $(srcdir) && git describe | sed -e 's,-,\.,g' -e 's,^v,,')
rpm-build 0fba15
rpm-build 0fba15
release-tarball-embedded:
rpm-build 0fba15
	set -x; \
rpm-build 0fba15
	GITVERSION=$(git_version_rpm); export GITVERSION; \
rpm-build 0fba15
	TARFILE_TMP=ostree-embeddeps-$${GITVERSION}.tar.tmp; \
rpm-build 0fba15
	REV=$$(git rev-parse HEAD); \
rpm-build 0fba15
	echo "Archiving ostree at $${REV}"; \
rpm-build 0fba15
	(cd $(srcdir); git archive --format=tar --prefix=ostree-embeddeps-$${GITVERSION}/ $${REV}) > $${TARFILE_TMP}; \
rpm-build 0fba15
	(cd $$(git rev-parse --show-toplevel); git submodule status) | while read line; do \
rpm-build 0fba15
	  rev=$$(echo $$line | cut -f 1 -d ' '); path=$$(echo $$line | cut -f 2 -d ' '); \
rpm-build 0fba15
	  echo "Archiving $${path} at $${rev}"; \
rpm-build 0fba15
	  (cd $(srcdir)/$$path; git archive --format=tar --prefix=ostree-embeddeps-$${GITVERSION}/$$path/ $${rev}) > submodule.tar; \
rpm-build 0fba15
	  tar -A -f $${TARFILE_TMP} submodule.tar; \
rpm-build 0fba15
	  rm submodule.tar; \
rpm-build 0fba15
	done; \
rpm-build 0fba15
	echo "Archiving glib"; \
rpm-build 0fba15
	$(embed_dependency) embedded-dependencies/glib; \
rpm-build 0fba15
	echo "Archiving libsoup"; \
rpm-build 0fba15
	$(embed_dependency) embedded-dependencies/libsoup; \
rpm-build 0fba15
	mv ostree-embeddeps-$${GITVERSION}.tar{.tmp,}; \
rpm-build 0fba15
	gzip -f ostree-embeddeps-$${GITVERSION}.tar 
rpm-build 0fba15
rpm-build 0fba15
# `make dist` + `make`; explicitly not the other
rpm-build 0fba15
# parts of distcheck like `make uninstall` since
rpm-build 0fba15
# we don't care about that.
rpm-build 0fba15
dist-then-build: dist
rpm-build 0fba15
	rm $(distdir) -rf && tar -xf $(distdir).tar.xz
rpm-build 0fba15
	cd $(distdir) && mkdir _build && cd _build && \
rpm-build 0fba15
	  ../configure --prefix=/usr --libdir=/usr/lib --sysconfdir=/etc && \
rpm-build 0fba15
	  $(MAKE) && make install DESTDIR=$$(pwd)/_install && \
rpm-build 0fba15
	rm -rf $(distdir)
rpm-build 0fba15
rpm-build 0fba15
-include $(top_srcdir)/git.mk