forked from PintaProject/Pinta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.am
138 lines (107 loc) · 3.92 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 = help xdg
DIST_SUBDIRS = help xdg
BINDIR = $(srcdir)/bin
PINTA_ASSEMBLY_PC = $(srcdir)/$(PACKAGE_NAME).pc
BINFILES = \
$(BINDIR)/Pinta.exe \
$(BINDIR)/Pinta.Core.dll \
$(BINDIR)/Pinta.Gui.Widgets.dll \
$(BINDIR)/Pinta.Resources.dll \
$(BINDIR)/Pinta.Effects.dll \
$(BINDIR)/Pinta.Tools.dll
DEBUG_FILES = $(addsuffix .mdb, $(BINFILES))
RELEASE_FILE = $(PACKAGE)-$(VERSION)
MAC_APP_DIR = Pinta.app
MAC_APP_BIN_DIR = "$(MAC_APP_DIR)/Contents/MacOS/"
#magic automake variables
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = $(PINTA_ASSEMBLY_PC)
#end
# target: all - Default target: build
all: build
# target: run - Launch the uninstalled copy
run:
$(MONO) bin/Pinta.exe
# target: help - Display callable targets.
help:
egrep "^# target:" Makefile | sed 's/^# target:/make/'
# target: build - Build Pinta.
build: Pinta.sln
cd $(srcdir) && $(XBUILD) Pinta.sln
cd $(srcdir) && $(XBUILD) Pinta.Install.proj /target:CompileTranslations
cd $(srcdir)/help && make copyhelp
test: build
$(XBUILD) tests/Pinta.Core.Tests/Pinta.Core.Tests.csproj
nunit-console bin/Pinta.Core.Tests.dll
# 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: 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 -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 $(BINDIR)/*
# target: cleanobj - Removes temporary build files.
cleanobj:
find $(srcdir)/ -type d -name obj | xargs rm -rvf
# target: install - Installs Pinta.
install-exec-local: pinta $(BINFILES)
cd $(srcdir) && $(XBUILD) /target:Install /property:InstallPrefix=$(DESTDIR)$(prefix) \
/property:BinDir=$(DESTDIR)$(bindir) /property:LibDir=$(DESTDIR)$(libdir) \
/property:DataRootDir=$(DESTDIR)$(datarootdir) /property:ManDir=$(DESTDIR)$(mandir) \
/property:LocaleDir=$(DESTDIR)$(localedir) Pinta.Install.proj
$(INSTALL_SCRIPT) pinta $(DESTDIR)$(bindir)/$(PACKAGE)
# target: uninstall - Uninstalls Pinta.
uninstall:
$(XBUILD) /target:Uninstall /property:InstallPrefix=$(DESTDIR)$(prefix) Pinta.Install.proj
# target: release - Default release type: releasetar
release: releasetar
# target: releasetar - Make a release tarball.
releasetar: $(BINFILES)
cd $(BINDIR) && tar -czf ../$(RELEASE_FILE).tgz --exclude=*mdb *
# target: releasezip - Make a release zip file.
releasezip: $(BINFILES)
cd $(BINDIR) && zip -r ../$(RELEASE_FILE).zip * -x "*.mdb"
releaseosx: build $(BINFILES)
mkdir -p $(MAC_APP_DIR)/Contents/{MacOS,Resources}
cp -r $(BINDIR)/locale $(BINFILES) $(DEBUG_FILES) $(BINDIR)/ICSharpCode.SharpZipLib.dll osx/pinta $(MAC_APP_BIN_DIR)
chmod +x $(MAC_APP_BIN_DIR)/pinta
cp osx/Info.plist $(MAC_APP_DIR)/Contents
cp osx/pinta.icns $(MAC_APP_DIR)/Contents/Resources
touch $(MAC_APP_DIR)
zip -r9uq $(MAC_APP_DIR).zip $(MAC_APP_DIR)
rm -rf $(MAC_APP_DIR)
EXTRA_DIST = Pinta Pinta.Core Pinta.Effects Pinta.Gui.Widgets Pinta.Resources Pinta.Tools po xdg license-mit.txt \
license-pdn.txt Pinta.sln Pinta.Install.proj pinta.pc.in readme.md intltool-extract.in \
intltool-merge.in intltool-update.in
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 \
help/Makefile.in \
Makefile.in \
install-sh \
configure \
aclocal.m4 \
missing \
compile
.PHONY: install uninstall cleanbin cleanobj release releasetar releasezip