From cc0482e692a567de20eab371487d5e0e5a6b5aea Mon Sep 17 00:00:00 2001 From: Attila Kovacs Date: Tue, 19 Nov 2024 13:06:34 +0100 Subject: [PATCH] man pages for tools. --- Makefile | 9 ++++++++- README.md | 11 +++++++++-- man/man1/smaxValue.1.gz | Bin 0 -> 796 bytes man/man1/smaxWrite.1.gz | Bin 0 -> 914 bytes tools/smaxValue.c | 2 +- tools/smaxWrite.c | 2 -- 6 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 man/man1/smaxValue.1.gz create mode 100644 man/man1/smaxWrite.1.gz diff --git a/Makefile b/Makefile index e85e4b8..9578caf 100644 --- a/Makefile +++ b/Makefile @@ -113,6 +113,7 @@ includedir ?= $(prefix)/include datarootdir ?= $(prefix)/share datadir ?= $(datarootdir) mydatadir ?= $(datadir)/smax-clib +mandir ?= $(datarootdir)/man docdir ?= $(datarootdir)/doc/smax-clib htmldir ?= $(docdir)/html @@ -121,7 +122,7 @@ INSTALL_PROGRAM ?= install INSTALL_DATA ?= install -m 644 .PHONY: install -install: install-libs install-tools install-headers install-apidoc +install: install-libs install-tools install-man install-headers install-apidoc .PHONY: install-libs install-libs: @@ -143,6 +144,12 @@ else @echo "WARNING! Skipping tools install: needs 'tools'" endif +.PHONY: install-man +install-man: + @echo "installing man pages under $(DESTDIR)$(mandir)." + @install -d $(DESTDIR)$(mandir)/man1 + $(INSTALL_DATA) -D man/man1/* $(DESTDIR)$(mandir)/man1 + .PHONY: install-headers install-headers: @echo "installing headers to $(DESTDIR)$(includedir)" diff --git a/README.md b/README.md index bfd3786..b9af9fc 100644 --- a/README.md +++ b/README.md @@ -137,10 +137,17 @@ system-wide install you may simply run: $ sudo make install ``` -Or, to install in some other locations, you may set a prefix. For example to install under `/opt` instead, you can: +Or, to install in some other locations, you may set a prefix and/or `DESTDIR`. For example, to install under `/opt` +instead, you can: ```bash - $ sudo make prefix=/opt install + $ sudo make prefix="/opt" install +``` + +Or, to stage the installation (to `/usr`) under a 'build root': + +```bash + $ make DESTDIR="/tmp/stage" install ``` ----------------------------------------------------------------------------- diff --git a/man/man1/smaxValue.1.gz b/man/man1/smaxValue.1.gz new file mode 100644 index 0000000000000000000000000000000000000000..80ee14ec4ed0aad7b2e06bfc7f360fdeee903e28 GIT binary patch literal 796 zcmV+%1LOQ3iwFP!0000017%dfZsRr(z4I#uzN7_YZL_DMXbUJ?12K}dvzD^EL7W3E zjV!hjsht_w@!uDu6ieQmNDerU?+xEfoZSL9`t_@>JA`W$r?;?5J}=Z5+|J=khh&gJ zTRY|$3R?!j3&Rwxw`sQy{QP+(~+7QonQ(t`ELr&}j6 zz)~RB7Ip|7V*%oTP{`l`;ou1|l;j#vJsHh##Jcut?ud|E*T37KXwNkA$l{ zgDkpfBVcjl1)N$0Z3`$&gO-i65hzDyZ*1VkNJiISyJm+JPYB3JAYlA8+F>B0d18?W zFy6;-Wvu*u6~R?mJ1u_0LdNd>j`ZjYZIY<4w9;bu#2Pr8AlscXPjBXBfQfd&>W9fK?3<5ayJ)d#Z& z`ERzr(Ek=3O6ZZW#s;nMAa?kP{-YR#I-6@x+L3B?QS`bk=E$t+T&239xdy=g@U%m3`XGX{Ahfpp;&9+MgA zfE3C#biI0H^o4FQH>JrZ^T5k~Kd7LG=o@3U_`b{_&64aforM>FQ!7V}u6Vp;m#d&&hV!W$N0Z+d`_~Lywq`}>7c2IvFQHp>yR!Mkld&1 aStz-mkKf1$!Y|jqD)m2?QvCZU1^@v5NsB1} literal 0 HcmV?d00001 diff --git a/man/man1/smaxWrite.1.gz b/man/man1/smaxWrite.1.gz new file mode 100644 index 0000000000000000000000000000000000000000..86326384aa6459e0787fa76f209fa18838786e67 GIT binary patch literal 914 zcmV;D18w{tiwFP!0000019ep2Z`(Eye&=8DAumn zlnEAOP<&j>Kc~=vJg0ZXUk{tdVqJ**{*qJdtNZ;t?5i#I)jISo@2jo&lA>~qO4ay% zwf#DVm*+6+?+^TVP+K2Tc)b*#79XBgB42M&Db2|9JYiX`ig(-f<8Hlq_#O^P>0uqZ zR#IROLdpPJ;aMHoOi=z0S5(%4#@k}O%y6pNG1g0{n6K)z?(ug=T2+eW`1(jr(Lpnm zWD|xHWe{TQ?i=?Im30k;44gmbnEBoZZti?{7{6L)TXvzJ4FordTOsn@qsZ^K*v|v5 zGF)Ll-_Iif{5sM5k(_6ck?_Gf9yybruss)6Cfv?4%qndu#19{wGSBhL(J5Acttc-Q zqlKyB=%pw)Ak+-08a7^8Lt2F%!A=ZMN;aJiYCgG^gwBCo%@C8z{Kr>%cG6w3@Tg&bK)9xCJ>!ea!aL&*x-5 zfd~G`|~2OBs;s40vZH`K$oT&k)^#V2;L`I_i~xa6yrvK{$Xc-;HC{dj-)&G zHxU7A&j_wFWm1tm443RZxjuvMqF{+c6xDRiA>ytsiVRwyp-|SG2uy7q_^OgZlzY-J z%Spqe;T~G%Jm;6Di4hgpp{&VK8Q6JrQHWr1_8!VebyTt=eF3J-AV)5CDNjY64ykog z;|wFfjVi6S2G=U*9JB0hb~A)}XM#ecA7Fv3V(n>xL&VczHgjNTanjk7gknBsR+Mtd+zG`BZ zJf|Y9Qzi_i#2h}5k>uofk+io1>&4UV{bnl`At+7w!yc*h_=VDM{w@7}S?s=+73DR# oBRQF~?0y>*D^@EkJ`|g)WKLY Print as , e.g. 'int8', 'float', 'string', 'raw'.\n"); printf(" -n Print as number of elements.\n"); printf(" -l List field names contained in structures.\n"); - printf(" -e Print errors/warning to stderr.\n"); + printf(" -e Print errors/warnings to stderr.\n"); printf(" -s Use a specific host as the SMA-X database server.\n\n"); printf(" This tool always returns a value (or the requested number of values),\n"); printf(" It defaults to zero(es) for any elements not in the SMA-X database.\n"); diff --git a/tools/smaxWrite.c b/tools/smaxWrite.c index 8fc9ebd..7a23239 100644 --- a/tools/smaxWrite.c +++ b/tools/smaxWrite.c @@ -20,8 +20,6 @@ static char *host = SMAX_DEFAULT_HOSTNAME; static char *delims = ",;"; static char *sType; -#define NOT_ENOUGH_TOKENS 2 - static void syntax() { printf("\n"); printf(" Syntax: smaxWrite -t [options] table:key value\n\n");