[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-cflow] cflow for Makefiles
From: |
Sergey Poznyakoff |
Subject: |
Re: [bug-cflow] cflow for Makefiles |
Date: |
Wed, 22 Jun 2011 23:05:53 +0300 |
Alazar, Roberto <address@hidden> ha escrit:
> Chapter 11 of the Manual says: "In this chapter we will describe a
> generic rule for Makefile.am. If you do not use automake, you can
> deduce the rule for plain Makefile from this one."
>
> Well, no, I can't. I didn't make up the Makefiles for our project. We
> have no Makefile.am for me to change, even if I understood how to do
> so. Please advise.
That depends a great deal on how your Makefile is written. In general,
you would perhaps have some variable keeping the names of the sources
used to build the target binary. If so, just follow the rule
described in Chapter 11. Suppose this variable is named SOURCES, then:
PROGRAM.cflow: $(SOURCES) $(CFLOWRC) Makefile
CFLOWRC=$(CFLOWRC) \
cflow -o$@ $(CFLOW_FLAGS)
$(INCLUDES) $(CPPFLAGS) \
$(SOURCES)
Replace the variable names with ones used in your Makefile, if needed.
It is supposed that CFLOWRC keeps the actual pathname of your
cflow.rc file. The purpose of other variables is obvious.
Regards,
Sergey