[gccgo] Move non-gcc parts of Go frontend to subdirectory

Message ID mcr4obymgj9.fsf@google.com
State New
Headers show

Commit Message

Ian Taylor Nov. 3, 2010, 6:02 p.m.
In my continuing effort to separate the Go frontend proper from the gcc
interface, I have moved the Go frontend proper into a subdirectory on
the gccgo branch.  This patch does not change the master sources at all;
that will follow.

I have moved the following files from the directory gcc/go to the new
directory gcc/go/gofrontend:

LICENSE      expressions.cc  gogo.cc		lex.h	       types.cc
README	     expressions.h   gogo.h		operator.h     types.h
dataflow.cc  go-dump.cc      import-archive.cc	parse.cc       unsafe.cc
dataflow.h   go-dump.h	     import.cc		parse.h
export.cc    go.cc	     import.h		statements.cc
export.h     gogo-tree.cc    lex.cc		statements.h

I did not move the Make-lang.in file, but instead changed it per the
appended patch.

Committed to gccgo branch.



Index: Make-lang.in
--- Make-lang.in	(revision 166230)
+++ Make-lang.in	(working copy)
@@ -6,14 +6,9 @@ 
 # This file provides the language dependent support in the main Makefile.
-# C++ support.  These should really be in the top level Makefile.
-.SUFFIXES: .c .cc .o .po .pox .gmo
+# C++ support.  This should really be in the top level Makefile.
 ALL_CXXFLAGS = $(filter-out -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wc++-compat, $(ALL_COMPILERFLAGS)) $(CXXFLAGS)
 # Build Go export info generator.
@@ -129,50 +124,61 @@  GO_SYSTEM_H = go/go-system.h $(CONFIG_H)
 GO_C_H = go/go-c.h $(MACHMODE_H)
-GO_LEX_H = go/lex.h go/operator.h
-GO_PARSE_H = go/parse.h
-GO_GOGO_H = go/gogo.h
-GO_TYPES_H = go/types.h
-GO_STATEMENTS_H = go/statements.h go/operator.h
-GO_EXPRESSIONS_H = go/expressions.h go/operator.h
-GO_IMPORT_H = go/import.h go/export.h
-go/dataflow.o: go/dataflow.cc $(GO_SYSTEM_H) $(GO_GOGO_H) $(GO_EXPRESSIONS_H) \
-	$(GO_STATEMENTS_H) go/dataflow.h
-go/export.o: go/export.cc $(GO_SYSTEM_H) $(srcdir)/../include/sha1.h \
-	$(MACHMODE_H) output.h $(TARGET_H) $(GO_GOGO_H) $(GO_TYPES_H) \
-	$(GO_STATEMENTS_H) go/export.h
-go/expressions.o: go/expressions.cc $(GO_SYSTEM_H) $(TOPLEV_H) intl.h \
-	$(TREE_H) $(GIMPLE_H) tree-iterator.h convert.h $(REAL_H) realmpfr.h \
-	$(TM_P_H) $(GO_C_H) $(GO_GOGO_H) $(GO_TYPES_H) go/export.h \
-go/go.o: go/go.cc $(GO_SYSTEM_H) $(GO_C_H) $(GO_LEX_H) $(GO_PARSE_H) \
-	$(GO_GOGO_H)
-go/go-dump.o: go/go-dump.cc $(GO_SYSTEM_H) $(GO_C_H) go/go-dump.h
+GO_LEX_H = go/gofrontend/lex.h go/gofrontend/operator.h
+GO_PARSE_H = go/gofrontend/parse.h
+GO_GOGO_H = go/gofrontend/gogo.h
+GO_TYPES_H = go/gofrontend/types.h
+GO_STATEMENTS_H = go/gofrontend/statements.h go/gofrontend/operator.h
+GO_EXPRESSIONS_H = go/gofrontend/expressions.h go/gofrontend/operator.h
+GO_IMPORT_H = go/gofrontend/import.h go/gofrontend/export.h
 go/go-lang.o: go/go-lang.c $(GO_SYSTEM_H) coretypes.h opts.h $(TREE_H) \
 	$(GIMPLE_H) $(GGC_H) $(TOPLEV_H) debug.h options.h $(FLAGS_H) \
 	convert.h langhooks.h $(LANGHOOKS_DEF_H) $(EXCEPT_H) $(TARGET_H) \
 	$(DIAGNOSTIC_H) $(GO_C_H) gt-go-go-lang.h gtype-go.h
-go/gogo-tree.o: go/gogo-tree.cc $(GO_SYSTEM_H) $(TOPLEV_H) $(TREE_H) \
-	$(GIMPLE_H) tree-iterator.h $(CGRAPH_H) langhooks.h convert.h output.h \
-go/gogo.o: go/gogo.cc $(GO_SYSTEM_H) go/go-dump.h $(GO_LEX_H) $(GO_TYPES_H) \
-	go/export.h $(GO_GOGO_H)
-go/import.o: go/import.cc $(GO_SYSTEM_H) $(srcdir)/../include/filenames.h \
-	../include/simple-object.h $(GO_C_H) $(GO_GOGO_H) $(GO_TYPES_H) \
-	go/export.h $(GO_IMPORT_H)
-go/import-archive.o: go/import-archive.cc $(GO_SYSTEM_H) $(GO_IMPORT_H)
-go/lex.o: go/lex.cc $(GO_LEX_H) $(GO_SYSTEM_H)
-go/parse.o: go/parse.cc $(GO_SYSTEM_H) $(GO_LEX_H) $(GO_GOGO_H) $(GO_TYPES_H) \
-go/statements.o: go/statements.cc $(GO_SYSTEM_H) intl.h $(TREE_H) \
+GOINCLUDES = -I $(srcdir)/go -I $(srcdir)/go/gofrontend
+go/%.o: go/gofrontend/%.cc
+go/dataflow.o: go/gofrontend/dataflow.cc $(GO_SYSTEM_H) $(GO_GOGO_H) \
+	$(GO_EXPRESSIONS_H) $(GO_STATEMENTS_H) go/gofrontend/dataflow.h
+go/export.o: go/gofrontend/export.cc $(GO_SYSTEM_H) \
+	$(srcdir)/../include/sha1.h $(MACHMODE_H) output.h $(TARGET_H) \
+	$(GO_GOGO_H) $(GO_TYPES_H) $(GO_STATEMENTS_H) go/gofrontend/export.h
+go/expressions.o: go/gofrontend/expressions.cc $(GO_SYSTEM_H) $(TOPLEV_H) \
+	intl.h $(TREE_H) $(GIMPLE_H) tree-iterator.h convert.h $(REAL_H) \
+	realmpfr.h $(TM_P_H) $(GO_C_H) $(GO_GOGO_H) $(GO_TYPES_H) \
+	go/gofrontend/export.h $(GO_IMPORT_H) $(GO_STATEMENTS_H) $(GO_LEX_H) \
+go/go.o: go/gofrontend/go.cc $(GO_SYSTEM_H) $(GO_C_H) $(GO_LEX_H) \
+go/go-dump.o: go/gofrontend/go-dump.cc $(GO_SYSTEM_H) $(GO_C_H) \
+	go/gofrontend/go-dump.h
+go/gogo-tree.o: go/gofrontend/gogo-tree.cc $(GO_SYSTEM_H) $(TOPLEV_H) \
+	$(TREE_H) $(GIMPLE_H) tree-iterator.h $(CGRAPH_H) langhooks.h \
+	convert.h output.h $(TM_P_H) $(DIAGNOSTIC_H) $(RTL_H) $(GO_TYPES_H) \
+go/gogo.o: go/gofrontend/gogo.cc $(GO_SYSTEM_H) go/gofrontend/go-dump.h \
+	go/gofrontend/dataflow.h $(GO_IMPORT_H) go/gofrontend/export.h \
+	$(GO_GOGO_H)
+go/import.o: go/gofrontend/import.cc $(GO_SYSTEM_H) \
+	$(srcdir)/../include/filenames.h $(srcdir)/../include/simple-object.h \
+	$(GO_C_H) $(GO_GOGO_H) $(GO_TYPES_H) go/gofrontend/export.h \
+go/import-archive.o: go/gofrontend/import-archive.cc $(GO_SYSTEM_H) \
+go/lex.o: go/gofrontend/lex.cc $(GO_LEX_H) $(GO_SYSTEM_H)
+go/parse.o: go/gofrontend/parse.cc $(GO_SYSTEM_H) $(GO_LEX_H) $(GO_GOGO_H) \
+go/statements.o: go/gofrontend/statements.cc $(GO_SYSTEM_H) intl.h $(TREE_H) \
 	$(GIMPLE_H) convert.h tree-iterator.h $(TREE_FLOW_H) $(REAL_H) \
-go/types.o: go/types.cc $(GO_SYSTEM_H) $(TOPLEV_H) intl.h $(TREE_H) \
-	$(GIMPLE_H) $(REAL_H) convert.h $(GO_C_H) $(GO_GOGO_H) go/operator.h \
-go/unsafe.o: go/unsafe.cc $(GO_SYSTEM_H) $(GO_TYPES_H) $(GO_GOGO_H)
+go/types.o: go/gofrontend/types.cc $(GO_SYSTEM_H) $(TOPLEV_H) intl.h $(TREE_H) \
+	$(GIMPLE_H) $(REAL_H) convert.h $(GO_C_H) $(GO_GOGO_H) \
+	go/gofrontend/operator.h $(GO_EXPRESSIONS_H) $(GO_STATEMENTS_H) \
+	go/gofrontend/export.h $(GO_IMPORT_H) $(GO_TYPES_H)
+go/unsafe.o: go/gofrontend/unsafe.cc $(GO_SYSTEM_H) $(GO_TYPES_H) $(GO_GOGO_H)