adjust Makefiles for github.com
This commit is contained in:
parent
722e122c88
commit
f91ece3c6b
15
Makefile
15
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 $@
|
||||
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user