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

Re: KDE2 helloworld.cpp

On Tue, 2002-10-01 at 22:58, Colin Watson wrote:
> On Tue, Oct 01, 2002 at 10:51:12PM +1200, John Batistic wrote:
> > On Tue, 2002-10-01 at 21:42, Colin Watson wrote:
> > > Keep it simple and realize that this level of 'make' use is not all that
> > > magic. '-I$(INCLUDES)' doesn't work because it expands to
> > > '-I-I/usr/share/qt/include -I/etc/kde2/include', which is obviously
> > > wrong. Just try this:
> > > 
> > >   $(CC) $(INCLUDES) $(CFLAGS) $(LFLAGS) -o helloworld helloworld.o $(LIBS)
> > 
> > Some progress. 
> > That results in:
> > makefile:8: *** missing separator.  Stop.
> > (your suggested line is line 8 and I copy/pasted it)
> Did you break the formatting in your original file? Commands in rules
> *must* be prefixed with a tab character.
> You might want to read the make documentation - it's very comprehensive.

You are quite right. I had, in my enthusiam, omitted the leading tab.

I have discovered that if I use the following as a makefile:
[1]helloworld: helloworld.o
[3]        pwd
the result is:
jbat@xxxx:~/gcc/kde$ make
[2]g++    -c -o helloworld.o helloworld.cpp
This replicates the result that I get from using the sample makefile.
ref[1] produces ref[2] without regard to the ref[3]

Is this:
an incorrect sample makefile
or a make default
or a make bug

By restating the make lines to what I am accustomed to using over many
years with MSDOS make, I can control the actions of make. Using the KDE
sample, I can't.

What do you think?

John Batistic

Reply to: