You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It works as expected if I do
$ make data -f Makefile_restart
but here's what happens if I "make .data..."
$ make .data -f Makefile_restart
Using setrun from setrun_restart.py
make data
rm -f .data
Using setrun from setrun.py
python setrun.py amrclaw
python: can't open file 'setrun.py': [Errno 2] No such file or directory
The $(MAKE) data command is to blame -- it's not using the right version of the Makefile for this recursive call. (I also have a Makefile in the directory and if I remove that then it says it doesn't know how to make data at all.)
My GNU Make book doesn't tell how to fix this. It says there's a variable $(MAKEFLAGS) that should be passed but say that this does not contain the -f flag in particular.
The text was updated successfully, but these errors were encountered:
That's right - The $(MAKE) call from Makefile.common uses the Makefile in the apps directory rather than Makefile_restart (which did the "include Makefile.common").
I've got a directory with a file setrun_restart.py but no setrun.py and Makefile_restart sets SETRUN_FILE=setrun_restart.py
I modified the Makefile.common to print out what setrun file it's using...
----------------------------------------------------------------------------
Make data files needed by Fortran code:
.data:$(SETRUN_FILE) $ (MAKEFILE_LIST) ;
@echo Using setrun from $(SETRUN_FILE)
$(MAKE) data
data: $(MAKEFILE_LIST);
$(CLAW_PYTHON) $ (SETRUN_FILE) $(CLAW_PKG)
-rm -f .data
@echo Using setrun from $(SETRUN_FILE)
touch .data
----------------------------------------------------------------------------
It works as expected if I do
$ make data -f Makefile_restart
but here's what happens if I "make .data..."
$ make .data -f Makefile_restart
Using setrun from setrun_restart.py
make data
rm -f .data
Using setrun from setrun.py
python setrun.py amrclaw
python: can't open file 'setrun.py': [Errno 2] No such file or directory
The $(MAKE) data command is to blame -- it's not using the right version of the Makefile for this recursive call. (I also have a Makefile in the directory and if I remove that then it says it doesn't know how to make data at all.)
My GNU Make book doesn't tell how to fix this. It says there's a variable $(MAKEFLAGS) that should be passed but say that this does not contain the -f flag in particular.
The text was updated successfully, but these errors were encountered: