Makefile.am 2.72 KB
Newer Older
1 2
ACLOCAL_AMFLAGS = -I m4

3
SUBDIRS = data doc include lib po src tests
4 5 6 7
# Only build GParted help documentation when enabled.  (Can be disabled
# with './configure --disable-doc').
if BUILD_HELP_DOC
  SUBDIRS += help
8
endif
Bart Hakvoort's avatar
Bart Hakvoort committed
9 10

@INTLTOOL_DESKTOP_RULE@
11
DESKTOP_IN_IN_FILES = gparted.desktop.in.in
Bart Hakvoort's avatar
Bart Hakvoort committed
12 13 14 15 16
DESKTOP_IN_FILES = gparted.desktop.in
DESKTOP_FILES =$(DESKTOP_IN_FILES:.desktop.in=.desktop)
desktopdir = $(datadir)/applications
desktop_DATA = $(DESKTOP_FILES)

17 18 19 20 21 22
@INTLTOOL_XML_RULE@
APPDATA_IN_FILES = gparted.appdata.xml.in
APPDATA_FILES =$(APPDATA_IN_FILES:.xml.in=.xml)
appdatadir = $(datadir)/appdata
appdata_DATA = $(APPDATA_FILES)

23 24 25 26 27
@INTLTOOL_POLICY_RULE@
polkit_action_in_in_FILES = org.gnome.gparted.policy.in.in
polkit_action_in_FILES = org.gnome.gparted.policy.in
polkit_action_FILES = $(polkit_action_in_FILES:.policy.in=.policy)
polkit_actiondir = $(datadir)/polkit-1/actions
28 29 30
if INSTALL_POLKIT_ACTIONS
  polkit_action_DATA = $(polkit_action_FILES)
endif
31

32
bin_SCRIPTS = gparted
33
CLEANFILES = $(bin_SCRIPTS) $(DESKTOP_IN_FILES) $(polkit_action_in_FILES)
34

35 36
do_subst = sed -e 's,[@]sbindir[@],$(sbindir),g' \
	-e 's,[@]bindir[@],$(bindir),g' \
37 38
	-e 's,[@]gksuprog[@],$(GKSUPROG),g' \
	-e 's,[@]enable_xhost_root[@],$(ENABLE_XHOST_ROOT),g'
39 40 41 42 43 44 45 46

gparted.desktop.in:  gparted.desktop.in.in Makefile
	$(do_subst) < $(srcdir)/gparted.desktop.in.in > gparted.desktop.in

gparted:  gparted.in Makefile
	$(do_subst) < $(srcdir)/gparted.in > gparted
	chmod +x gparted

47 48 49
org.gnome.gparted.policy.in: org.gnome.gparted.policy.in.in Makefile
	$(do_subst) < $(srcdir)/org.gnome.gparted.policy.in.in > org.gnome.gparted.policy.in

50 51 52 53 54 55
dist-hook:
	@if test -d "$(srcdir)/.git"; \
	then \
		echo Creating ChangeLog && \
		( cd "$(top_srcdir)" && \
		  echo '# Generated by Makefile. Do not edit.'; echo; \
56 57 58 59 60 61 62 63
		  $(top_srcdir)/missing --run \
		  git log GPARTED_0_4_4.. --date-order --date=short | \
		  sed -e '/^commit.*$$/d' | \
		  awk '/^Author/ {sub(/\\$$/,""); getline t; print $$0 t; next}; 1' | \
		  sed -e 's/^Author: //g' | \
		  sed -e 's/>Date:   \([0-9]*-[0-9]*-[0-9]*\)/>\t\1/g' | \
		  sed -e 's/^\([^\t<]*[<][^\t>]*>\)\t\([^\t]*\)/\2  \1/g'; \
		  echo; \
64 65 66 67 68 69 70 71 72
		) > ChangeLog.tmp \
		&& cat $(top_srcdir)/ChangeLog >> ChangeLog.tmp \
		&& mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \
		|| ( rm -f ChangeLog.tmp ; \
		     echo Failed to generate ChangeLog >&2 ); \
	else \
		echo A git clone is required to generate a ChangeLog >&2; \
	fi

73
EXTRA_DIST =			\
74 75
	$(APPDATA_IN_FILES)	\
	$(APPDATA_FILES)	\
76
	$(DESKTOP_IN_IN_FILES)	\
77
	$(DESKTOP_FILES)	\
78
	$(polkit_action_in_in_FILES)  \
79 80
	intltool-extract.in  	\
	intltool-merge.in	\
81
	intltool-update.in	\
82
	gparted.in
83 84

DISTCLEANFILES =		\
85 86
	$(appdata_DATA)		\
	$(desktop_DATA)		\
87
	$(polkit_action_DATA)  \
88 89
	intltool-extract	\
	intltool-merge		\
90
	intltool-update