clean up makefile
authorJacob Lifshay <programmerjake@gmail.com>
Tue, 4 Apr 2023 02:35:53 +0000 (19:35 -0700)
committerJacob Lifshay <programmerjake@gmail.com>
Tue, 4 Apr 2023 02:35:53 +0000 (19:35 -0700)
openpower/sv/rfc/Makefile

index a06826d424601740d818d47d08ab391680518a38..16e39328d0aea0806ae4957e4a1bd58e5d2625f0 100644 (file)
@@ -1,36 +1,17 @@
-all: ls001.pdf ls002.pdf ls003.pdf ls004.pdf ls005.pdf ls006.pdf ls007.pdf
+.PHONY: all clean upload
 
-LSO10_FILES = ls010.mdwn ../svp64.mdwn \
-              ../normal.mdwn \
-              ../ldst.mdwn \
-              ../branches.mdwn \
-              ../po9_encoding.mdwn \
-              ../cr_ops.mdwn
+all: $(patsubst %.mdwn,%.pdf,$(wildcard ls[0-9][0-9][0-9].mdwn))
 
-ls010.pdf: $(LS010_FILES)
-       cd ../.. && pandoc \
-            --filter pandoc_img.py \
-               -V margin-top=0.9in \
-               -V margin-bottom=0.9in \
-               -V margin-left=0.4in \
-               -V margin-right=0.4in \
-               -V fontsize=9pt \
-               -V papersize=legal \
-               -V linkcolor=blue \
-               -f markdown \
-                    sv/rfc/ls010.mdwn \
-                    sv/po9_encoding.mdwn \
-                    sv/svp64.mdwn \
-                    sv/normal.mdwn \
-                    sv/ldst.mdwn \
-                    sv/branches.mdwn \
-                    sv/cr_ops.mdwn \
-               -s --self-contained \
-               --mathjax \
-               -o sv/rfc/ls010.pdf
+ls010.pdf: ls010.mdwn ../svp64.mdwn \
+       ../normal.mdwn \
+       ../ldst.mdwn \
+       ../branches.mdwn \
+       ../po9_encoding.mdwn \
+       ../cr_ops.mdwn
 
-%.pdf: %.mdwn
+%.pdf: %.mdwn ../../pandoc_img.py
        pandoc \
+               --filter ../../pandoc_img.py \
                -V margin-top=0.9in \
                -V margin-bottom=0.9in \
                -V margin-left=0.4in \
@@ -38,10 +19,10 @@ ls010.pdf: $(LS010_FILES)
                -V fontsize=9pt \
                -V papersize=legal \
                -V linkcolor=blue \
-               -f markdown $*.mdwn \
+               -f markdown $(filter-out ../../pandoc_img.py,$^) \
                -s --self-contained \
                --mathjax \
-               -o $*.pdf
+               -o $@
 
 upload:
        rsync -HPavz *.pdf libre-soc.org:opf_isa_wg/