Trying to make a small makefile with fpcmake

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Trying to make a small makefile with fpcmake

Alexandre Leclerc
Hi all,

I would like to create a small makefile to clean my source code.
Eventually I also want to compile my application. (The software is a
Lazarus project; I'm under win32).

In the following structure I made two Makefile.fpc:

./Makefile.fpc
./bin/Makefile.fpc

Code of ./Makefile.fpc:
[target]
dirs=bin

[rules]
clean: clean
  $(MAKE) -C bin clean

Code of ./bin/Makefile.fpc:
[clean]
files=$(wildcard ./*$(OEXT)) $(wildcard ./*$(PPUEXT)) $(wildcard ./*$(RSTEXT))


I compile both files with in ./ :
fpcmake -r

Now when I execute, I get a problem:
make clean
makefile:1341: *** missing separator.  Stop.

--
Alexandre Leclerc
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Trying to make a small makefile with fpcmake

Jonas Maebe-2

On 13 jul 2006, at 16:49, Alexandre Leclerc wrote:

> n the following structure I made two Makefile.fpc:
>
> ./Makefile.fpc
> ./bin/Makefile.fpc
>
> Code of ./Makefile.fpc:
> [target]
> dirs=bin
>
> [rules]
> clean: clean
>  $(MAKE) -C bin clean

You have to put a tab character in front of the "$(MAKE) .." command.  
If there are spaces instead of a tab, you will get the error you  
reported.


Jonas


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Trying to make a small makefile with fpcmake

Vinzent Höfler
In reply to this post by Alexandre Leclerc
On Thursday 13 July 2006 14:49, Alexandre Leclerc wrote:

> Now when I execute, I get a problem:
> make clean
> makefile:1341: *** missing separator.  Stop.

This is GNUmake. You need <TAB> chars instead of spaces in your
rule-commands:

> clean: clean
>  $(MAKE) -C bin clean
  ^ about here


Vinzent.

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Trying to make a small makefile with fpcmake

Alexandre Leclerc
In reply to this post by Jonas Maebe-2
2006/7/13, Jonas Maebe <[hidden email]>:

>
> On 13 jul 2006, at 16:49, Alexandre Leclerc wrote:
>
> > n the following structure I made two Makefile.fpc:
> >
> > ./Makefile.fpc
> > ./bin/Makefile.fpc
> >
> > Code of ./Makefile.fpc:
> > [target]
> > dirs=bin
> >
> > [rules]
> > clean: clean
> >  $(MAKE) -C bin clean
>
> You have to put a tab character in front of the "$(MAKE) .." command.
> If there are spaces instead of a tab, you will get the error you
> reported.

You won a piece of robot!

Thank you very much.

--
Alexandre Leclerc
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Trying to make a small makefile with fpcmake

Vinzent Höfler
On Thursday 13 July 2006 14:58, Alexandre Leclerc wrote:

> You won a piece of robot!

Oh man. And I was just two minutes late. ;)

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal