forked from brunogirin/scad-highlight-gtk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (40 loc) · 1.71 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
# This file is part of Gedit OpenSCAD extension.
#
# Gedit OpenSCAD extension is free software: you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation, either version 3 of the License,
# or (at your option) any later version.
#
# Gedit OpenSCAD extension is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Gedit OpenSCAD extension.
# If not, see <https://www.gnu.org/licenses/lgpl.html>.
# Makefile to install syntax highlighting for gedit and
# any GtkSourceView based editor
gprefix = /usr/share
lprefix = $(HOME)/.local/share
mimedir = mime
mimepack = $(mimedir)/packages
langdir3 = gtksourceview-3.0/language-specs
langdir4 = gtksourceview-4/language-specs
all: scad.xml scad.lang
echo "Call make install to install the extension"
.PHONY: install
install:
make install_global || make install_local
install_global:
echo "Installing globally"
install -m 0644 -D scad.xml $(gprefix)/$(mimepack)/scad.xml
update-mime-database $(gprefix)/$(mimedir)
install -m 0644 -D scad.lang $(gprefix)/$(langdir3)/scad.lang
install -m 0644 -D scad.lang $(gprefix)/$(langdir4)/scad.lang
install_local:
echo "Could not install globally, installing locally"
install -m 0644 -D scad.xml $(lprefix)/$(mimepack)/scad.xml
update-mime-database $(lprefix)/$(mimedir)
install -m 0644 -D scad.lang $(lprefix)/$(langdir3)/scad.lang
install -m 0644 -D scad.lang $(lprefix)/$(langdir4)/scad.lang