mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-22 14:43:03 +01:00
Make asciidoc 'optional'
Run `make doc` in the build directory after editing the asciidoc to regenerate the manpages. Changes to asciidoc source and generated man pages will need to be commited together. Signed-off-by: Loui Chang <louipc.ist@gmail.com>
This commit is contained in:
parent
690f0221b5
commit
1a8fdb1b99
@ -4,8 +4,8 @@ compiler:
|
||||
# - clang # Fix me
|
||||
|
||||
before_script:
|
||||
# Installing yasm (needed for compiling vpx) and openal, asciidoc
|
||||
- sudo apt-get -yq install yasm libopenal-dev libconfig-dev libalut-dev asciidoc
|
||||
# Installing yasm (needed for compiling vpx) and openal
|
||||
- sudo apt-get -yq install yasm libopenal-dev libconfig-dev libalut-dev
|
||||
# Installing libsodium, needed for toxcore
|
||||
- git clone https://github.com/jedisct1/libsodium.git libsodium
|
||||
- cd libsodium
|
||||
|
@ -23,7 +23,8 @@ Toxic is a [Tox](https://tox.im)-based instant messenging client which formerly
|
||||
* [libnotify](https://developer.gnome.org/libnotify) (for Debian based systems, 'libnotify-dev')
|
||||
|
||||
##### Documentation
|
||||
* [Asciidoc](http://asciidoc.org/index.html) Only required for building manpages.
|
||||
* [Asciidoc](http://asciidoc.org/index.html) Only required for regenerating manpages.
|
||||
* Run `make doc` in the build directory after editing the asciidoc to regenerate the manpages.
|
||||
|
||||
### Compiling
|
||||
1. `cd build/`
|
||||
|
@ -67,14 +67,13 @@ toxic: $(OBJ)
|
||||
@$(CC) $(CFLAGS) -o $*.o -c $(SRC_DIR)/$*.c
|
||||
@$(CC) -MM $(CFLAGS) $(SRC_DIR)/$*.c > $*.d
|
||||
|
||||
doc: $(MANFILES)
|
||||
doc: $(MANFILES:%=$(DOC_DIR)/%)
|
||||
|
||||
%: $(DOC_DIR)/%.asc
|
||||
@echo " Generating man page $@"
|
||||
$(DOC_DIR)/%: $(DOC_DIR)/%.asc
|
||||
@echo " Generating man page $(@F)"
|
||||
@a2x -f manpage -a revdate=$(shell git log -1 --date=short --format="%ad" $<) \
|
||||
-a manmanual="toxic manual" -a mansource=toxic \
|
||||
-a manversion=$(VERSION) -a datadir=$(DATADIR) $<
|
||||
@mv $(DOC_DIR)/$@ .
|
||||
-a manversion=__VERSION__ -a datadir=__DATADIR__ $<
|
||||
|
||||
clean:
|
||||
rm -rf *.d *.o toxic
|
||||
@ -84,4 +83,4 @@ clean:
|
||||
|
||||
-include $(CFG_DIR)/targets/*.mk
|
||||
|
||||
.PHONY: clean all
|
||||
.PHONY: clean all doc
|
||||
|
@ -29,7 +29,9 @@ install: toxic doc
|
||||
section=$(abspath $(DESTDIR)/$(MANDIR))/man`echo $$f | rev | cut -d "." -f 1` ;\
|
||||
file=$$section/$$f ;\
|
||||
mkdir -p $$section ;\
|
||||
install -m 0644 $$f $$file ;\
|
||||
install -m 0644 $(DOC_DIR)/$$f $$file ;\
|
||||
sed -i'' -e 's:__VERSION__:'$(VERSION)':g' $$file ;\
|
||||
sed -i'' -e 's:__DATADIR__:'$(abspath $(DATADIR))':g' $$file ;\
|
||||
gzip -f -9 $$file ;\
|
||||
done
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user