From 1fe4c53999c701df3e8fc7ce9c7b7fa30fde1ce5 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Tue, 1 Dec 2015 10:02:25 +0100 Subject: [PATCH] make sed commands compatible with gnu sed --- Makefile | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index cbd46f0..eac8d6a 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ PSBOOK = psbook PSTOPS = pstops PSNUP = psnup PS2PDF = ps2pdf -SED = sed +SED = sed # do not use in-place editing for compatibility between different sed utilities RM = rm MKDIR = mkdir CD = cd @@ -55,8 +55,8 @@ $(BOOKPDF): | $(PDFDIR) $(OUTDIR) @$(CP) -r lib/* $(OUTDIR)/ @$(CP) -r $(SRCDIR)/images $(OUTDIR)/images - @$(SED) "s;\musicbooklet;$(LILYPONDSUBST);g" $(SRCDIR)/singalongs.tex > $(OUTPUTFILE) - @$(SED) -i '' 's;\input{revision.tex};\newcommand{\\revision}{ $(shell git log -1 --format="%h") };g' $(OUTPUTFILE) + @$(SED) "s;\musicbooklet;$(LILYPONDSUBST);g" $(SRCDIR)/singalongs.tex > $(OUTPUTFILE).00 + @$(SED) 's;\input{revision.tex};\newcommand{\\revision}{ $(shell git log -1 --format="%h") };g' $(OUTPUTFILE).00 > $(OUTPUTFILE) @$(CD) $(OUTDIR); \ $(LUALATEX) -shell-escape singalongs.tex; \ @@ -69,14 +69,14 @@ $(BOOKLETPDF): $(BOOKPDF) $(PDF2PS) $(BOOKPDF) - | $(PSBOOK) | $(PSTOPS) -pa4 '1:0@1.0(-1.25cm,0cm)' | $(PSNUP) -2 | $(PS2PDF) - $(PDFDIR)/$(@F) $(PDFDIR)/%.pdf: $(SCORESDIR)/%.ly | $(PDFDIR) $(OUTDIR) - @$(SED) 's/%title/title/g' $< > $(OUTDIR)/$(notdir $<) - @$(SED) -i '' 's/\header {/\paper{indent=0\\mm} \\header { tagline=""/g' $(OUTDIR)/$(notdir $<) + @$(SED) 's/%title/title/g' $< > $(OUTDIR)/$(notdir $<).00 + @$(SED) 's/\header {/\paper{indent=0\\mm} \\header { tagline=""/g' $(OUTDIR)/$(notdir $<).00 > $(OUTDIR)/$(notdir $<) @$(LILYPOND) --output=$(PDFDIR)/$(basename $(@F)) $(OUTDIR)/$(notdir $<) $(MIDIDIR)/%.midi: $(SCORESDIR)/%.ly | $(MIDIDIR) $(OUTDIR) - @$(SED) 's/\layout { }/\midi{ \\tempo 4 = $(MIDITEMPO) }/g' $< > $(OUTDIR)/$(notdir $<) - @$(SED) -i '' 's/\header/\include "articulate.ly" \\header/g' $(OUTDIR)/$(notdir $<) - @$(SED) -i '' 's/< $(OUTDIR)/$(notdir $<).00 + @$(SED) 's/\header/\include "articulate.ly" \\header/g' $(OUTDIR)/$(notdir $<).00 > $(OUTDIR)/$(notdir $<).01 + @$(SED) 's/< $(OUTDIR)/$(notdir $<) @$(LILYPOND) --output=$(MIDIDIR)/$(basename $(@F)) $(OUTDIR)/$(notdir $<) $(OPUSDIR)/%.opus: $(MIDIDIR)/%.midi | $(OPUSDIR)