File: Makefile

package info (click to toggle)
ascii 3.11-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 120 kB
  • sloc: ansic: 304; xml: 263; makefile: 36; sh: 17
file content (51 lines) | stat: -rw-r--r-- 1,438 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
# ascii -- interactive ASCII reference

VERS=$(shell sed <ascii.spec -n -e '/Version: \(.*\)/s//\1/p')

CFLAGS = -O

all: ascii ascii.1

ascii: ascii.c splashscreen.h nametable.h
	$(CC) -DREVISION=$(VERS) ascii.c -o ascii

splashscreen.h: splashscreen
	sed <splashscreen >splashscreen.h -e 's/\\/\\\\/g' -e 's/"/\\"/g' -e 's/.*/P("&");/' 

nametable.h: nametable
	sed <nametable >nametable.h -e '/^#/d' -e 's/^[A-Za-z ]*: */	/' -e 's/%%/    }, {/'

ascii.1: ascii.xml
	xmlto man ascii.xml 

ascii.html: ascii.xml
	xmlto html-nochunks ascii.xml 

clean:
	rm -f ascii ascii.o splashscreen.h nametable.h *.rpm *.tar.gz MANIFEST *.1 *.html SHIPPER.*

SPLINTOPTS = +charintliteral -initallelements +posixlib -mustfreefresh \
	-predboolint
splint: nametable.h splashscreen.h
	splint -I. -DREVISION=$(VERS) $(SPLINTOPTS) ascii.c

install: ascii ascii.1
	cp ascii $(DESTDIR)/usr/bin/ascii
	cp ascii.1 $(DESTDIR)/usr/share/man/man1

uninstall:
	rm $(DESTDIR)/usr/bin/ascii
	rm $(DESTDIR)/usr/share/man/man1/ascii.1

SOURCES = README COPYING Makefile ascii.c ascii.xml ascii.spec splashscreen nametable ascii.cgi

ascii-$(VERS).tar.gz: $(SOURCES) ascii.1
	@ls $(SOURCES) ascii.1 | sed s:^:ascii-$(VERS)/: >MANIFEST
	@(cd ..; ln -s ascii ascii-$(VERS))
	(cd ..; tar -czvf ascii/ascii-$(VERS).tar.gz `cat ascii/MANIFEST`)
	@(cd ..; rm ascii-$(VERS))

dist: ascii-$(VERS).tar.gz

release: ascii-$(VERS).tar.gz ascii.html
	shipper -u -m -t; make clean