+# This is only for Brian to use... don't mess with it
+rebuild-constants: src/org/xwt/mips/syscalls.h $(errno_h) $(unistd_h)
+ @mkdir -p `dirname $@`
+ cat $^ | ( \
+ echo "// THIS FILE IS AUTOGENERATED! DO NOT EDIT!"; \
+ echo "// run \"make rebuild-constants\" if it needs to be updated"; \
+ echo ""; \
+ echo "package org.xwt.mips;"; \
+ echo "public interface UsermodeConstants {"; \
+ tr '\t' ' ' | sed -n ' \
+ s/ */ /g; \
+ s/ *# *define \([A-Z_][A-Za-z0-9_]*\) \([0-9][0-9x]*\)/ public static final int \1 = \2;/p'; \
+ echo "}"; \
+ ) > src/org/xwt/mips/UsermodeConstants.java
+