Skip to content
Snippets Groups Projects
Makefile.in 42.4 KiB
Newer Older
installcheck: installcheck-recursive
install-strip:
	if test -z '$(STRIP)'; then \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	      install; \
	else \
	  $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
	    install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
	    "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
	fi
mostlyclean-generic:

clean-generic:

distclean-generic:
	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)

maintainer-clean-generic:
	@echo "This command is intended for maintainers to use"
	@echo "it deletes files that may require special tools to rebuild."
clean: clean-recursive

clean-am: clean-generic clean-libtool mostlyclean-am

distclean: distclean-recursive
	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
	-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-hdr \
	distclean-libtool distclean-tags

dvi: dvi-recursive

dvi-am:

html: html-recursive

html-am:

info: info-recursive

info-am:

install-data-am:

install-dvi: install-dvi-recursive

install-dvi-am:

install-exec-am:

install-html: install-html-recursive

install-html-am:

install-info: install-info-recursive

install-info-am:

install-man:

install-pdf: install-pdf-recursive

install-pdf-am:

install-ps: install-ps-recursive

install-ps-am:

installcheck-am:

maintainer-clean: maintainer-clean-recursive
	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
	-rm -rf $(top_srcdir)/autom4te.cache
	-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic

mostlyclean: mostlyclean-recursive

mostlyclean-am: mostlyclean-generic mostlyclean-libtool

pdf: pdf-recursive

pdf-am:

ps: ps-recursive

ps-am:

uninstall-am:

.MAKE: $(am__recursive_targets) all install-am install-strip
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am all-local \
	am--refresh check check-am clean clean-cscope clean-generic \
	clean-libtool cscope cscopelist-am ctags ctags-am dist \
	dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \
	dist-tarZ dist-xz dist-zip distcheck distclean \
	distclean-generic distclean-hdr distclean-libtool \
	distclean-tags distcleancheck distdir distuninstallcheck dvi \
	dvi-am html html-am info info-am install install-am \
	install-data install-data-am install-dvi install-dvi-am \
	install-exec install-exec-am install-html install-html-am \
	install-info install-info-am install-man install-pdf \
	install-pdf-am install-ps install-ps-am install-strip \
	installcheck installcheck-am installdirs installdirs-am \
	maintainer-clean maintainer-clean-generic mostlyclean \
	mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
	tags tags-am uninstall uninstall-am


win32-debug:
	@echo; \
	echo win32     = $(win32); \
	echo; \
	echo win32defs = $(win32defs); \
	echo; \
	echo win32crlf = $(win32crlf); \
	echo

win32-check-crlf:
	@echo Checking win32 files for CR LF line endings ...; \
	fail=0 ; \
	for each in $(win32crlf) ; do \
	  result=`perl -e 'print grep(/\r\n/,<>)' "$$each" | wc -l`; \
	  if test "$$result" = 0 ; then \
	    echo $$each must be fixed to have CRLF line endings ; \
	    fail=1; \
	  fi ; \
	done ; \
	exit $$fail

# make sure all symbols we export on linux are defined in the win32 .def too
# (don't care about other unixes for now, it's enough if it works on one of
# the linux build bots; we assume .so )
check-exports:
	@fail=0 ; \
	for l in $(win32defs); do \
	  libbase=`basename "$$l" ".def"`; \
	  libso=`find "$(top_builddir)" -name "$$libbase-@GST_API_VERSION@.so" | grep -v /_build/ | head -n1`; \
	  libdef="$(top_srcdir)/win32/common/$$libbase.def"; \
	  if test "x$$libso" != "x"; then \
	    echo Checking symbols in $$libso; \
	    if ! ($(top_srcdir)/common/check-exports $$libdef $$libso) ; then \
	      fail=1; \
	    fi; \
	  fi; \
	done ; \
	if test $$fail != 0; then \
	  echo '-----------------------------------------------------------'; \
	  echo 'Run this to update the .def files:'; \
	  echo 'make update-exports'; \
	  echo '-----------------------------------------------------------'; \
	fi; \
	exit $$fail

update-exports:
	make check-exports 2>&1 | patch -p1
	git add win32/common/libgst*.def
	git diff --cached -- win32/common/
	echo '^^^--- updated and staged changes above'

# complain about nonportable printf format strings (%lld, %llu, %zu etc.)
check-nonportable-print-format:
	@fail=0 ; \
	loc=`find "$(top_srcdir)" -name '*.c' | xargs grep -n -e '%[0-9]*ll[udx]' -e '%[0-9]*z[udx]'`; \
	if test "x$$loc" != "x"; then \
	  echo "Please fix the following print format strings:" ; \
	  find "$(top_srcdir)" -name '*.c' | xargs grep -n -e '%[0-9]*ll[udx]' -e '%[0-9]*z[udx]'; \
	  fail=1; \
	fi; \
	exit $$fail

dist-hook: check-exports win32-check-crlf

release: dist
	@$(MAKE) $(PACKAGE)-$(VERSION).tar.xz.sha256sum
	@echo
	@echo "================================================================================================="
	@echo "http://gstreamer.freedesktop.org/src/$(PACKAGE)/$(PACKAGE)-$(VERSION).tar.xz"
	@cat $(PACKAGE)-$(VERSION).tar.xz.sha256sum
	@echo "================================================================================================="
	@if [ -d ~/releases/ ]; then \
	  cp -v $(PACKAGE)-$(VERSION).tar.xz ~/releases/; \
	fi
	@if [ -d ../www/data/src ]; then \
	  mv -v $(PACKAGE)-$(VERSION).tar.xz ../www/data/src/$(PACKAGE)/ ; \
	  mv -v $(PACKAGE)-$(VERSION).tar.xz.sha256sum ../www/data/src/$(PACKAGE)/ ; \
	fi
	@echo "================================================================================================="
# generate sha256 sum files
%.sha256sum: %
	@sha256sum $< > $@

# check that no marshal or enumtypes files are included
# this in turn ensures that distcheck fails for missing .list files which is currently
# shadowed when the corresponding .c and .h files are included.
distcheck-hook:
	@test "x" = "x`find $(distdir) -name \*-enumtypes.[ch] | grep -v win32`" && \
	test "x" = "x`find $(distdir) -name \*-marshal.[ch]`" || \
	( echo "*** Leftover enumtypes or marshal files in the tarball." && \
	  echo "*** Make sure the following files are not disted:" && \
	  find $(distdir) -name \*-enumtypes.[ch] | grep -v win32 && \
	  find $(distdir) -name \*-marshal.[ch] && \
	  false )

# rule to download the latest .po files
download-po: $(top_srcdir)/common/download-translations
	$(top_srcdir)/common/download-translations $(PACKAGE)

check-valgrind:
	cd tests/check && make check-valgrind

@HAVE_GST_CHECK_TRUE@check-torture:
@HAVE_GST_CHECK_TRUE@	cd tests/check && make torture
@HAVE_GST_CHECK_FALSE@check-torture:
@HAVE_GST_CHECK_FALSE@	true

win32-update:
	cp $(top_builddir)/win32/common/config.h-new \
	    $(top_srcdir)/win32/common/config.h
.PHONY: lcov-reset lcov lcov-run lcov-report lcov-upload lcov-clean

# run lcov from scratch, always
lcov-reset:
	$(MAKE) lcov-run
	$(MAKE) lcov-report

# run lcov from scratch if the dir is not there
lcov:
	$(MAKE) lcov-reset

# reset lcov stats
@GST_GCOV_ENABLED_TRUE@lcov-clean:
@GST_GCOV_ENABLED_TRUE@	@-rm -rf lcov
@GST_GCOV_ENABLED_TRUE@	lcov --directory . --zerocounters

# reset run coverage tests
@GST_GCOV_ENABLED_TRUE@lcov-run:
@GST_GCOV_ENABLED_TRUE@	-$(MAKE) lcov-clean
@GST_GCOV_ENABLED_TRUE@	-if test -d tests/check; then $(MAKE) -C tests/check inspect; fi
@GST_GCOV_ENABLED_TRUE@	-$(MAKE) check

# generate report based on current coverage data
@GST_GCOV_ENABLED_TRUE@lcov-report:
@GST_GCOV_ENABLED_TRUE@	mkdir lcov
@GST_GCOV_ENABLED_TRUE@	lcov --compat-libtool --directory . --capture --output-file lcov/lcov.info
@GST_GCOV_ENABLED_TRUE@	lcov --list-full-path -l lcov/lcov.info | grep -v "`cd $(top_srcdir) && pwd`" | cut -d\| -f1 > lcov/remove
@GST_GCOV_ENABLED_TRUE@	lcov --list-full-path -l lcov/lcov.info | grep "tests/check/" | cut -d\| -f1 >> lcov/remove
@GST_GCOV_ENABLED_TRUE@	lcov --list-full-path -l lcov/lcov.info | grep "docs/plugins/" | cut -d\| -f1 >> lcov/remove
@GST_GCOV_ENABLED_TRUE@	lcov -r lcov/lcov.info `cat lcov/remove` > lcov/lcov.cleaned.info
@GST_GCOV_ENABLED_TRUE@	rm lcov/remove
@GST_GCOV_ENABLED_TRUE@	mv lcov/lcov.cleaned.info lcov/lcov.info
@GST_GCOV_ENABLED_TRUE@	genhtml -t "$(PACKAGE_STRING)" -o lcov --num-spaces 2 lcov/lcov.info

@GST_GCOV_ENABLED_TRUE@lcov-upload: lcov
@GST_GCOV_ENABLED_TRUE@	rsync -rvz -e ssh --delete lcov/* gstreamer.freedesktop.org:/srv/gstreamer.freedesktop.org/www/data/coverage/lcov/$(PACKAGE)

@GST_GCOV_ENABLED_FALSE@lcov-run:
@GST_GCOV_ENABLED_FALSE@	echo "Need to reconfigure with --enable-gcov"

@GST_GCOV_ENABLED_FALSE@lcov-report:
@GST_GCOV_ENABLED_FALSE@	echo "Need to reconfigure with --enable-gcov"

check-cruft:
	@cruft_files=""; cruft_dirs=""; \
	for f in $(CRUFT_FILES); do \
	  if test -e $$f; then \
	    cruft_files="$$cruft_files $$f"; \
	  fi \
	done; \
	for d in $(CRUFT_DIRS); do \
	  if test -e $$d; then \
	    cruft_dirs="$$cruft_dirs $$d"; \
	  fi \
	done; \
	if test "x$$cruft_files$$cruft_dirs" != x; then \
	  echo; \
	  echo "**** CRUFT ALERT *****"; \
	  echo; \
	  echo "The following files and directories may not be needed any "; \
	  echo "longer (usually because a plugin has been merged into     "; \
	  echo "another plugin, moved to a different module, or been      "; \
	  echo "renamed), and you probably want to clean them up if you   "; \
	  echo "don't have local changes:                                 "; \
	  echo; \
	  for f in $$cruft_files; do echo "file $$f"; done; \
	  echo; \
	  for d in $$cruft_dirs; do echo "directory $$d"; done; \
	  echo; \
	  echo "'make clean-cruft' will remove these for you."; \
	  echo; \
	fi

clean-cruft-dirs:
	@for d in $(CRUFT_DIRS); do \
	  if test -e $$d; then \
	    rm -r "$$d" && echo "Removed directory $$d"; \
	  fi \
	done

clean-cruft-files:
	@for f in $(CRUFT_FILES); do \
	  if test -e $$f; then \
	    rm "$$f" && echo "Removed file $$f"; \
	  fi \
	done

clean-cruft: clean-cruft-dirs clean-cruft-files

# also might want to add this to your Makefile.am:
#
# all-local: check-cruft

all-local: check-cruft

# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: