File: Makefile.am

package info (click to toggle)
siril 1.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 47,656 kB
  • sloc: ansic: 175,395; cpp: 28,654; python: 8,476; makefile: 974; xml: 879; sh: 280
file content (89 lines) | stat: -rw-r--r-- 2,685 bytes parent folder | download | duplicates (2)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
## Process this file with automake to produce Makefile.in

export CC CFLAGS CPPFLAGS

SUBDIRS = subprojects \
	po \
	src \
	data \
	pixmaps \
	platform-specific

# TODO add a conditionnal and a configure switch
# to be able to choose the language. Also, this should
# be a recussive make with a separate file list.
scriptsdir = $(pkgdatadir)/scripts
scripts_DATA = scripts/OSC_Preprocessing.ssf \
    scripts/Mono_Preprocessing.ssf \
	scripts/OSC_Extract_Ha.ssf \
	scripts/OSC_Extract_HaOIII.ssf \
	scripts/OSC_Preprocessing_BayerDrizzle.ssf

doc_DATA = AUTHORS \
	LICENSE.md \
	3rdparty_licenses/LICENSE_sleef.txt \
	3rdparty_licenses/LICENSE_zlib.txt \
	3rdparty_licenses/GPL-2.0-or-later.txt

man_MANS = siril.1

if !PLATFORM_WIN32
install-exec-hook:
	(cd $(DESTDIR)$(mandir)/man1; \
	rm -f siril-cli.1; \
	$(LN_S) siril.1 siril-cli.1)

uninstall-hook:
	(cd $(DESTDIR)$(mandir)/man1; rm -f siril-cli.1)
endif

ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = config.rpath \
             git-version.h \
             siril_resource.h
AUTOMAKE_OPTIONS = foreign

generated_sources = \
	git-version.h \
	siril_resource.h

# Build git-version.h before anything in the subdirs as this is needed
# in the about and debug dialog (app/) and in the debug tool (tools/).
BUILT_SOURCES = $(generated_sources)

git-version.h: update-git-version-header
	@if test -e "$(top_srcdir)/.git"; then \
	  git_version="`git --git-dir=$(top_srcdir)/.git describe --always`"; \
	  git_version_abbrev="`git --git-dir=$(top_srcdir)/.git rev-parse --short HEAD`"; \
	  git_last_commit_year="`git --git-dir=$(top_srcdir)/.git log -n1 --reverse --pretty=%ci | cut -b 1-4`"; \
	elif test ! -f "$@"; then \
	  git_version="Unknown"; \
	  git_version_abbrev="$$git_version"; \
	  git_last_commit_timestamp=-1; \
	  git_last_commit_year="`date -u '+%Y'`"; \
	fi; \
	if test -n "$$git_version"; then \
	  echo "#ifndef __GIT_VERSION_H__" > "$@.tmp"; \
	  echo "#define __GIT_VERSION_H__" >> "$@.tmp"; \
	  echo "#define SIRIL_GIT_VERSION_ABBREV \"$$git_version_abbrev\"" >> "$@.tmp"; \
	  echo "#define SIRIL_GIT_LAST_COMMIT_YEAR \"$$git_last_commit_year\"" >> "$@.tmp"; \
	  echo "#endif /* __GIT_VERSION_H__ */" >> "$@.tmp"; \
	fi
	@if ( test -f "$@.tmp" && test -f "$@" && cmp "$@.tmp" "$@" > /dev/null ); then \
	  rm -f "$@.tmp"; \
	elif test -f "$@.tmp"; then \
	  mv "$@.tmp" "$@"; \
	  echo "  git HEAD changed: $@ regenerated"; \
	fi

siril_resource.h: src/siril_resource.xml
	$(AM_V_GEN)
	glib-compile-resources \
	--sourcedir=$(top_builddir) \
	--sourcedir=src \
	--target=src/$@ \
	--generate-header \
	--c-name siril_resource \
	$(srcdir)/src/siril_resource.xml

.PHONY: update-git-version-header siril_resource.h