diff --git a/.gitattributes b/.gitattributes
index 9fe1380ce0d5164d92c52d653aced524e1d32000..f2a6e312d993eeb3d4d1eb0a0c17a4dfad6c7f4e 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -26,7 +26,6 @@ testfont binary
 # Remove the corresponding line before committing
 # changes to these files.
 /ANNOUNCE foreign_ident
-/Makefile foreign_ident
 /README-CVS foreign_ident
 /README-CVS.txt foreign_ident
 /bin/extract.pike foreign_ident
diff --git a/Makefile b/Makefile
index 7a8e58ac40961532d3f67aa8687d41f85ea8004d..f28d242563c5d254f143f7caa37ad1c7736dfe2a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 #
-# $Id: Makefile,v 1.169 2009/11/30 13:14:07 mast Exp $
+# $Id$
 #
 # Meta Makefile
 #
@@ -19,7 +19,7 @@
 
 # Tip: Remove "-r" from the line below if you don't want to rebuild
 # from scratch every time you upgrade the kernel.
-OS=`uname -s -r -m|sed \"s/ /-/g\"|tr \"[A-Z]\" \"[a-z]\"|tr \"/()\" \"___\"`
+OS=$${PIKE_BUILD_OS:-`uname -s -r -m|sed \"s/ /-/g\"|tr \"[A-Z]\" \"[a-z]\"|tr \"/()\" \"___\"`}
 
 VPATH=.
 BUILDDIR=build/$(OS)