Closed MaxPerl closed 7 years ago
helpers are used to help render commands, so what is happening, the string chdir "$CWD/win"
is being evaluated, and it returns 1
for success, which it then tries to execute. It is a little awkward, but what you want to do is probably something like this:
alien_build_commands => [ 'cd win; %c --prefix=%s --enable-64bit', 'make -C win' ],
The reason code references do not work is because the configuration is serialized between running Build.PL
and ./Build
by Module::Build
which doesn't allow code references to be saved.
An option to change the base directory for build commands would be a useful feature. This is also handled better by Alien::Build
which is under development and allows you to provide code references in command sequences like this.
edit: fixed capitalization
Dear plicease,
Thank you very much for your help.
I got it with following command:
alien_build_commands => [ 'cd win; %c --prefix=%s --enable-64bit', 'make -C win' ],
Nevertheless I am a little bit confused. Because the following don't work. And I don't know why:
alien_build_Commands => [ 'cd win; %c --prefix=%s --enable-64bit', 'make -C win' ],
With this the cd part is simply bypassed.
and with
alien_build_commands => [ 'cd win', '%c --prefix=%s --enable-64bit', 'make -C win' ],
I get the error, that the command cd was not found.
Has anyone an idea why the first works and the others don't?
Anyway thank you very much for your help...
The second was my bad, I believe I accidentally capitalized Commands
which is wrong!
I wouldn't expect the third version to work, but I am puzzled by the error that you got.
Okay next problem. I test it no on windows (before I worked on Linux). On Windows I get the error that the filename, the directory name or the volume label syntax is incorrect.
Try "cd win && %c --prefix=%s --enable-64bit"
that should work in both windows and linux unix.
Thanks for your help. Now cd win is executed before ./configure. Unfortunately the Build script now stopped after configure. With ["cd win && %c --prefix=%s --enable-64bit && make"] it stopped after the make process and the script doesn't enter in the installation stage.
If you have the Alien dist you are working on somewhere public that I can see (preferably GitHub) I may be able to help. Also useful if there are any diagnostics emitted from either make
or perl or AB::MB
.
Hi Plicease, Thanks for your help. Herel you can find the repo. It is in a very early stadium. It concerns the following bug report. My target was to develop the same for Tk and so on. But at the moment I think that this is perhaps over my abilities...
Thank you for the detail. I am adding myself as a CC: on the RT issue in case I can help there. It doesn't look like a bug in AB atm, so I am going to close this one.
btw- I will take a look at this when I get home and have my PC to test on but that won't be for two weeks at least.
I tried alien_helpers, but They didn't work as expected. I think the problem is that the code is executed twice. Here a little code snippet (I just want to change the dir before building becaus the source archive has several subdirectories for different OSes):
The error message is as follow:
By the way: If I pass a code ref
alien_helper => sub {...}
I get the following error as early as I execute perl Build.PL: