Re: KDE2 helloworld.cpp
On Wed, 2002-10-02 at 12:58, John Batistic wrote:
> 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.
> >
> Colin
>
> 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
> ???
>
My blunder.
I found a typo in the makefile and discovered that the makefile started
processing at the end, not the beginning.
Thanks for all the input.
Humbly
John Batistic
Reply to: