markdown/Makefile

54 lines
808 B
Makefile
Raw Normal View History

all:
@echo 'targets: test nuke parser clean'
2010-11-21 22:04:39 +00:00
#
# run MarkdownTests-1.0.3 that come with original C sources
2010-11-21 22:04:39 +00:00
#
test: package cmd orig-c-src
cd orig-c-src/MarkdownTest_1.0.3; \
./MarkdownTest.pl --script=../../cmd/markdown/markdown --tidy
2010-11-21 22:04:39 +00:00
cmd: package
cd cmd/markdown && go build -v
2010-11-21 22:04:39 +00:00
package: parser.leg.go
go install -v
2010-11-21 22:04:39 +00:00
clean:
go clean . ./...
2010-11-21 22:04:39 +00:00
rm -rf orig-c-src
rm -rf ,,prevmd ,,pmd
parser: parser.leg.go
2010-11-21 22:04:39 +00:00
nuke:
rm -f parser.leg.go
2010-11-21 22:04:39 +00:00
2010-12-01 18:40:56 +00:00
# LEG parser rules
2010-11-21 22:04:39 +00:00
#
ifeq ($(MAKECMDGOALS),parser)
include $(shell go list -f '{{.Dir}}' github.com/knieriem/peg)/Make.inc
2010-11-21 22:04:39 +00:00
%.leg.go: %.leg $(LEG)
2011-06-29 18:04:44 +00:00
$(LEG) -switch $<
2010-11-21 22:04:39 +00:00
endif
2010-12-03 22:27:21 +00:00
2010-11-21 22:04:39 +00:00
#
# get access to original C source files
2010-11-21 22:04:39 +00:00
#
orig-c-src:
hg clone git://github.com/jgm/peg-markdown.git $@
2010-11-21 22:04:39 +00:00
include misc/devel.mk
.PHONY: \
all\
2010-11-21 22:04:39 +00:00
cmd\
nuke\
package\
parser\
test\