about summary refs log tree commit diff
path: root/sysdeps/mach/hurd/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/mach/hurd/Makefile')
-rw-r--r--sysdeps/mach/hurd/Makefile7
1 files changed, 4 insertions, 3 deletions
diff --git a/sysdeps/mach/hurd/Makefile b/sysdeps/mach/hurd/Makefile
index e15341ca8d..69f12d4efb 100644
--- a/sysdeps/mach/hurd/Makefile
+++ b/sysdeps/mach/hurd/Makefile
@@ -91,10 +91,11 @@ $(common-objpfx)errnos.d: $(mach-errnos-deps)
 $(hurd)/bits/errno.h: $(common-objpfx)stamp-errnos ;
 $(common-objpfx)stamp-errnos: $(hurd)/errnos.awk $(errno.texinfo) \
 			      $(mach-errnos-deps) $(common-objpfx)errnos.d
-	$(AWK) -f $^ > $(hurd)/bits/errno.h-tmp
+	mkdir -p $(hurd-objpfx)bits
+	$(AWK) -f $^ > $(hurd-objpfx)bits/errno.h-tmp
 # Make it unwritable so noone will edit it by mistake.
-	-chmod a-w $(hurd)/bits/errno.h-tmp
-	$(move-if-change) $(hurd)/bits/errno.h-tmp $(hurd)/bits/errno.h
+	-chmod a-w $(hurd-objpfx)bits/errno.h-tmp
+	$(move-if-change) $(hurd-objpfx)bits/errno.h-tmp $(hurd)/bits/errno.h
 	touch $@
 
 common-generated += errnos.d stamp-errnos