5 # - install: install LCOV tools and man pages on the system
6 # - uninstall: remove tools and man pages from the system
7 # - dist: create files required for distribution, i.e. the lcov.tar.gz
8 # and the lcov.rpm file. Just make sure to adjust the VERSION
9 # and RELEASE variables below - both version and date strings
10 # will be updated in all necessary files.
11 # - clean: remove all generated files
17 CFG_DIR
:= $(PREFIX
)/etc
18 BIN_DIR
:= $(PREFIX
)/usr
/bin
19 MAN_DIR
:= $(PREFIX
)/usr
/share
/man
20 TMP_DIR
:= /tmp
/lcov-tmp.
$(shell echo
$$$$)
21 FILES
:= $(wildcard bin
/*) $(wildcard man
/*) README CHANGES Makefile \
22 $(wildcard rpm
/*) lcovrc
24 .PHONY
: all info clean install uninstall rpms
29 @echo
"Available make targets:"
30 @echo
" install : install binaries and man pages in PREFIX (default /)"
31 @echo
" uninstall : delete binaries and man pages from PREFIX (default /)"
32 @echo
" dist : create packages (RPM, tarball) ready for distribution"
40 bin
/install.sh bin
/lcov
$(BIN_DIR
)/lcov
41 bin
/install.sh bin
/genhtml
$(BIN_DIR
)/genhtml
42 bin
/install.sh bin
/geninfo
$(BIN_DIR
)/geninfo
43 bin
/install.sh bin
/genpng
$(BIN_DIR
)/genpng
44 bin
/install.sh bin
/gendesc
$(BIN_DIR
)/gendesc
45 bin
/install.sh man
/lcov
.1 $(MAN_DIR
)/man1
/lcov
.1
46 bin
/install.sh man
/genhtml
.1 $(MAN_DIR
)/man1
/genhtml
.1
47 bin
/install.sh man
/geninfo
.1 $(MAN_DIR
)/man1
/geninfo
.1
48 bin
/install.sh man
/genpng
.1 $(MAN_DIR
)/man1
/genpng
.1
49 bin
/install.sh man
/gendesc
.1 $(MAN_DIR
)/man1
/gendesc
.1
50 bin
/install.sh man
/lcovrc
.5 $(MAN_DIR
)/man5
/lcovrc
.5
51 bin
/install.sh lcovrc
$(CFG_DIR
)/lcovrc
54 bin
/install.sh
--uninstall bin
/lcov
$(BIN_DIR
)/lcov
55 bin
/install.sh
--uninstall bin
/genhtml
$(BIN_DIR
)/genhtml
56 bin
/install.sh
--uninstall bin
/geninfo
$(BIN_DIR
)/geninfo
57 bin
/install.sh
--uninstall bin
/genpng
$(BIN_DIR
)/genpng
58 bin
/install.sh
--uninstall bin
/gendesc
$(BIN_DIR
)/gendesc
59 bin
/install.sh
--uninstall man
/lcov
.1 $(MAN_DIR
)/man1
/lcov
.1
60 bin
/install.sh
--uninstall man
/genhtml
.1 $(MAN_DIR
)/man1
/genhtml
.1
61 bin
/install.sh
--uninstall man
/geninfo
.1 $(MAN_DIR
)/man1
/geninfo
.1
62 bin
/install.sh
--uninstall man
/genpng
.1 $(MAN_DIR
)/man1
/genpng
.1
63 bin
/install.sh
--uninstall man
/gendesc
.1 $(MAN_DIR
)/man1
/gendesc
.1
64 bin
/install.sh
--uninstall man
/lcovrc
.5 $(MAN_DIR
)/man5
/lcovrc
.5
65 bin
/install.sh
--uninstall lcovrc
$(CFG_DIR
)/lcovrc
67 dist: lcov-
$(VERSION
).
tar.gz lcov-
$(VERSION
)-$(RELEASE
).noarch.rpm \
68 lcov-
$(VERSION
)-$(RELEASE
).src.rpm
70 lcov-
$(VERSION
).
tar.gz
: $(FILES
)
72 mkdir
$(TMP_DIR
)/lcov-
$(VERSION
)
73 cp
-r
* $(TMP_DIR
)/lcov-
$(VERSION
)
74 find
$(TMP_DIR
)/lcov-
$(VERSION
) -name CVS
-type d | xargs
rm -rf
75 make
-C
$(TMP_DIR
)/lcov-
$(VERSION
) clean
76 bin
/updateversion.pl
$(TMP_DIR
)/lcov-
$(VERSION
) $(VERSION
) $(RELEASE
)
78 tar cfz
$(TMP_DIR
)/lcov-
$(VERSION
).
tar.gz lcov-
$(VERSION
)
79 mv
$(TMP_DIR
)/lcov-
$(VERSION
).
tar.gz .
82 lcov-
$(VERSION
)-$(RELEASE
).noarch.rpm
: rpms
83 lcov-
$(VERSION
)-$(RELEASE
).src.rpm
: rpms
85 rpms
: lcov-
$(VERSION
).
tar.gz
87 mkdir
$(TMP_DIR
)/BUILD
89 mkdir
$(TMP_DIR
)/SOURCES
90 mkdir
$(TMP_DIR
)/SRPMS
91 cp lcov-
$(VERSION
).
tar.gz
$(TMP_DIR
)/SOURCES
92 cd
$(TMP_DIR
)/BUILD
; \
93 tar xfz
$(TMP_DIR
)/SOURCES
/lcov-
$(VERSION
).
tar.gz \
94 lcov-
$(VERSION
)/rpm
/lcov.spec
95 rpmbuild
--define '_topdir $(TMP_DIR)' \
96 -ba
$(TMP_DIR
)/BUILD
/lcov-
$(VERSION
)/rpm
/lcov.spec
97 mv
$(TMP_DIR
)/RPMS
/noarch
/lcov-
$(VERSION
)-$(RELEASE
).noarch.rpm .
98 mv
$(TMP_DIR
)/SRPMS
/lcov-
$(VERSION
)-$(RELEASE
).src.rpm .