Ajout d'un avertissement que l'algo du rang majoritaire utilisé ici est totalement...
[reloto-libreoffice.git] / Makefile
index fcfbcc43046bd1a2c3f9acfe041d403761824b01..502a8c04d35f9d6c14f333e0ea06959fa02bced6 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,28 @@
 python:=python3
 
+# Start LibreOffice Calc in server-mode
 %.ods/localc:
-       localc --accept="socket,host=localhost,port=2002;urp;StarOffice.ServiceManager" $*.ods &
+       export PYSCRIPT_LOG_STDOUT=1
+       export PYSCRIPT_LOG_LEVEL=DEBUG
+       localc --accept="socket,host=localhost,port=2002;urp;StarOffice.ServiceManager" $*.ods
+
+# Put a macro into an Open Document Spreadsheet
 %.ods/pack_macro: %.py
        $(python) pack_macro.py $*.py $*.ods
+
+# Generate ballots for a Majority Judgment
 ballots:
        $(python) -c "import jugements; jugements.MakeBallots()"
        pdfnup --a4paper --nup 2x2 --outfile bulletins.pdf bulletins/*.pdf
+
+# Generate results of a Majority Judgment
 results:
        $(python) -c "import jugements; jugements.MakeResults()"
+
+# Join PDFs
+sécu-sauvage.pdf: présentation.pdf résultats.pdf
+       pdfjoin --outfile $@ --paper a4paper --rotateoversize false $^
+
+# Watermark PDF
+%-prototype.pdf: %.pdf
+       pdftk $*.pdf background prototype.pdf output $*-prototype.pdf