GNU make variables in Makefile

Posted by JTom on Stack Overflow See other posts from Stack Overflow or by JTom
Published on 2010-04-23T17:01:49Z Indexed on 2010/04/23 17:03 UTC
Read the original article Hit count: 257

Filed under:
|
|

Hi,

I would like to create a Makefile which also creates a simple script for running the compiled application.

I have something like the following:

@touch $(SCRIPT)
@echo LD_LIBRARY_PATH=$(LIB_DIR) $(APP_DIR)/$(APP) $1 $2 $3 $4 $5 $6 > $(SCRIPT)
@chmod +x $(SCRIPT)
@echo Script successfully created.

And I want $1 $2 ... to appear in the script exactly like $1 $2 ... to represent scripts command-line arguments. I can't get it worked because Makefile is using $1 $2 as its own variables.. How can I accomplish that?

© Stack Overflow or respective owner

Related posts about make

    Related posts about makefile