diff --git a/libgo/Makefile.am b/libgo/Makefile.am
index 2a680190ff56eb2101f9eabeebd9ef77b7f22cec..eb414906605b29b295a663cfbedf74af86f4b981 100644
--- a/libgo/Makefile.am
+++ b/libgo/Makefile.am
@@ -2639,7 +2639,7 @@ encoding/pem/check: $(CHECK_DEPS)
 	@$(CHECK)
 .PHONY: encoding/pem/check
 
-exp/ebnf.lo: $(go_exp_ebnf_files) go/scanner.gox go/token.gox os.gox \
+exp/ebnf.lo: $(go_exp_ebnf_files) scanner.gox go/token.gox os.gox \
 		strconv.gox unicode.gox utf8.gox
 	$(BUILDPACKAGE)
 exp/ebnf/check: $(CHECK_DEPS)
diff --git a/libgo/Makefile.in b/libgo/Makefile.in
index da7031f4381b2620034aea8e0ca835f4dcf85acc..4c07233d43de4d0e21e3d65be8880f5c6b4df6fe 100644
--- a/libgo/Makefile.in
+++ b/libgo/Makefile.in
@@ -5268,7 +5268,7 @@ encoding/pem/check: $(CHECK_DEPS)
 	@$(CHECK)
 .PHONY: encoding/pem/check
 
-exp/ebnf.lo: $(go_exp_ebnf_files) go/scanner.gox go/token.gox os.gox \
+exp/ebnf.lo: $(go_exp_ebnf_files) scanner.gox go/token.gox os.gox \
 		strconv.gox unicode.gox utf8.gox
 	$(BUILDPACKAGE)
 exp/ebnf/check: $(CHECK_DEPS)