File: Makefile.in

package info (click to toggle)
ccontrol 0.9.1+20060806-2
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 440 kB
  • ctags: 188
  • sloc: ansic: 1,478; sh: 302; makefile: 142; python: 141; xml: 64
file content (87 lines) | stat: -rw-r--r-- 2,564 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
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
CC=@CC@
CFLAGS=@CFLAGS@
C_FILES:=ccontrol.c ccontrol-parse.c ccontrol-lock.c ccontrol-identify.c stdrusty.c
GPERF_C_FILES:=extensions.c keywords.c
# Everything depends on makefile, headers, gperf files
ALLFILES=$(C_FILES) $(GPERF_C_FILES) Makefile stdrusty.h ccontrol.h
BINDIR=@BINDIR@
LIBDIR=@LIBDIR@
DATADIR=@DATADIR@
MANDIR=@MANDIR@
XMLTO=@XMLTO@
ASCIIDOC=@ASCIIDOC@
VALGRIND=@VALGRIND@
VERSION=@VERSION@

LINKS=$(foreach l,gcc cc g++ c++ ld make,$(prefix)$(LIBDIR)/$l)

ccontrol: $(ALLFILES) ccontrol.1
	$(CC) $(CFLAGS) -DVERSION='"$(VERSION) (@VERSION_NAME@)"' -o $@ $(C_FILES)

Makefile: Makefile.in configure config.status
	./configure --reconfigure

config.status:
	@echo Please rerun ./configure.; exit 1

ccontrol_test: $(ALLFILES)
	$(CC) $(CFLAGS) -DVERSION='"$(VERSION) (@VERSION_NAME@)"' -DTESTING -o $@ $(C_FILES)

$(GPERF_C_FILES): %.c: %.gperf
	gperf $< > $@

install: installbin installlib installman installgui

$(prefix)$(BINDIR) $(prefix)$(MANDIR)/man1 $(prefix)$(LIBDIR) $(prefix)$(DATADIR):
	mkdir -p $@

installgui: $(prefix)$(DATADIR)/ccontrol-key.png $(prefix)$(BINDIR)/gccontrol

$(prefix)$(DATADIR)/ccontrol-key.png: gui/ccontrol-key.png $(prefix)$(DATADIR) 
	cp $< $@

$(prefix)$(BINDIR)/gccontrol: gui/gccontrol $(prefix)$(BINDIR) 
	cp $< $@

installman: $(prefix)$(MANDIR)/man1 $(prefix)$(MANDIR)/man1/ccontrol.1 $(prefix)$(MANDIR)/man1/ccontrol-init.1

installbin: $(prefix)$(BINDIR)/ccontrol $(prefix)$(BINDIR)/ccontrol-init

$(prefix)$(BINDIR)/ccontrol: ccontrol $(prefix)$(BINDIR)
	cp $< $@

$(prefix)$(BINDIR)/ccontrol-init: ccontrol-init
	cp $< $@

installlib: $(LINKS)

$(LINKS): %: ccontrol $(prefix)$(LIBDIR)
	ln -sf $(BINDIR)/ccontrol $@

$(prefix)$(MANDIR)/man1/ccontrol.1: ccontrol.1
	sed -e 's,©,(c),g' < $< > $@

$(prefix)$(MANDIR)/man1/ccontrol-init.1: ccontrol-init.1
	sed -e 's,©,(c),g' < $< > $@

uninstall:
	rm -f $(prefix)$(BINDIR)/ccontrol $(prefix)$(BINDIR)/ccontrol-init $(LINKS) $(prefix)$(MANDIR)/man1/ccontrol.1 $(prefix)$(MANDIR)/man1/ccontrol-init.1

check: ccontrol_test
	@testsuite/test.sh --valgrind=$(VALGRIND)

dist: clean
	rm -f Makefile config.status
	DIR=`basename \`pwd\``; cd .. && ln -sf $$DIR ccontrol-$(VERSION) && tar -c -v -j --exclude='*~' --exclude='*.orig' --exclude='*.rej' -f ccontrol-$(VERSION).tar.bz2 ccontrol-$(VERSION)/* ccontrol-$(VERSION)/.??* && rm -f ccontrol-$(VERSION)

clean:
	rm -f *.o ccontrol ccontrol_test

%: %.xml
	$(XMLTO) man $*.xml

%.xml: %.txt
	$(ASCIIDOC) -d manpage -b docbook $*.txt

distclean: clean
	rm -f Makefile config.status ccontrol.1 ccontrol-init.1