4
PCRE_CONST = 0x[0-9a-fA-F]+|[-+]?\s*[0-9]+
6
all: pcre_h.jl errno_h.jl build_h.jl file_constants.jl uv_constants.jl
9
$(QUIET_PERL) $(CPP) -dM $(shell $(PCRE_CONFIG) --prefix)/include/pcre.h | perl -nle '/^\s*#define\s+PCRE_(\w*)\s*\(?($(PCRE_CONST))\)?\s*$$/ and print "const $$1 = uint32($$2)"' | sort > $@
12
$(QUIET_PERL) echo '#include "errno.h"' | $(CC) -E -dM - | perl -nle 'print "const $$1 = int32($$2)" if /^#define\s+(E\w+)\s+(\d+)\s*$$/' | sort > $@
14
file_constants.jl: ../src/file_constants.h
15
$(QUIET_PERL) ${CC} -E -P -DJULIA ../src/file_constants.h | perl -nle 'print "$$1" if /^(\s*const\s+[A-z_]+\s+=\s+[0-9A-z_]+\s*)$$/' > $@
17
uv_constants.jl: ../src/uv_constants.h
18
$(QUIET_PERL) ${CC} -E -P -I"../deps/libuv/include" -DJULIA ../src/uv_constants.h | tail -n 5 > $@
20
build_h.jl: ../Make.inc ../src/os_detect.h
21
$(QUIET_PERL) $(CC) -E -P -DJULIA ../src/os_detect.h | grep OS_NAME > $@
22
@echo "const libm_name = \"$(LIBMNAME)\"" >> $@
23
@echo "const libblas_name = \"$(LIBBLASNAME)\"" >> $@
24
@echo "const liblapack_name = \"$(LIBLAPACKNAME)\"" >> $@
25
ifeq ($(USE_LIB64), 1)
26
@echo "const USE_LIB64 = true" >> $@
28
@echo "const USE_LIB64 = false" >> $@