Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2006-07

Trying to make a small makefile with fpcmake

5 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

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
Jonas Maebe
to Alexandre Leclerc
Alexandre Leclerc wrote 12 lines
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

Alexandre Leclerc
to Jonas Maebe: You have to put a tab character in front of the "$(MAKE) .." command. If there are spaces…

2006/7/13, Jonas Maebe :

Show quoted text 19 lines
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