make getpeername() return the original socket address which before it was intercepted
[hband-tools.git] / tabdata / Makefile
blob57f909f392a83538202dfcb9a3d948070565e815
2 BIN_DIR = /usr/tool
3 LIB_DIR = /usr/lib/tool/perl5/tabdata
5 TOOLS = \
6 csv2td \
7 kvpairs2td \
8 mrkv2td \
9 td2html \
10 td2kvpairs \
11 td2mrkv \
12 td-add-headers \
13 td-alter \
14 td-collapse \
15 td-disamb-headers \
16 td-expand \
17 td-filter \
18 td-gnuplot \
19 td-keepheader \
20 td-lpstat \
21 td-ls \
22 td-pivot \
23 td-ps \
24 td-rename \
25 td-select \
26 td-sort \
27 td-trans \
28 td-trans-fixcol \
29 td-trans-group \
30 td-trans-gshadow \
31 td-trans-ls \
32 td-trans-mount \
33 td-trans-passwd \
34 td-trans-shadow \
35 vcf2td \
38 TARGET_TOOLS = $(foreach filename,$(TOOLS),$(BIN_DIR)/$(filename))
41 install-all: depcheck $(TARGET_TOOLS) $(LIB_DIR)/common.pl install-manpages
43 .PHONY: list-tools
44 list-tools:
45 @echo $(TOOLS) | tr " " "\n" | sort
48 $(TARGET_TOOLS): $(BIN_DIR)/%: %
49 install $(notdir $@) $(BIN_DIR)/
50 @echo remove $@ >> uninstall.sh
52 $(LIB_DIR)/common.pl: common.pl $(LIB_DIR)
53 install $(notdir $@) $(LIB_DIR)/
54 @echo remove $@ >> uninstall.sh
56 $(LIB_DIR):
57 mkdir -p $@
58 @echo remove $@ >> uninstall.sh
60 .PHONY: depcheck
61 depcheck:
62 $(info Checking dependencies...)
63 perl -MSwitch -e 1
64 perl -MList::MoreUtils -e 1
65 perl -MPod::Usage -e 1
66 perl -MMIME::QuotedPrint -e 1
67 perl -MEncode -e 1
68 perl -MText::CSV -e 1
69 perl -MMath::Cartesian::Product -e 1
71 .PHONY: try-satisfy-dependencies
72 try-satisfy-dependencies:
73 apt install libswitch-perl liblist-moreutils-perl libtext-csv-perl libmath-cartesian-product-perl
76 REPO_ROOT = ..
78 include ../user-tools/Makefile.documentation.mk
81 index.md: SHELL = bash
82 index.md: $(TOOLS)
83 echo -ne "# Tabdata commands\n\n" > $@~
84 for file in $(TOOLS); do echo -ne "- [$$file](#$$file)\n"; done >> $@~
85 for file in $(TOOLS); do \
86 echo -ne "\n" ;\
87 echo -ne "# $$file\n\n" ;\
88 pod2markdown --utf8 < "$$file" |\
89 perl -pe 's/^#/##/; s/\b([a-z0-9.-]+)(\(\d)/[$$1](#$$1)$$2/g' ;\
90 done >> $@~
91 mv $@~ $@