Skip to content

Commit

Permalink
Add Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
MihailJP committed Apr 18, 2015
1 parent ff47fcc commit 30bbc1b
Show file tree
Hide file tree
Showing 4 changed files with 97 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
ChangeLog
*.otf
*.ttf
InconsolataLGC/
InconsolataLGC-OT/
*.tar.xz
*.tar.gz
*.tar.bz2
*.zip
1 change: 1 addition & 0 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
MihailJP <[email protected]>
57 changes: 57 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Makefile for Inconsolata font

FONTS=Inconsolata-LGC.ttf \
Inconsolata-LGC-Bold.ttf \
Inconsolata-LGC-Italic.ttf \
Inconsolata-LGC-BoldItalic.ttf
OTFONTS=${FONTS:.ttf=.otf}
DOCUMENTS=README ChangeLog LICENSE
PKGS=InconsolataLGC.tar.xz InconsolataLGC-OT.tar.xz
FFCMD=for i in $?;do fontforge -lang=ff -c "Open(\"$$i\");Generate(\"$@\");Close()";done
TTFPKGCMD=rm -rf $*; mkdir $*; cp ${FONTS} ${DOCUMENTS} $*
OTFPKGCMD=rm -rf $*; mkdir $*; cp ${OTFONTS} ${DOCUMENTS} $*

.PHONY: all
all: ttf otf

.SUFFIXES: .sfd .ttf .otf

.sfd.ttf:
${FFCMD}
.sfd.otf:
${FFCMD}

.PHONY: ttf otf
ttf: ${FONTS}
otf: ${OTFONTS}

.SUFFIXES: .tar.xz .tar.gz .tar.bz2 .zip
.PHONY: dist
dist: ${PKGS}

InconsolataLGC.tar.xz: ${FONTS} ${DOCUMENTS}
${TTFPKGCMD}; tar cfvJ $@ $*
InconsolataLGC.tar.gz: ${FONTS} ${DOCUMENTS}
${TTFPKGCMD}; tar cfvz $@ $*
InconsolataLGC.tar.bz2: ${FONTS} ${DOCUMENTS}
${TTFPKGCMD}; tar cfvj $@ $*
InconsolataLGC.zip: ${FONTS} ${DOCUMENTS}
${TTFPKGCMD}; zip -9r $@ $*

InconsolataLGC-OT.tar.xz: ${OTFONTS} ${DOCUMENTS}
${OTFPKGCMD}; tar cfvJ $@ $*
InconsolataLGC-OT.tar.gz: ${OTFONTS} ${DOCUMENTS}
${OTFPKGCMD}; tar cfvz $@ $*
InconsolataLGC-OT.tar.bz2: ${OTFONTS} ${DOCUMENTS}
${OTFPKGCMD}; tar cfvj $@ $*
InconsolataLGC-OT.zip: ${OTFONTS} ${DOCUMENTS}
${OTFPKGCMD}; zip -9r $@ $*

ChangeLog: .git # GIT
./mkchglog.rb > $@ # GIT

.PHONY: clean
clean:
-rm -f ${FONTS} ${OTFONTS} ChangeLog
-rm -rf ${PKGS} ${PKGS:.tar.xz=} ${PKGS:.tar.xz=.tar.bz2} \
${PKGS:.tar.xz=.tar.gz} ${PKGS:.tar.xz=.zip}
30 changes: 30 additions & 0 deletions mkchglog.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/usr/bin/env ruby

rawlog = `git log --date-order --date=short --pretty=format:"%cd %cN <%cE>%n%n* %s%n" | fold -sw72`

dateauth=""
skipflag=false
logdat=[]

rawlog.each_line do |line|
line.chomp!
if skipflag then
skipflag = false
elsif line =~ /^\d{4}-\d\d-\d\d / then
if dateauth != line then
logdat.push line
else
skipflag = true
logdat.pop
end
dateauth = line
elsif line =~ /^[^\*]/ then
logdat.push ("\t " + line)
elsif line =~ /^\*/ then
logdat.push ("\t" + line)
else
logdat.push line
end
end

print logdat.join("\n"), "\n"

0 comments on commit 30bbc1b

Please sign in to comment.