I'm using make 3.81 on ubuntu 7.04
Originally Posted by matsp
I used the method #1 and the shell prompt:
I've checked the manual of make, and I've tried $(debug) or debug, y or "y"
ifeq (debug, y)
/bin/sh: Syntax error: word unexpected (expecting ")")
make: *** [all] Error 2
but the syntax seems to be legal:
If I use method #2 the shell will prompt:
The syntax of the conditional-directive is the same whether the conditional is simple or complex; after an else or not. There are four different directives that test different conditions. Here is a table of them:
ifeq (arg1, arg2)
ifeq 'arg1' 'arg2'
ifeq "arg1" "arg2"
ifeq "arg1" 'arg2'
ifeq 'arg1' "arg2"
So, how to generate makefile "on the fly"?
make -f makefile.step2 CCFLAGS=-O2
make: Entering directory `/home/jutirain/Research/Semi-automatic_Composition/Code/trunk'
make: makefile.step2: No such file or directory
make: *** No rule to make target `makefile.step2'. Stop.
make: Leaving directory `/home/jutirain/Research/Semi-automatic_Composition/Code/trunk'
make: *** [optimize] Error 2
Why is it so hard to write makefile...