message: generate .d files
diff: @@ -12,7 +12,7 @@ STAN_TARGETS = $(patsubst %.stan,%$(EXE),$(wildcard $(patsubst %$(EXE),%.stan,$(
  $(STAN)src/stan/model/model_header.d : $(STAN)src/stan/model/model_header.hpp
  $(COMPILE.cpp) $(DEPFLAGS) $<
  -$(STAN)src/stan/model/model_header.d : DEPTARGETS = -MT $(patsubst %.d,%.hpp.gch,$@) -MT $@
  +
  $(STAN)src/stan/model/model_header.hpp.gch : $(STAN)src/stan/model/model_header.hpp
  @echo ''
  @echo '--- Compiling pre-compiled header --- '
  @@ -27,21 +27,20 @@ ifneq ($(findstring allow_undefined,$(STANCFLAGS)),)
  $(STAN_TARGETS) examples/bernoulli/bernoulli$(EXE) $(patsubst %.stan,%$(EXE),$(wildcard src/test/test-models/*.stan)) : CXXFLAGS_PROGRAM += -include $(USER_HEADER)
  endif
  -ifdef STAN_OPENCL
  -STANCFLAGS+= --use-opencl
  -endif
  -%.hpp : %.stan bin/stanc$(EXE)
  +%.d %.hpp : %.stan bin/stanc$(EXE)
  @echo ''
  @echo '--- Translating Stan model to C++ code ---'
  - $(WINE) bin/stanc$(EXE) $(STANCFLAGS) --o=$(subst \,/,$@) $(subst \,/,$<)
  + $(WINE) bin/stanc$(EXE) $(STANCFLAGS) --o=$(subst \,/,$*).hpp $(subst \,/,$<)
  + $(COMPILE.cpp) $(DEPFLAGS) $(subst \,/,$*).hpp
  +
  -.PRECIOUS: %.hpp
  +.PRECIOUS: %.d %.hpp
  %$(EXE) : %.hpp $(CMDSTAN_MAIN_O) $(LIBSUNDIALS) $(MPI_TARGETS) $(TBB_TARGETS)
  @echo ''
  @echo '--- Compiling, linking C++ code ---'
  $(COMPILE.cpp) $(CXXFLAGS_PROGRAM) -x c++ -o $(subst \,/,$*).o $(subst \,/,$<)
  - $(LINK.cpp) $(subst \,/,$*.o) $(CMDSTAN_MAIN_O) $(LDLIBS) $(LIBSUNDIALS) $(MPI_TARGETS) $(TBB_TARGETS) $(subst \,/,$(OUTPUT_OPTION))
  + $(LINK.cpp) $(subst \,/,$*).o $(CMDSTAN_MAIN_O) $(LDLIBS) $(LIBSUNDIALS) $(MPI_TARGETS) $(TBB_TARGETS) $(subst \,/,$(OUTPUT_OPTION))
  ifeq ($(OS),Windows_NT)
  ifneq ($(notdir $(shell where tbb.dll)),tbb.dll)
  @echo 'Intel TBB is not in PATH.'
  @@ -60,7 +59,7 @@ endif
  # Dependencies file
  ##
  ifneq (,$(STAN_TARGETS))
  -$(patsubst %$(EXE),%.d,$(STAN_TARGETS)) : DEPTARGETS += -MT $(patsubst %.d,%$(EXE),$@) -include $< -include $(CMDSTAN_MAIN)
  +$(patsubst %$(EXE),%.d,$(STAN_TARGETS)) : DEPTARGETS += -MT $(patsubst %.d,%$(EXE),$@) -include $(CMDSTAN_MAIN)
  -include $(patsubst %$(EXE),%.d,$(STAN_TARGETS))
  -include src/cmdstan/stanc.d
  -include $(patsubst %.cpp,%.d,$(STANC_TEMPLATE_INSTANTIATION_CPP))
  