From 6b08841829c2f2fabce595f54f9437f841fd8737 Mon Sep 17 00:00:00 2001 From: Santiago Soler Date: Sat, 27 Mar 2021 15:53:32 -0300 Subject: Improve Makefile --- Makefile | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 462a001..0629863 100644 --- a/Makefile +++ b/Makefile @@ -1,13 +1,22 @@ # Construye tu sitio web en texto-plano con Jekyll -# -# Para usar este makefile desde texto-plano.xyz corre make modificando el -# comando del compilador: -# -# make JEKYLL=jekyll26 +# ------------------------------------------------ +BUILD_DIR = _site +DEPLOY_DIR = $(HOME)/public_html +RSYNC = rsync +RSYNC_ARGS = -av -JEKYLL := bundle exec jekyll +# Determina qué comando utilizar para llamar a jekyll +ifeq (, $(shell which jekyll26 2> /dev/null)) + JEKYLL = bundle exec jekyll +else + JEKYLL = jekyll26 +endif -all: + + +all: build + +build: $(JEKYLL) build serve: @@ -15,3 +24,6 @@ serve: clean: $(JEKYLL) clean + +deploy: build $(DEPLOY_DIR) + $(RSYNC) $(RSYNC_ARGS) $(BUILD_DIR)/ $(DEPLOY_DIR) -- cgit v1.2.3