From f91ece3c6bd6ba60b2dbe0d5c7c564c5433909e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Teichgr=C3=A4ber?= Date: Wed, 1 Dec 2010 19:40:56 +0100 Subject: [PATCH] adjust Makefiles for github.com --- Makefile | 15 +++++++++------ cmd/Makefile | 3 ++- cmd/main.go | 8 +++++--- 3 files changed, 16 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index a6e330e..f9fc05a 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ include $(GOROOT)/src/Make.inc -TARG=markdown +TARG=github.com/knieriem/markdown GOFILES=\ markdown.go\ output.go\ @@ -35,6 +35,12 @@ clean-sub: for dir in cmd peg peg/leg; do make -C $$dir clean; done +VCS = git +GITHUB = git://github.com +# also, if hggit extension is available: +# VCS = hg + + # # LEG parser generator stuff # @@ -48,17 +54,14 @@ $(LEG): make -C peg/leg all peg: - hg clone http://bitbucket.org/knieriem/peg + $(VCS) clone $(GITHUB)/knieriem/peg # # access to original C source files # -VCS = git -# also, if hggit extension is available: -# VCS = hg orig-c-src: - $(VCS) clone git://github.com/jgm/peg-markdown.git $@ + $(VCS) clone $(GITHUB)/jgm/peg-markdown.git $@ diff --git a/cmd/Makefile b/cmd/Makefile index 02f1a41..2aa0bec 100644 --- a/cmd/Makefile +++ b/cmd/Makefile @@ -4,8 +4,9 @@ TARG=markdown GOFILES=\ main.go\ +LIBMD = github.com/knieriem/markdown R = .. -PREREQ += $(R)/_obj/markdown.a +PREREQ += $(R)/_obj/$(LIBMD).a include $(GOROOT)/src/Make.cmd diff --git a/cmd/main.go b/cmd/main.go index 9a79449..c634a06 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -1,7 +1,7 @@ package main import ( - md "../_obj/markdown" + "../_obj/github.com/knieriem/markdown" "flag" "fmt" "os" @@ -18,6 +18,7 @@ func main() { } optNotes := flag.Bool("notes", false, "turn on footnote syntax") optSmart := flag.Bool("smart", false, "turn on smart quotes, dashes, and ellipses") + optDlists := flag.Bool("dlists", false, "support definitions lists") flag.Parse() if flag.NArg() > 0 { @@ -26,12 +27,13 @@ func main() { b, _ = ioutil.ReadAll(os.Stdin) } - e := md.Extensions{ + e := markdown.Extensions{ Notes: *optNotes, Smart: *optSmart, + Dlists: *optDlists, } - doc := md.Parse(string(b), e) + doc := markdown.Parse(string(b), e) w := bufio.NewWriter(os.Stdout) doc.WriteHtml(w) w.Flush()