%% "Marty Leisner" <[EMAIL PROTECTED]> writes:

  ml> Makefile.dep:
  ml>         $(CXX) $(CXXFLAGS) -MM *.cc > Makefile.dep

  ml> -include Makefile.dep

  ml> and it seems the dep rule took higher priority then -n.

  ml> I was under the impression -n would be non-destructive and merely
  ml> print stuff instead of creating files.

GNU make manual, section _How Makefiles are Remade_:

    ...
     When you use the `-t' or `--touch' option (*note Instead of
  Executing the Commands: Instead of Execution.), you would not want to
  use an out-of-date makefile to decide which targets to touch.  So the
  `-t' option has no effect on updating makefiles; they are really
  updated even if `-t' is specified.  Likewise, `-q' (or `--question')
  and `-n' (or `--just-print') do not prevent updating of makefiles,
  because an out-of-date makefile would result in the wrong output for
  other targets.  Thus, `make -f mfile -n foo' will update `mfile', read
  it in, and then print the commands to update `foo' and its prerequisites
  without running them.  The commands printed for `foo' will be those
  specified in the updated contents of `mfile'.
    ...

  ml> Is there a way to just show what would happen without executing
  ml> (even include files?)

The only thing I can think of is to check the options in MAKEFLAGS or
similar with an ifdef, and not do the include if the "n" option was
given.

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[EMAIL PROTECTED]>          Find some GNU make tips at:
 http://www.gnu.org                      http://www.paulandlesley.org/gmake/
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

_______________________________________________
Bug-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-make

Reply via email to