From e4349fb0143b31408cee58a626fb08e469172f56 Mon Sep 17 00:00:00 2001 From: Chris Cromer Date: Tue, 6 Nov 2018 14:31:13 -0300 Subject: [PATCH] add check for pdflatex, if installed generate the informe --- Makefile | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index e6d9458..5590787 100644 --- a/Makefile +++ b/Makefile @@ -6,16 +6,20 @@ ODIR=obj SRC=src/sort.c OBJ=$(SRC:.c=.o) +all: sort informe + sort: $(OBJ) $(CC) -o $@ $^ $(LDFLAGS) -clean: - rm -f src/*.o sort - informe: +# if pdflatex is installed create the informe +ifneq (, $(shell which pdflatex)) make -C doc + mv doc/Informe.pdf Informe.pdf +endif -cleaninforme: +clean: + rm -f src/*.o sort Informe.pdf make -C doc clean -.PHONY: sort clean informe cleaninforme +.PHONY: all clean informe