summaryrefslogtreecommitdiffstats
path: root/Makefile.am
blob: 479fe8e4dba838c1faf59d1177b0e48dd374c01d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
share_files = $(srcdir)/build $(srcdir)/common $(srcdir)/*.xsl
share_path = "$(DESTDIR)$(prefix)/share/osmo-gsm-manuals"

noarch_pkgconfigdir = $(prefix)/lib/pkgconfig
noarch_pkgconfig_DATA = osmo-gsm-manuals.pc
BUILT_SOURCES = $(top_srcdir)/.version
EXTRA_DIST = git-version-gen .version check-depends.sh $(share_files)
SUBDIRS = tests

$(top_srcdir)/.version:
	echo $(VERSION) > $@-t && mv $@-t $@

dist-hook:
	echo $(VERSION) > $(distdir)/.tarball-version

install-data-hook:
	cd "$(srcdir)" && \
		files="$$(find $(notdir $(share_files)) -not -type d)" && \
		for i in $$files; do \
			if [ -x "$$i" ]; then \
				mode=755; \
			else \
				mode=644; \
			fi; \
			install -vDm$$mode "$$i" "$(share_path)/$$i" || exit 1; \
		done;
	install -Dm755 "$(srcdir)/check-depends.sh" "$(DESTDIR)$(prefix)/bin/osmo-gsm-manuals-check-depends"

uninstall-local:
	rm -rv "$(share_path)" "$(DESTDIR)$(prefix)/bin/osmo-gsm-manuals-check-depends"