Fix portability problems going to OpenBSD
The earlier Makefile assumed GNU tooling in the following ways: 1. install having a -t target directory argument. 2. make having an internal rule to make a target based only on... ansi2text: ansi2text.o 3. man pages go to /usr/local/share/man, which is not the location on OpenBSD Made a note about installation, pointing out the use of the MANDIR variable to correct the man page destination. Added an uninstall target.
This commit is contained in:
parent
632419800b
commit
308f5650e1
9
Makefile
9
Makefile
@ -12,11 +12,16 @@ MANDIR=$(PREFIX)/share/man
|
||||
all: ansi2text
|
||||
|
||||
ansi2text: ansi2text.o
|
||||
$(CC) -o $@ $>
|
||||
|
||||
install: ansi2text
|
||||
install -d $(BINDIR) $(MANDIR) $(MANDIR)/man1
|
||||
install -m 755 -t $(BINDIR) ansi2text
|
||||
install -m 444 -t $(MANDIR)/man1 ansi2text.1
|
||||
install -m 755 ansi2text $(BINDIR)
|
||||
install -m 444 ansi2text.1 $(MANDIR)/man1
|
||||
|
||||
clean:
|
||||
-rm ansi2text ansi2text.o
|
||||
|
||||
uninstall:
|
||||
-rm $(BINDIR)/ansi2text
|
||||
-rm $(MANDIR)/man1/ansi2text.1
|
||||
|
11
README
11
README
@ -5,3 +5,14 @@ Nathanial Sloss where he included its source. See
|
||||
netbsd_gnat_change_request.origin which was saved from
|
||||
https://gnats.netbsd.org/48092
|
||||
|
||||
Installation:
|
||||
|
||||
make
|
||||
sudo make install
|
||||
|
||||
Note: on some systems you may want to set MANDIR, e.g. ...
|
||||
|
||||
sudo make install MANDIR=/usr/local/man
|
||||
|
||||
The default is to put the man page under /usr/local/share/man.
|
||||
See Makefile.
|
Loading…
Reference in New Issue
Block a user