File: Makefile

package info (click to toggle)
chiark-tcl-applet 1.0-2
  • links: PTS
  • area: main
  • in suites: bullseye, sid
  • size: 144 kB
  • sloc: tcl: 860; makefile: 32
file content (37 lines) | stat: -rw-r--r-- 782 bytes parent folder | download
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

# Copyright 2016,2020 Ian Jackson
# SPDX-License-Identifier: GPL-3.0-or-later
# There is NO WARRANTY.

INSTALL ?= install
INSTALL_SCRIPT ?= $(INSTALL) -m 755
INSTALL_DATA ?= $(INSTALL) -m 644

prefix ?= /usr/local

p=chiark-tcl-applet

bindir=$(prefix)/bin
sharedir=$(prefix)/share/$p

SCRIPTS += xbatmon-simple-tray chiark-tcl-applet-wrapper
TCLLIBS += $(addsuffix .tcl, applet args subproc utils)

SEDDED_SCRIPTS= $(addprefix tmp/, $(SCRIPTS))

all:	$(SEDDED_SCRIPTS)

tmp:
	mkdir -p tmp

tmp/%:	% tmp
	sed '1,/^source/ s#^set lib \.#set lib $(sharedir)#' $* >$@
	chmod +x $@

install: all
	$(INSTALL) -d $(addprefix $(DESTDIR), $(bindir) $(sharedir))
	$(INSTALL_SCRIPT) $(SEDDED_SCRIPTS) $(DESTDIR)$(bindir)
	$(INSTALL_DATA) $(TCLLIBS) $(DESTDIR)$(sharedir)

clean:
	rm -rf tmp