aboutsummaryrefslogblamecommitdiff
path: root/Makefile
blob: ffd427e3652ddbd46184e4332b893bd29eb32db4 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
       









                                    


                                                                 












                                           
                                         
 














                                                       
 


                              




                                 











                                                                        
                                      
                                                                  

                               
                                     

 
      




                                          
 

                
      
                                        
 
                   
                    
 
               
                                                                             
.POSIX:

.SUFFIXES:
.SUFFIXES: .ly .flac .midi .ogg .pdf

.ly.midi:
	lilypond -o $* $<

.midi.ogg:
	timidity -Ov $<

.flac.ogg:
	ffmpeg -y -i $< -ar 48000 -vn -c:a libvorbis -b:a 320k $@


lilypond.ly = \
	music/choro-da-saudade.ly \
	music/dengoso.ly          \
	music/marcha-dos-marinheiros.ly
lilypond.pdf  = $(lilypond.ly:.ly=.pdf)
lilypond.midi = $(lilypond.ly:.ly=.midi)
lilypond.ogg  = $(lilypond.midi:.midi=.ogg)
lilypond = \
	$(lilypond.pdf)  \
	$(lilypond.midi) \
	$(lilypond.ogg)

favicons = static/favicon.png favicon.ico

podcasts.flac = \
	resources/podcasts/2020-12-19-a-test-entry.flac
podcasts.ogg = $(podcasts.flac:.flac=.ogg)

torrents-in = \
	$(podcasts.flac) \
	$(podcasts.ogg)
torrents = $(torrents-in:=.torrent)

derived-assets = \
	$(lilypond)     \
	$(favicons)     \
	$(podcasts.ogg) \
	$(torrents)


all: public

jekyll-deps: $(derived-assets)


$(lilypond.pdf): $(lilypond.midi)


torrents-files.txt: $(torrents-in)
	echo $(torrents-in) | tr ' ' '\n' > $@

torrent-files.mk: torrents-files.txt
	printf 'torrent-files = \\\n' > $@
	sed -e 's/^/\t/' -e 's/$$/.torrent \\/' < torrents.txt >> $@
	printf '\n\n' >> $@
	awk '{ printf "%s.torrent: %s\n", $$1, $$1 }' torrents.txt >> $@

$(torrents): torrent-files.mk
	$(MAKE) -f Makefile.dynamic torrents

static/favicon.png: static/favicon.svg
	inkscape -o $@ -w 2048 -h 2048 -b white static/favicon.svg

favicon.ico: static/favicon.svg
	convert static/favicon.svg $@


check:
	sh aux/assert-shellcheck.sh
	sh aux/workflow/assert-todos.sh
	sh scripts/assert-spelling.sh
	sh scripts/extract-translations.sh
	sh scripts/apply-translations.sh

dev-check: check

clean:
	rm -rf public/ $(derived-assets)

public: jekyll-deps
	jekyll build

publish: public
	rsync -avzP public/ euandre.org:/home/user-data/www/default/ --delete