Permalink
Browse files

prevent CPP from modifying ARCH and MACHINE in build_h.jl

  • Loading branch information...
1 parent 37d1bf5 commit ed6fe7b9c46be25e3085a0976aaf1ec980bedf7b @vtjnash vtjnash committed Jun 14, 2013
Showing with 4 additions and 7 deletions.
  1. +4 −2 base/Makefile
  2. +0 −5 base/build.h
View
@@ -17,8 +17,10 @@ file_constants.jl: ../src/file_constants.h
uv_constants.jl: ../src/uv_constants.h
$(QUIET_PERL) ${CC} -E -P "-I$(LIBUV_INC)" -DJULIA ../src/uv_constants.h | tail -n 5 > $@
-build_h.jl: ../Make.inc build.h
- $(QUIET_PERL) $(CC) -E -P -D_ARCH=$(ARCH) -D_MACHINE=$(shell $(CC) -dumpmachine) build.h -I../src/support | grep . > $@
+build_h.jl: ../Make.inc build.h Makefile
+ $(QUIET_PERL) $(CC) -E -P build.h -I../src/support | grep . > $@
+ @echo "const ARCH = :$(ARCH)" >> $@
+ @echo "const MACHINE = \"$(shell $(CC) -dumpmachine)\"" >> $@
@echo "const libm_name = \"$(LIBMNAME)\"" >> $@
@echo "const libblas_name = \"$(LIBBLASNAME)\"" >> $@
@echo "const liblapack_name = \"$(LIBLAPACKNAME)\"" >> $@
View
@@ -18,9 +18,4 @@
#endif
const OS_NAME = :OS_CURRENT
-#define XSTR(x) STR(x)
-#define STR(x) #x
-const ARCH = :_ARCH
-const MACHINE = XSTR(_MACHINE)
-
#endif // OS_DETECT_H

0 comments on commit ed6fe7b

Please sign in to comment.