nihdoc

WIP markup parser (txt -> html)
git clone git://git.alexkarle.com.com/blag
Log | Files | Refs | README | LICENSE

Makefile (629B) [raw]


      1 # nihdoc makefile
      2 CFLAGS = -g -O2 -Wall -Wpedantic -Wextra
      3 
      4 nihdoc: nihdoc.c
      5 	$(CC) $(CFLAGS) -o $@ nihdoc.c
      6 
      7 .PHONY: check
      8 check: nihdoc
      9 	@for f in test/*.txt; do \
     10 		printf "$$f ... "; \
     11 		base=$$(basename $$f txt)html; \
     12 		if [ -z $(GENBASE) ]; then \
     13 			./nihdoc < $$f > /tmp/$$base; \
     14 			diff -u test/$$base /tmp/$$base; \
     15 			echo "success!"; \
     16 		else \
     17 			./nihdoc < $$f > test/$$base; \
     18 			echo "generated!"; \
     19 		fi; \
     20 	done
     21 
     22 .PHONY: clean
     23 clean:
     24 	rm -f nihdoc
     25 
     26 .PHONY: install
     27 install: nihdoc
     28 	mkdir -p $(HOME)/bin $(HOME)/share/man/man1
     29 	install -m 555 nihdoc $(HOME)/bin
     30 	install -m 444 nihdoc.1 $(HOME)/share/man/man1