Retrieve arguments passed via ARGV in the terminal

2

I have a make file. Inside this make file, I call this file that has this:

set -f; echo $1 | bc

I want to retrieve the value of the function in C for this makefile. Example:

./a.out "12 + 12"

result: 24
    
asked by anonymous 11.11.2017 / 08:39

1 answer

0

I found a similar post in StackOverflow in English. The idea is to use an auxiliary variable that will contain the arguments:

run:
    ./executavel $(ARGS) 

At the command line:

$> make run ARGS="12 + 12"

Source: link

    
22.01.2018 / 17:34