Make error for ifeq: syntax error near unexpected token

I played around the code and found that the conditional statements should be written without indentation, and this solved my problem.

If there is no indentation, Make will treat it as a directive for itself; otherwise, it’s regarded as a shell script.

Example code

Wrong:

target:
    ifeq (foo, bar)
        ...
    endif

Correct:

target:
ifeq (foo, bar)
    ...
endif

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)