Skip to content

Commit

Permalink
protect Makefile VERBOSE macros for PRINT_* from unwanted command int…
Browse files Browse the repository at this point in the history
…erpolation interpretation side-effects
  • Loading branch information
vtjnash committed Nov 26, 2014
1 parent 8b63c51 commit fc869ae
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
20 changes: 10 additions & 10 deletions Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -850,18 +850,18 @@ ENDCOLOR="\033[0m"

GOAL=$(subst $(abspath $(JULIAHOME))/,,$(abspath $@))

PRINT_CC = printf ' %b %b\n' $(CCCOLOR)CC$(ENDCOLOR) $(SRCCOLOR)$(GOAL)$(ENDCOLOR); $(1)
PRINT_LINK = printf ' %b %b\n' $(LINKCOLOR)LINK$(ENDCOLOR) $(BINCOLOR)$(GOAL)$(ENDCOLOR); $(1)
PRINT_PERL = printf ' %b %b\n' $(PERLCOLOR)PERL$(ENDCOLOR) $(BINCOLOR)$(GOAL)$(ENDCOLOR); $(1)
PRINT_FLISP = printf ' %b %b\n' $(FLISPCOLOR)FLISP$(ENDCOLOR) $(BINCOLOR)$(GOAL)$(ENDCOLOR); $(1)
PRINT_JULIA = printf ' %b %b\n' $(JULIACOLOR)JULIA$(ENDCOLOR) $(BINCOLOR)$(GOAL)$(ENDCOLOR); $(1)
PRINT_CC = printf ' %b %b\n' $(CCCOLOR)CC$(ENDCOLOR) $(SRCCOLOR)'$(GOAL)'$(ENDCOLOR); $(1)
PRINT_LINK = printf ' %b %b\n' $(LINKCOLOR)LINK$(ENDCOLOR) $(BINCOLOR)'$(GOAL)'$(ENDCOLOR); $(1)
PRINT_PERL = printf ' %b %b\n' $(PERLCOLOR)PERL$(ENDCOLOR) $(BINCOLOR)'$(GOAL)'$(ENDCOLOR); $(1)
PRINT_FLISP = printf ' %b %b\n' $(FLISPCOLOR)FLISP$(ENDCOLOR) $(BINCOLOR)'$(GOAL)'$(ENDCOLOR); $(1)
PRINT_JULIA = printf ' %b %b\n' $(JULIACOLOR)JULIA$(ENDCOLOR) $(BINCOLOR)'$(GOAL)'$(ENDCOLOR); $(1)

else
QUIET_MAKE =
PRINT_CC = echo $(1); $(1)
PRINT_LINK = echo $(1); $(1)
PRINT_PERL = echo $(1); $(1)
PRINT_FLISP = echo $(1); $(1)
PRINT_JULIA = echo $(1); $(1)
PRINT_CC = echo '$(1)'; $(1)
PRINT_LINK = echo '$(1)'; $(1)
PRINT_PERL = echo '$(1)'; $(1)
PRINT_FLISP = echo '$(1)'; $(1)
PRINT_JULIA = echo '$(1)'; $(1)

endif
7 changes: 0 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,6 @@ $(build_private_libdir)/sys.o: VERSION $(BASE_SRCS) $(build_docdir)/helpdb.jl $(
-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; } )

run-julia-debug run-julia-release: run-julia-%:
$(MAKE) $(QUIET_MAKE) run-julia JULIA_EXECUTABLE="$(JULIA_EXECUTABLE_$*)"
run-julia:
@$(call spawn,$(JULIA_EXECUTABLE))
run:
@$(call spawn,$(cmd))

$(build_bindir)/stringreplace: contrib/stringreplace.c | $(build_bindir)
@$(call PRINT_CC, $(CC) -o $(build_bindir)/stringreplace contrib/stringreplace.c)

Expand Down

0 comments on commit fc869ae

Please sign in to comment.