File: Makefile.man2html

package info (click to toggle)
x2goclient 4.1.2.1-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 9,224 kB
  • sloc: cpp: 26,696; perl: 1,280; sh: 525; makefile: 145
file content (24 lines) | stat: -rw-r--r-- 595 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/make -f

MAN2HTML_BIN = $(shell which man2html)
MAN2HTML_SRC   = man
BUILD_DIR = .build_man2html
MAN2HTML_DEST = $(BUILD_DIR)/html

man_pages = $(cd $(MAN2HTML_SRC) && find * -type f)

all: build

build: build_man2html

build_man2html:
	if [ -n "$(MAN2HTML_BIN)" ]; then \
		mkdir -p $(MAN2HTML_DEST); \
		for man_page in $(man_pages); do mkdir -p $$(dirname $(MAN2HTML_DEST)/$$man_page); done; \
		for man_page in $(man_pages); do $(MAN2HTML_BIN) $(MAN2HTML_SRC)/$$man_page > $(MAN2HTML_DEST)/$$man_page.html; done; \
	fi

clean: clean_man2html

clean_man2html:
	rm -Rf $(BUILD_DIR)