Subject: make clean - what's this?

From: Chris Rankin <[email-masked]>
Date: Fri, 22 Jan 1999 22:25:56 -0500 (EST)

This is my output from "make clean" - why is target "clean-am" being
executed? The only dependency that "clean" has is "clean-recursive",
and that doesn't depend on "clean-am" either.

I am using make 3.77

Chris.

----------------------------------------------------------------------------

Making clean in .
make[1]: Entering directory `/home/Chris/Programs/fvwm'
make[1]: Nothing to be done for `clean-am'.
make[1]: Leaving directory `/home/Chris/Programs/fvwm'

 [snip]

Making clean in extras
make[1]: Entering directory `/home/Chris/Programs/fvwm/extras'
Making clean in .
make[2]: Entering directory `/home/Chris/Programs/fvwm/extras'
make[2]: Nothing to be done for `clean-am'.
make[2]: Leaving directory `/home/Chris/Programs/fvwm/extras'
Making clean in FvwmWharf

[snip]

Making clean in Scripts
make[3]: Entering directory `/home/Chris/Programs/fvwm/extras/FvwmScript/Scripts'
Making clean in .
make[4]: Entering directory `/home/Chris/Programs/fvwm/extras/FvwmScript/Scripts'
make[4]: Nothing to be done for `clean-am'.
make[4]: Leaving directory `/home/Chris/Programs/fvwm/extras/FvwmScript/Scripts'
Making clean in some_nice_icons

[snip]

make[1]: Leaving directory `/home/Chris/Programs/fvwm/extras'
Making clean in modules
make[1]: Entering directory `/home/Chris/Programs/fvwm/modules'
Making clean in .
make[2]: Entering directory `/home/Chris/Programs/fvwm/modules'
make[2]: Nothing to be done for `clean-am'.
make[2]: Leaving directory `/home/Chris/Programs/fvwm/modules'
Making clean in FvwmWinList

etc etc
--
Visit the official FVWM web page at <URL:http://fvwm.math.uh.edu/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked].

---

From: [email-masked] (Paul D. Smith)
Date: 29 Jan 1999 12:58:12 -0500

%% Chris Rankin <[email-masked]> writes:

  cr> This is my output from "make clean" - why is target "clean-am" being
  cr> executed? The only dependency that "clean" has is "clean-recursive",
  cr> and that doesn't depend on "clean-am" either.

No, it doesn't depend on it, but it invokes a submake to run it for the
current directory.  clean-recursive runs submakes to build "clean" in
each subdirectory, then it invokes a submake to run clean-am in the
current directory:

  cr> Making clean in extras
  cr> make[1]: Entering directory `/home/Chris/Programs/fvwm/extras'
  cr> Making clean in .
  cr> make[2]: Entering directory `/home/Chris/Programs/fvwm/extras'
  cr> make[2]: Nothing to be done for `clean-am'.
  cr> make[2]: Leaving directory `/home/Chris/Programs/fvwm/extras'

clean-am is _supposed_ to depend on various rules that clean the .o's,
etc.; my fvwm/Makefile, for example, has:

  clean-am:  clean-binPROGRAMS clean-compile clean-tags clean-depend \
                clean-generic mostlyclean-am

The "mostlyclean-am" target is the one that should be removing the .o's,
etc.; it depends on mostlyclean-compile which says:

  mostlyclean-compile:
          -rm -f *.o core *.core

It still works for me and I'm still not sure why it doesn't work for you
:(  You don't, by any odd chance, have files named "clean-am" lying
around do you?  Maybe you can cd to fvwm, then run:

  $ make -d clean-am

and examine the debugging output to see why it doesn't do anything?

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <[email-masked]>         Network Management Development
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
   These are my opinions---Nortel Networks takes no responsibility for them.
--
Visit the official FVWM web page at <URL:http://fvwm.math.uh.edu/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked].