help-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gmake Makefile target X also process target Y when target X called


From: address@hidden
Subject: gmake Makefile target X also process target Y when target X called
Date: 4 Feb 2007 15:03:31 -0800
User-agent: G2/1.0

  Hello.
  I'm using gmake 3.80 on a solaris 10 server and I'm trying to create
a Makefile (my first one:).  I've succeeded in creating 3 different
targets.   I have a situation where if one of the targets is specified
I also want one of the other target's to be processed first.   Here is
an simplified example Makefile that mimics what I am doing.
   When someone calls "gmake commit"  I want the "check" target to be
processed first to verify the configs before performing the commit.
I realize I could duplicate the command line in the "check" target
inside the "commit" target but that seems kludgey.  I've perused the
gmake documentation  but I've not been able to figure out how to do
what I want.  I think I'm still caught up on trying to understand the
vocabulary used in the gmake documentation so I'm hoping someone can
point out how to perform what I'm trying to do.   It seems like this
goal would be very trivial but i cannot unriddle it:)


help:
        @echo "usage blah blah blah"

check:
        @syntax_checker $(CONFIG_DIR)

commit:
        @cvs commit -m $(LOG_MESSAGE)


   TIA!  G.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]