Skip to content

Commit

Permalink
make Makefile more informative about what julia sysimg build step it …
Browse files Browse the repository at this point in the history
…is doing
  • Loading branch information
vtjnash committed Oct 17, 2014
1 parent c74c764 commit 8e9e68c
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -118,25 +118,26 @@ $(build_private_libdir)/sys%ji: $(build_private_libdir)/sys%o

$(build_private_libdir)/sys%$(SHLIB_EXT): $(build_private_libdir)/sys%o
ifneq ($(USEMSVC), 1)
$(CXX) -shared -fPIC -L$(build_private_libdir) -L$(build_libdir) -L$(build_shlibdir) -o $@ $< \
@$(call PRINT_LINK, $(CXX) -shared -fPIC -L$(build_private_libdir) -L$(build_libdir) -L$(build_shlibdir) -o $@ $< \
$$([ $(OS) = Darwin ] && echo '' -Wl,-undefined,dynamic_lookup || echo '' -Wl,--unresolved-symbols,ignore-all ) \
$$([ $(OS) = WINNT ] && echo '' -ljulia -lssp)
$$([ $(OS) = WINNT ] && echo '' -ljulia -lssp))
$(DSYMUTIL) $@
else
@true
endif

$(build_private_libdir)/sys0.o:
@$(QUIET_JULIA) cd base && \
$(call spawn,$(JULIA_EXECUTABLE)) --build $(call cygpath_w,$(build_private_libdir)/sys0) sysimg.jl
@$(call PRINT_JULIA, cd base && \
$(call spawn,$(JULIA_EXECUTABLE)) --build $(call cygpath_w,$(build_private_libdir)/sys0) sysimg.jl)

BASE_SRCS := $(wildcard base/*.jl base/*/*.jl base/*/*/*.jl)

,:=,
$(build_private_libdir)/sys.o: VERSION $(BASE_SRCS) $(build_datarootdir)/julia/helpdb.jl $(build_private_libdir)/sys0.$(SHLIB_EXT)
@$(QUIET_JULIA) cd base && \
@$(call PRINT_JULIA, cd base && \
$(call spawn,$(JULIA_EXECUTABLE)) --build $(call cygpath_w,$(build_private_libdir)/sys) \
-J$(call cygpath_w,$(build_private_libdir))/$$([ -e $(build_private_libdir)/sys.ji ] && echo sys.ji || echo sys0.ji) -f sysimg.jl \
|| { echo "*** This error is usually fixed by running 'make clean'. If the error persists, try 'make cleanall'. ***" && false; }
|| { echo '*** This error is usually fixed by running `make clean`. If the error persists$(,) try `make cleanall`. ***' && false; } )

run-julia-debug run-julia-release: run-julia-%:
$(MAKE) $(QUIET_MAKE) run-julia JULIA_EXECUTABLE="$(JULIA_EXECUTABLE_$*)"
Expand Down

9 comments on commit 8e9e68c

@tkelman
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you thank you, I really like this. Was hoping you'd split it out from whichever big PR you had done it in :)

@vtjnash
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, i kept seeing it wasn't on master, cherry-picking it, then forgetting to push it

@JeffBezanson
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@tkelman
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now how much longer till we can do [chunks of] those .jl files as parallel make targets?

@vtjnash
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With my recent work on the cache, I could do that fairly easily, for anything outside of Base (doing it for sub modules is perhaps impossible, perhaps just a pita. I don't know yet)

@tkelman
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, in retrospect this is causing some (probably harmless) scary-looking messages at the start of bootstrap when VERBOSE=1 - stage 1 https://travis-ci.org/JuliaLang/julia/jobs/40728543#L2732 and stage 2:

cd base
ERROR: could not open file /home/tkelman/Julia/julia/sysimg.jl
 in include at ./boot.jl:245
 in include_from_node1 at loading.jl:128
 in process_options at ./client.jl:293
 in _start at ./client.jl:362
 in _start_3B_1661 at /home/tkelman/Julia/julia/usr/lib/julia/sys0.so

*** This error is usually fixed by running `make clean`. If the error persists, try `make cleanall`. ***
exports.jl

@vtjnash
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that probably means the VERBOSE option for the PRINT_JULIA target is miscoded

@staticfloat
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vtjnash Could you expound upon the use of $(,)? Why can't you put a comma literal into that string?

@vtjnash
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a literal comma is the separator character for Makefile commands. there is no escape character. but interpolation allows us to stick any value in there. almost any string can be used as a variable name. i could use comma, but instead chose to use , as the variable name.

Please sign in to comment.