git.ntnlv.ca
Repositories
Help
Report an Issue
processeur-decriture.git
Code
Commits
Branches
Tags
Search
Tree:
5ee6f1e
Branches
Tags
dev
main
processeur-decriture.git
makefile
ajustements aux constantes intrants/extrants
David Valentine
commited
5ee6f1e
at 2025-11-18 02:00:42
makefile
Blame
History
Raw
# Makefile # documents ############################################################# # 1. argument obligatoire en ligne de commande ############################################################# # Passer le nom du projet à traiter : # avec la variable PROJET. # Le nom du projet doit correspondre avec le nom d'un dossier de ./src/ # exemple : $ make PROJET=proposition # remarque : variable à spécifier pour toutes les recettes # qui l'utilisent. ############################################################# # variables ############################################################# SHELL := /bin/bash # Timestamp # -05:00 date := $(shell date +%Y-%m-%dT%H:%M:%S-05:00) # -04:00 #date := $(shell date +%Y-%m-%dT%H:%M:%S-04:00) #hash := $(shell cat .git/refs/heads/main) # Name name = $(PROJET) # Variables pour les sources config_screen = ./src/config-screen.yml config_print = ./src/config-print.yml src_dir = ./src/$(name) src = $(src_dir)/*.md # *.md important, sinon il traite les dossiers # Variables pour les extrants zip = ./archives/$(name).zip dist = ./dist/$(name) print = ./dist/$(name)/$(name).html ############################################################# # 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