OSDN Git Service

PR 43839
[pf3gnuchains/gcc-fork.git] / libjava / testsuite / Makefile.am
index fe42040..2aebd7c 100644 (file)
@@ -24,6 +24,31 @@ MYGCJH = gjavah
 
 .PHONY: compile-tests
 
+# We need more things in site.exp, but automake completely controls the
+# creation of that file; there's no way to append to it without messing up
+# the dependency chains.  So we overrule automake.  This rule is exactly
+# what it would have generated, plus our own additions.
+site.exp: Makefile
+       @echo 'Making a new site.exp file...'
+       @echo '## these variables are automatically generated by make ##' >site.tmp
+       @echo '# Do not edit here.  If you wish to override these values' >>site.tmp
+       @echo '# edit the last section' >>site.tmp
+       @echo 'set srcdir $(srcdir)' >>site.tmp
+       @echo "set objdir `pwd`" >>site.tmp
+       @echo 'set build_alias "$(build_alias)"' >>site.tmp
+       @echo 'set build_triplet $(build_triplet)' >>site.tmp
+       @echo 'set host_alias "$(host_alias)"' >>site.tmp
+       @echo 'set host_triplet $(host_triplet)' >>site.tmp
+       @echo 'set target_alias "$(target_alias)"' >>site.tmp
+       @echo 'set target_triplet $(target_triplet)' >>site.tmp
+       @echo 'set libiconv "$(LIBICONV)"' >>site.tmp
+       @echo '## All variables above are generated by configure. Do Not Edit ##' >>site.tmp
+       @test ! -f site.exp || \
+         sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp
+       @-rm -f site.bak
+       @test ! -f site.exp || mv site.exp site.bak
+       @mv site.tmp site.exp
+
 check-am: compile-tests
 
 compile-tests: