1
0
mirror of https://github.com/upx/upx.git synced 2025-08-11 22:52:30 +08:00
Files
upx/doc/Makefile

83 lines
1.5 KiB
Makefile
Raw Normal View History

2006-08-29 23:08:26 +02:00
#
# UPX doc Makefile - needs GNU make
2006-08-29 23:08:26 +02:00
#
MAKEFLAGS += -rR
.SUFFIXES:
2000-05-19 16:04:55 +00:00
SHELL = /bin/sh
2006-08-29 23:08:26 +02:00
# internal make variables
comma := ,
empty :=
space := $(empty) $(empty)
tab := $(empty) $(empty)
# /***********************************************************************
# //
# ************************************************************************/
2006-11-16 21:14:58 +01:00
top_srcdir ?= ..
2000-05-19 16:04:55 +00:00
PACKAGE = upx
VERSION_DATE := $(shell sed -n 's/^.*UPX_VERSION_DATE_ISO .*"\(.*\)".*/\1/p' $(top_srcdir)/src/version.h)
VERSION := $(shell sed -n 's/^.*UPX_VERSION_STRING .*"\(.*\)".*/\1/p' $(top_srcdir)/src/version.h)
2000-05-19 16:04:55 +00:00
2006-08-29 23:08:26 +02:00
RTRIM := sed -e 's/[ $(tab)]*$$//'
DETAB2 := sed -e 's/$(tab)/ /g'
2000-05-19 16:04:55 +00:00
BUILT_SOURCES = upx.1 upx-doc.html upx-doc.txt
2000-05-19 16:04:55 +00:00
###
2006-06-17 18:54:11 +02:00
### targets
2000-05-19 16:04:55 +00:00
###
all: $(BUILT_SOURCES)
2006-06-17 18:54:11 +02:00
mostlyclean clean distclean maintainer-clean:
rm -f $(BUILT_SOURCES) pod2htm*
2000-05-19 16:04:55 +00:00
.PHONY: all mostlyclean clean distclean maintainer-clean
2000-05-19 16:04:55 +00:00
###
### rules
###
.SUFFIXES: .1 .html .man .pod .ps .tex .txt
2000-05-19 16:04:55 +00:00
2006-06-17 18:54:11 +02:00
%.1 : %.pod
2006-08-21 16:40:20 +02:00
pod2man --center=" " --release="$(PACKAGE) $(VERSION)" --date="$(VERSION_DATE)" $< | $(RTRIM) > $@
2017-05-14 19:21:04 +02:00
test -s $@
2000-05-19 16:04:55 +00:00
%-doc.html : %.pod
2006-08-21 16:40:20 +02:00
pod2html --noindex $< | $(RTRIM) | $(DETAB2) > $@
2006-06-17 18:54:11 +02:00
@rm -f pod2htm*
2017-05-14 19:21:04 +02:00
test -s $@
2006-06-17 18:54:11 +02:00
%.man : %.1
2006-08-21 16:40:20 +02:00
nroff -man $< | $(RTRIM) > $@
2017-05-14 19:21:04 +02:00
test -s $@
2000-05-19 16:04:55 +00:00
2006-06-17 18:54:11 +02:00
%.ps : %.1
2006-08-21 16:40:20 +02:00
groff -man $< | $(RTRIM) > $@
2017-05-14 19:21:04 +02:00
test -s $@
2000-05-19 16:04:55 +00:00
2006-06-17 18:54:11 +02:00
%.tex : %.pod
pod2latex $<
2017-05-14 19:21:04 +02:00
test -s $@
2006-06-17 18:54:11 +02:00
%-doc.txt : %.pod
pod2text < $< | $(RTRIM) > $@
test -s $@
2000-05-19 16:04:55 +00:00
###
### dependencies
###
$(BUILT_SOURCES): $(top_srcdir)/src/version.h $(MAKEFILE_LIST)
2006-11-16 21:14:58 +01:00
.DELETE_ON_ERROR: $(BUILT_SOURCES)
2000-05-19 16:04:55 +00:00