forked from Laidout/laidout
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
138 lines (112 loc) · 4.58 KB
/
Makefile
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
###############################################
############## ###############
############# Laidout Makefile ##############
############## ###############
###############################################
# Makefile-toinclude, generated by configure,
# defines LAXDIR, PREFIX, and LAIDOUTVERSION
include Makefile-toinclude
# where the main executable goes
BINDIR=$(PREFIX)/bin
# like /usr/local/share/, examples go here: $SHAREDIR/laidout
SHAREDIR=$(PREFIX)/share
### If you want to be sure that an install does not clobber anything that exists
### already, then uncomment the line with the '--backup=t' and comment out the other.
#INSTALL=install -D --backup=t
INSTALL=$(INSTALLEXE) -D
INSTALLDIR=$(INSTALLEXE) -d
LAIDOUTNAME=laidout-$(LAIDOUTVERSION)
laidout: touchdepends
cd src && $(MAKE)
cd src/po && $(MAKE)
all: laidout docs
icons:
cd src/icons && make
docs:
cd docs && doxygen
alldocs:
cd docs && doxygen Doxyfile-with-laxkit
quickref:
src/laidout -H > QUICKREF.html
install:
echo 'Installing to $(BINDIR)/laidout which points to $(BINDIR)/$(LAIDOUTNAME)'
$(INSTALL) -m755 src/laidout $(BINDIR)/$(LAIDOUTNAME)
$(INSTALLDIR) $(SHAREDIR)/laidout/$(LAIDOUTVERSION)/examples
$(INSTALL) -m644 -t $(SHAREDIR)/laidout/$(LAIDOUTVERSION)/examples examples/*
$(INSTALLDIR) $(SHAREDIR)/laidout/$(LAIDOUTVERSION)/icons
$(INSTALL) -m644 -t $(SHAREDIR)/laidout/$(LAIDOUTVERSION)/icons src/icons/*.png
$(INSTALLDIR) $(SHAREDIR)/applications
$(INSTALL) -m644 deb/laidout.desktop $(SHAREDIR)/applications
$(INSTALLDIR) $(SHAREDIR)/icons/hicolor/48x48/apps
$(INSTALL) -m644 src/icons/laidout.png $(SHAREDIR)/icons/hicolor/48x48/apps/laidout.png
$(INSTALLDIR) $(SHAREDIR)/icons/hicolor/scalable/apps
$(INSTALL) -m644 src/icons/laidout.svg $(SHAREDIR)/icons/hicolor/scalable/apps/laidout.svg
$(INSTALLDIR) $(SHAREDIR)/laidout/$(LAIDOUTVERSION)/coop/processing
$(INSTALL) -m644 -t $(SHAREDIR)/laidout/$(LAIDOUTVERSION)/coop/processing coop/processing/*
$(INSTALLDIR) $(SHAREDIR)/laidout/$(LAIDOUTVERSION)/coop/scribus
$(INSTALL) -m644 -t $(SHAREDIR)/laidout/$(LAIDOUTVERSION)/coop/scribus coop/scribus/*
$(INSTALLDIR) $(SHAREDIR)/laidout/$(LAIDOUTVERSION)/coop/html/scrim
$(INSTALL) -m644 -t $(SHAREDIR)/laidout/$(LAIDOUTVERSION)/coop/html/scrim coop/html/scrim/*
$(INSTALL) -m644 -t $(SHAREDIR)/laidout/$(LAIDOUTVERSION)/coop/html/ coop/html/*html coop/html/*md
#$(INSTALL) -m644 -t $(SHAREDIR)/laidout/$(LAIDOUTVERSION)/coop/ coop/*
$(INSTALLDIR) $(SHAREDIR)/laidout/$(LAIDOUTVERSION)/plugins
$(INSTALL) -m755 -t $(SHAREDIR)/laidout/$(LAIDOUTVERSION)/plugins src/plugins/*.so
rm -f $(BINDIR)/laidout
ln -s $(LAIDOUTNAME) $(BINDIR)/laidout
cd src/po && $(MAKE) install
# ****** TODO!!! this is very primitive make uninstall!!
# should only uninstall things that were actually installed. Any resource added by
# the user to the system wide directories should not be uninstalled. Should use
# config log perhaps. The $(BINDIR)/laidout should be removed only if it points to
# $(BINDIR)/$(LAIDOUTNAME)
uninstall:
echo 'Uninstalling laidout.'
echo ' Removing $(BINDIR)/laidout'
rm -f $(BINDIR)/laidout
echo ' Removing $(SHAREDIR)/laidout/$(LAIDOUTVERSION)'
rm -fr $(SHAREDIR)/laidout/$(LAIDOUTVERSION)
echo ' Removing $(BINDIR)/$(LAIDOUTNAME)'
rm -f $(BINDIR)/$(LAIDOUTNAME)
cd src/po && $(MAKE) uninstall
#link debian to deb if not there.. Debian guidelines say don't put
#a "debian" directory in upstream sources by default.
deb: touchdepends
touch Makefile-toinclude
if [ ! -e debian ] ; then ln -s deb debian; fi
dpkg-buildpackage -rfakeroot
tar:
sh deb/maketar.sh $(LAIDOUTVERSION)
hidegarbage: touchdepends
cd src && $(MAKE) hidegarbage
unhidegarbage: touchdepends
cd src && $(MAKE) unhidegarbage
depends: touchdepends
cd src && $(MAKE) depends
SOURCEDIRS= \
src \
src/api \
src/calculator \
src/core \
src/dataobjects \
src/filetypes \
src/impositions \
src/interfaces \
src/nodes \
src/plugins \
src/plugins/geglnodes \
src/polyptych/src \
src/printing \
src/text \
src/ui
touchdepends:
for NAME in $(SOURCEDIRS); do touch $$NAME/makedepend; done
if [ -e laxkit ] ; then cd laxkit && $(MAKE) touchdepends; fi
# remove everything that is generated, but not in repo
dist-clean: clean
for NAME in $(SOURCEDIRS); do rm -f $$NAME/makedepend $$NAME/makedepend.bak; done
rm -f Makefile-toinclude config.log src/version.h src/configured.h
rm -f src/po/*.mo
.PHONY: all icons laidout dist-clean clean docs install uninstall hidegarbage unhidegarbage depends touchdepends deb
clean:
cd src && $(MAKE) clean
cd src/polyptych && $(MAKE) clean