Skip to content

Commit

Permalink
man pages for tools.
Browse files Browse the repository at this point in the history
  • Loading branch information
attipaci committed Nov 19, 2024
1 parent 5476188 commit f19eb78
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 6 deletions.
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:
Expand All @@ -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)"
Expand Down
11 changes: 9 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

-----------------------------------------------------------------------------
Expand Down
Binary file added man/man1/smaxValue.1.gz
Binary file not shown.
Binary file added man/man1/smaxWrite.1.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion tools/smaxValue.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ static void usage() {
printf(" -t <type> Print as <type>, e.g. 'int8', 'float', 'string', 'raw'.\n");
printf(" -n <count> Print as <count> 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 <host> 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");
Expand Down
2 changes: 0 additions & 2 deletions tools/smaxWrite.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <type> [options] table:key value\n\n");
Expand Down

0 comments on commit f19eb78

Please sign in to comment.