Invoking a python script from a makefile in another directory -


I have a mess file that calls a dragon script which remains in the same directory as messphyme. It works just fine.
makefile # 1:

  auto: ./myscript.py  

Now, I have another message file, another in the directory, and Want to call it makefile before it. In Makefile # 2:

  Target: CD $ (DIR); $ (Make) auto;  

The problem is, when the script runs, it runs as if it's in the same direction, as Messiefile is # 2. At Stdout, I see a path to "create [3]: Exclude directory" and # 1, just after executing and before running the script.

On a suggestion, I tried to modify message # 2:

  target: (cd $ dir; $ make auto;)  < / Pre> 

but it has been interpreted as "CD IR: AK Auto" when I change the brackets around the DIR and I do, I get the same behavior as before.

I have tried to modify the Python script, assuming it in # 2 it is given a path to # 1

Update : Below Code is formatted in my comment, so it is here:

I tried to put it out and basically what you describe is there is nothing to do with the fact that the goal Does auto call a "makefile.release" file?

  AUTO: @ AKO is the makefile # $ $ $ IN $ (PWD) flag = 1 $ (make) -f messayfile. Goal A flag = 2 $ after the rules (make) -f Messefiles. Terms and Conditions of the Terms / MISCTUP /  

I left this fact for simplicity, but now I am surprised.

Update 2 : I do not understand why the makefile is not running, to run myscript.py, though it is in the directory in which it remains, but I am trying to run the script correctly even when it is implemented from a different directory. It opens some subprocesses, runs a executable in each subpublishing, and saves files stdout from each subpublishing. . Python Subprances Pope goes through the current working directory, from which the script is implemented, not by default, where it remains. I added speed to the residential directory as a passport in the form of cwd. For some reason, however, when I run myscript.py in my own directory, it works, but when I call it from other place (from command line), then hang in proc.communicate () . I should solve this dragon issue, but I still want to know why external makeup file can not bring this script from its directory.

This is very strange first easy part:

  target: ( Cd $ dir; $ make auto;)  

brackets do nothing here, and translate $ DIR as $ D Since the letter 'I' and the letter 'R', since the variable D is not defined, it works for 'IR' also for $ MAKE .

Mayfiles should work in writing for the real problem now. And you say that the directory that runs this script leaves the # 1 first ? I can only suggest that you first try a simple problem. Put it in Makefile # 1:

  Automatic: @echo This is makefile in # $ $$$ (PWD)  

and then use makefile # 2 to create target To create it,

  create [1]: The directory is to enter path-to-one, automatically create messeile # 1 in the path-to-one [1] : The directory 'path-one-one'. If this is what it says, then there is something wrong with your script if you do not have any such thing, you can create a makefile Unable to reach # 1, and maybe your  DIR  is not correct if it works, but this directory is in # 2, Micro My best guess try that experiment you have to give another rule that refers to the Makefile # 1 and let us know. 

Edit:
OK, it probably tells how to leave the directory # 1 before running this script. I suggest you comment on those lines and see that the problem is still there about this script: what does it do and how do you know where it is going?


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -