File: Makefile

package info (click to toggle)
hindent 1.1.2-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 96 kB
  • ctags: 12
  • sloc: makefile: 85
file content (85 lines) | stat: -rw-r--r-- 2,456 bytes parent folder | download | duplicates (3)
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
#
# Hindent Makefile
#

# Don't change this please:
VERSION=1.1.2

# Basic area you want to install things in:
DEST=$(DESTROOT)

# Where the hindent script will get installed:
BIN=$(DEST)/bin

# Section where man page should go, and path:
MANSECT=1
MAN=$(DEST)/share/man/man$(MANSECT)

# Path to a BSD-style install utility:
INSTALL=install			# Linux, BSD, SunOS 4.x
#INSTALL=ginstall		# Gnu Install is good, it might be named this
#INSTALL=/usr/ucb/install	# SysV, Solaris 2.x

# Path to your Perl 5 program:
PERLPROG=/usr/bin/perl


# END CONFIGURATIONS ---------------------------------------------


all:	hindent.0 hindent.txt

hindent.0:	macros.sed hindent.1
		sed -f macros.sed < hindent.1 > tool.out
		nroff -man tool.out > hindent.0
#		groff -Tascii -man hindent.1 > hindent.0
		-rm -f tool.out

hindent.txt:	hindent.0
		colcrt hindent.0 | cat -s > hindent.txt

install:	macros.sed hindent hindent.1
	sed -f macros.sed < hindent > tool.out
	$(INSTALL) -c -m 755 -o bin -g bin tool.out $(BIN)/hindent
	sed -f macros.sed < hindent.1 > tool.out
	$(INSTALL) -c -m 644 -o bin -g bin tool.out $(MAN)/hindent.$(MANSECT)
	-rm -f tool.out

macros.sed:	Makefile
		-rm -f macros.sed
		echo "s,%VERSION%,$(VERSION),g" >> macros.sed
		echo "s,%PERLPROG%,$(PERLPROG),g" >> macros.sed


# For Linux systems
install-docs:	hindent.0 README COPYING CHANGES BUGS
	$(INSTALL) -m 755 -o bin -g bin -d /usr/doc/hindent$(VERSION)
	$(INSTALL) -c -m 644 -o bin -g bin hindent.0 /usr/doc/hindent$(VERSION)
	$(INSTALL) -c -m 644 -o bin -g bin README /usr/doc/hindent$(VERSION)
	$(INSTALL) -c -m 644 -o bin -g bin COPYING /usr/doc/hindent$(VERSION)
	$(INSTALL) -c -m 644 -o bin -g bin CHANGES /usr/doc/hindent$(VERSION)
	$(INSTALL) -c -m 644 -o bin -g bin BUGS /usr/doc/hindent$(VERSION)

clean:
	-rm -f macros.sed tool.out
# don't clean: indent.0 indent.txt  (let these be distributed)


#
# Author's section ---------------------------------
#

PUB=/home/wwwtest/html/pub

dist:	clean
	d=`pwd`; d=`basename $$d`; cd ..; tar czf /tmp/$$d.tar.gz \
			--exclude RCS \
			--exclude Old \
			$$d; echo "done.  distribution file is /tmp/$$d.tar.gz"

dist-install:	dist
	$(INSTALL) -m 664 -o pab -g www /tmp/hindent$(VERSION).tar.gz $(PUB)
	$(INSTALL) -m 664 -o pab -g www README $(PUB)/hindent$(VERSION)-readme.txt
	$(INSTALL) -m 664 -o pab -g www CHANGES $(PUB)/hindent$(VERSION)-changes.txt
	$(INSTALL) -m 664 -o pab -g www hindent.txt $(PUB)/hindent$(VERSION)-manpage.txt
#---