'Modify working makefile to do pre-stage before compiling and linking

I'm using this makefile as an example:

https://gist.github.com/mihaitodor/bfb8e7ad908489fdf3ceb496573f306a

Before compiling/linking I need to do a pre-stage, consisting of cd to a directory and run a script. Without the pre-stage it compiles & links fine.

I think I need to change the all rule:

all : $(TESTS)

I have tried this:

all : cd /bla/bla ./my_script $(TESTS)

and I have tried this:

all :
     cd /bla/bla ./my_script
     $(TESTS)

but it stops the compile/linking stage.

Given the URL above, where should I insert my pre-stage?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source