Move bootstrap Makefile to main.go
diff --git a/parser.go b/parser.go
index 13da4df..9e914d5 100644
--- a/parser.go
+++ b/parser.go
@@ -449,29 +449,8 @@
return Makefile{}, errors.New("no targets specified and no makefile found.")
}
-func GetBootstrapMakefile() Makefile {
- bootstrap := `
-CC:=cc
-CXX:=g++
-MAKE:=kati
-# Pretend to be GNU make 3.81, for compatibility.
-MAKE_VERSION:=3.81
-# TODO: Add more builtin vars.
-
-# http://www.gnu.org/software/make/manual/make.html#Catalogue-of-Rules
-# The document above is actually not correct. See default.c:
-# http://git.savannah.gnu.org/cgit/make.git/tree/default.c?id=4.1
-.c.o:
- $(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c -o $@ $<
-.cc.o:
- $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c -o $@ $<
-# TODO: Add more builtin rules.
-`
- rd := strings.NewReader(bootstrap)
- parser := newParser(rd, "*bootstrap*")
- mk, err := parser.parse()
- if err != nil {
- panic(err)
- }
- return mk
+func ParseMakefileString(s string, name string) (Makefile, error) {
+ rd := strings.NewReader(s)
+ parser := newParser(rd, name)
+ return parser.parse()
}