-
Notifications
You must be signed in to change notification settings - Fork 278
/
Makefile.am
138 lines (107 loc) · 3.91 KB
/
Makefile.am
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
SUBDIRS = xdg
DIST_SUBDIRS = xdg
BUILDDIR = $(srcdir)/build
BINDIR = $(BUILDDIR)/bin
PINTA_BUILD_OPTS = --configuration Release -p:BuildTranslations=true
PINTA_INSTALL_OPTS = \
-p:SourceDir=$(abs_srcdir) \
-p:PublishDir=$(abs_srcdir)/publish \
-p:InstallPrefix=$(DESTDIR)$(prefix) \
-p:InstallBinDir=$(DESTDIR)$(bindir) \
-p:InstallLibDir=$(DESTDIR)$(libdir) \
-p:InstallDataRootDir=$(DESTDIR)$(datarootdir) \
-p:InstallManDir=$(DESTDIR)$(mandir) \
-p:InstallLocaleDir=$(DESTDIR)$(localedir)
PINTA_ASSEMBLY_PC = $(srcdir)/$(PACKAGE_NAME).pc
RELEASE_FILE = $(PACKAGE)-$(VERSION)
#magic automake variables
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = $(PINTA_ASSEMBLY_PC)
#end
# target: all - Default target: publish
all: publish
# target: run - Launch the uninstalled copy
run: build
$(DOTNET_CMD) build/bin/Pinta.dll
# target: help - Display callable targets.
help:
egrep "^# target:" Makefile | sed 's/^# target:/make/'
build/bin/Pinta.dll: Pinta.sln
cd $(srcdir) && $(DOTNET_CMD) build Pinta.sln $(PINTA_BUILD_OPTS)
# target: build - Build Pinta.
build: build/bin/Pinta.dll
publish/Pinta.dll: Pinta.sln
cd $(srcdir) && $(DOTNET_CMD) publish Pinta.sln $(PINTA_BUILD_OPTS) --self-contained false -p:PublishDir=$(abs_srcdir)/publish
# target: publish - Build Pinta for deployment.
publish: publish/Pinta.dll
test: build
$(DOTNET_CMD) test Pinta.sln $(PINTA_BUILD_OPTS)
# target: list - List source files.
list:
if ! git status > /dev/null 2> /dev/null ;\
then \
find . -type f -name *.cs | sed 's|./||' ;\
else \
git ls-files | grep '\.cs' ;\
fi
#target: updatepotfiles - update the POTFILES.in file
updatepotfiles:
echo xdg/pinta.desktop.in > po/POTFILES.in
echo xdg/pinta.appdata.xml.in >> po/POTFILES.in
find \
Pinta \
Pinta.Core \
Pinta.Docking \
Pinta.Effects \
Pinta.Gui.Addins \
Pinta.Gui.Widgets \
Pinta.Resources \
Pinta.Tools \
-name \*.cs -not -path '*/obj/*' | sort >> po/POTFILES.in
#target: updatepot - update the messages.pot file
updatepot:
cd po && intltool-update -m && intltool-update -p --gettext-package=messages
cat po/messages.in >> po/messages.pot
cat po/messages.pot | msguniq -s -o po/messages.pot
# target: clean - Default clean command: cleanobj and cleanbin
clean-local: cleanobj cleanbin
maintainer-clean-local:
rm -rf autom4te.cache
# target: cleanbin - Removes built files.
cleanbin:
rm -rvf $(BUILDDIR)/*
# target: cleanobj - Removes temporary build files.
cleanobj:
find $(srcdir)/ -type d -name obj | xargs rm -rvf
# target: install - Installs Pinta.
install-exec-local: publish
$(DOTNET_CMD) msbuild installer/linux/install.proj -target:Install $(PINTA_INSTALL_OPTS)
$(INSTALL_SCRIPT) installer/linux/pinta $(DESTDIR)$(bindir)/$(PACKAGE)
# target: uninstall - Uninstalls Pinta.
uninstall-hook:
$(DOTNET_CMD) msbuild installer/linux/install.proj -target:Uninstall $(PINTA_INSTALL_OPTS)
# target: releasezip - Make a self-contained release zip file.
releasezip:
$(DOTNET_CMD) publish Pinta.sln $(PINTA_BUILD_OPTS) -r linux-x64 --self-contained true -p:PublishDir=$(abs_srcdir)/release
cd $(abs_srcdir)/release && zip -r ../$(RELEASE_FILE).zip * -x "*.pdb"
EXTRA_DIST = Pinta Pinta.Core Pinta.Docking Pinta.Effects Pinta.Gui.Addins Pinta.Gui.Widgets Pinta.Resources Pinta.Tools po xdg tests license-mit.txt \
license-pdn.txt Pinta.sln pinta.pc.in readme.md intltool-extract.in \
intltool-merge.in intltool-update.in installer/linux/install.proj Directory.Build.props Directory.Packages.props
CLEANFILES = intltool-extract \
intltool-update \
intltool-merge \
intltool-extract.in \
intltool-update.in \
intltool-merge.in
DISTCLEANFILES = po/.intltool-merge-cache \
po/Makefile \
po/Makefile.in \
po/Makefile
MAINTAINERCLEANFILES = po/Makefile.in.in \
Makefile.in \
install-sh \
configure \
aclocal.m4 \
missing \
compile
.PHONY: install uninstall cleanbin cleanobj