URI: 
       Makefile - tgtimes - The Gopher Times
  HTML git clone git://bitreich.org/tgtimes git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/tgtimes
   DIR Log
   DIR Files
   DIR Refs
   DIR Tags
   DIR README
       ---
       Makefile (1306B)
       ---
            1 include opus
            2 include opus${v}/opus
            3 
            4 date=$$(date +%Y-%m-%d)
            5 tgtimes=opus$v/tgtimes$v
            6 
            7 .SUFFIXES: .txt .md .ps .pdf .ptxt .raw
            8 
            9 all: ${tgtimes}.pdf
           10 
           11 # File type processing.
           12 mdfiles=$(wildcard opus${v}/*.md)
           13 mdptxtfiles=${mdfiles:.md=.ptxt}
           14 .md.ptxt:
           15         cat $< \
           16                 | ./filters/markdown.filter \
           17                 | fold -s -w 74 \
           18                 | ./filters/boxquote.filter \
           19                 > $@
           20 
           21 txtfiles=$(filter-out ${tgtimes}.txt, $(wildcard opus${v}/*.txt))
           22 txtptxtfiles=${txtfiles:.txt=.ptxt}
           23 .txt.ptxt:
           24         cat $< \
           25                 | fold -s -w 74 \
           26                 | ./filters/boxquote.filter \
           27                 > $@
           28 
           29 rawfiles=$(wildcard opus${v}/*.raw)
           30 rawptxtfiles=${rawfiles:.raw=.ptxt}
           31 .raw.ptxt:
           32         cat $< > $@
           33 
           34 
           35 ${tgtimes}.txt: ${mdptxtfiles} ${txtptxtfiles} ${rawptxtfiles}
           36         cat opus${v}/?-*.ptxt | filters/nudge.filter > ${tgtimes}.txt
           37 
           38 
           39 ${tgtimes}.pdf: ${tgtimes}.txt
           40         u2ps --header="The Gopher Times Opus ${v} :: published ${publishyear}-${publishmonth}-${publishday}" \
           41                 -f Liberation \
           42                 --wrap \
           43                 --footer="page #" ${tgtimes}.txt ${tgtimes}.ps
           44         ps2pdf ${tgtimes}.ps ${tgtimes}.pdf
           45 
           46 clean:
           47         rm -f ${tgtimes}.pdf ${tgtimes}.txt opus${v}/*.ptxt
           48 
           49 publish: ${tgtimes}.pdf ${tgtimes}.txt
           50         mkdir -p archive/${date}
           51         cp ${tgtimes}.txt archive/${date}/tgtimes-${date}-opus$v.txt
           52         cp ${tgtimes}.pdf archive/${date}/tgtimes-${date}-opus$v.pdf
           53         cd archive && ./mk-atom.sh > news.atom.xml
           54