I don’t know a way to do what you want exactly, but a workaround might be:
run: ./prog
./prog $(ARGS)
Then:
make ARGS="asdf" run
# or
make run ARGS="asdf"
More Related Contents:
- Make error: missing separator
- Passing additional variables from command line to make
- What is the difference between the GNU Makefile variable assignments =, ?=, := and +=?
- Define make variable at rule execution time
- What do @, – and + do as prefixes to recipe lines in Make?
- What do the makefile symbols $@ and $< mean?
- GNU Makefile rule generating a few targets from a single source file
- How to write loop in a Makefile?
- What’s the opposite of ‘make install’, i.e. how do you uninstall a library in Linux?
- Make: how to continue after a command fails?
- Difference between CPPFLAGS and CXXFLAGS in GNU Make
- Create directories using make file
- Passing the argument to CMAKE via command prompt
- How to get current relative directory of your Makefile?
- Is it possible to set CFLAGS to a linux kernel module Makefile?
- GNU make yields “commands commence before first target” error
- Best practice for building a make file
- Why .SECONDARY does not work with patterns (%) while .PRECIOUS does?
- Difference in details between “make install” and “make altinstall”
- Building C-program “out of source tree” with GNU make
- What are Makefile.am and Makefile.in?
- make *** no targets specified and no makefile found. stop
- Makefile ifeq logical or
- CMAKE_MAKE_PROGRAM not found
- Makefile header dependencies
- How to print out a variable in makefile
- What does @: (at symbol colon) mean in a Makefile?
- Create a variable in a makefile by reading contents of another file
- @ prefix when setting environment variable in Makefile
- Generic rule from makefile to CMake