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
|
include $(GOROOT)/src/Make.inc
|
||||||
|
|
||||||
TARG=markdown
|
TARG=github.com/knieriem/markdown
|
||||||
GOFILES=\
|
GOFILES=\
|
||||||
markdown.go\
|
markdown.go\
|
||||||
output.go\
|
output.go\
|
||||||
@ -35,6 +35,12 @@ clean-sub:
|
|||||||
for dir in cmd peg peg/leg; do make -C $$dir clean; done
|
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
|
# LEG parser generator stuff
|
||||||
#
|
#
|
||||||
@ -48,17 +54,14 @@ $(LEG):
|
|||||||
make -C peg/leg all
|
make -C peg/leg all
|
||||||
|
|
||||||
peg:
|
peg:
|
||||||
hg clone http://bitbucket.org/knieriem/peg
|
$(VCS) clone $(GITHUB)/knieriem/peg
|
||||||
|
|
||||||
#
|
#
|
||||||
# access to original C source files
|
# access to original C source files
|
||||||
#
|
#
|
||||||
VCS = git
|
|
||||||
# also, if hggit extension is available:
|
|
||||||
# VCS = hg
|
|
||||||
|
|
||||||
orig-c-src:
|
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=\
|
GOFILES=\
|
||||||
main.go\
|
main.go\
|
||||||
|
|
||||||
|
LIBMD = github.com/knieriem/markdown
|
||||||
R = ..
|
R = ..
|
||||||
PREREQ += $(R)/_obj/markdown.a
|
PREREQ += $(R)/_obj/$(LIBMD).a
|
||||||
|
|
||||||
include $(GOROOT)/src/Make.cmd
|
include $(GOROOT)/src/Make.cmd
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
md "../_obj/markdown"
|
"../_obj/github.com/knieriem/markdown"
|
||||||
"flag"
|
"flag"
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
@ -18,6 +18,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
optNotes := flag.Bool("notes", false, "turn on footnote syntax")
|
optNotes := flag.Bool("notes", false, "turn on footnote syntax")
|
||||||
optSmart := flag.Bool("smart", false, "turn on smart quotes, dashes, and ellipses")
|
optSmart := flag.Bool("smart", false, "turn on smart quotes, dashes, and ellipses")
|
||||||
|
optDlists := flag.Bool("dlists", false, "support definitions lists")
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
if flag.NArg() > 0 {
|
if flag.NArg() > 0 {
|
||||||
@ -26,12 +27,13 @@ func main() {
|
|||||||
b, _ = ioutil.ReadAll(os.Stdin)
|
b, _ = ioutil.ReadAll(os.Stdin)
|
||||||
}
|
}
|
||||||
|
|
||||||
e := md.Extensions{
|
e := markdown.Extensions{
|
||||||
Notes: *optNotes,
|
Notes: *optNotes,
|
||||||
Smart: *optSmart,
|
Smart: *optSmart,
|
||||||
|
Dlists: *optDlists,
|
||||||
}
|
}
|
||||||
|
|
||||||
doc := md.Parse(string(b), e)
|
doc := markdown.Parse(string(b), e)
|
||||||
w := bufio.NewWriter(os.Stdout)
|
w := bufio.NewWriter(os.Stdout)
|
||||||
doc.WriteHtml(w)
|
doc.WriteHtml(w)
|
||||||
w.Flush()
|
w.Flush()
|
||||||
|
Loading…
Reference in New Issue
Block a user