git.ntnlv.ca
Repositories
Help
Report an Issue
processeur-decriture.git
Code
Commits
Branches
Tags
Search
Tree:
c2726fc
Branches
Tags
dev
main
processeur-decriture.git
makefile
initialisation
David Valentine
commited
c2726fc
at 2024-12-06 22:19:45
makefile
Blame
History
Raw
# Makefile # documents ############################################################# # 1. argument obligatoire en ligne de commande ############################################################# # passer le nom projet du projet à traiter # avec la variable PROJET # le projet doit être un dossier de src/ # exemple : $ make PROJET=proposition ############################################################# # variables ############################################################# SHELL := /bin/bash # Timestamp #timestamp := $(shell date +%Y-%m-%dT%H:%M:%S-05:00) date := $(shell date +%Y-%m-%dT%H:%M:%S-05:00) #hash := $(shell cat .git/refs/heads/main) # Name name = $(PROJET) # Varialbles pour les sources src_dir = ./src/$(name) # *.md important, sinon il traite les dossiers et cela génère une erreur src = $(src_dir)/*.md config = $(src_dir)/config.yml # Variables pour les extrants zip = ./archives/$(name).zip docs = ./docs/$(name) ############################################################# # receipes ############################################################# .PHONY: all all: projet $(zip) .PHONY: projet projet: ifndef PROJET @echo "Aucun projet sélectionné. Bye." @exit 1 endif $(zip): $(config) $(src_dir)/* @echo "Projet sélectionné : $(PROJET)" @echo "============================================" @echo "\n" pandoc $(src) \ --defaults $(config) \ --metadata-file ./src/global-metadata.yml \ --metadata-file $(src_dir)/abstract.yml \ --metadata-file $(src_dir)/metadata.yml \ --metadata-file $(src_dir)/theme.yml \ --metadata=date:$(date) \ --toc \ --log $(src_dir)/log.json \ --output $@ unzip -o -O UTF-8 $@ -d $(docs) .PHONY: antidote antidote: /usr/local/bin/Antidote9 $(CORRIGER) wordcount: pandoc $(SOURCE) \ --lua-filter ./filters/wordcount.lua