Reputation: 1577
I followed the instructions in this tutorial to build a custom version of Perl.
I originally did step 8 as follows:
./Configure -d -Dprefix=/custom/perl
After I did that, I did make
, make test
, and make install
.
Then I decided that I want Perl in /opt/perl instead, so I did make clean
and repeated the process and did step 8 with the appropriate directory. Still installed into /custom. Then I deleted custom completely and re-installed with the appropriate directory in the ./Configure
step. Still installed into /custom.
What am I missing? I want Perl in /opt not /custom.
Upvotes: 1
Views: 264
Reputation: 118645
The -d
option to ./Configure
causes the build process to source your existing config.sh
file. The -Dprefix=...
option will override the prefix
setting in your existing config.sh
, but unfortunately it won't override a number of other options that could be set in config.sh
based on an earlier setting for prefix
.
In addition to make clean
, you also need to rm config.sh
in order to safely reuse a perl build directory.
If you intend to copy the settings from your build process to another machine, you'll also want to clean out Policy.sh
.
Upvotes: 1
Reputation: 386361
You have the right usage for 5.16, as per its INSTALL
file: "You can also specify any prefix location by adding "-Dprefix='/some/dir'
" to Configure
's args."
So I suspect that make clean
does not remove the files created by Configure
. Try it from a fresh directory instead of a "cleaned" directory. Or at least try deleting config.sh
and Policy.sh
.
[Upd: It was pointed out that make distclean
can be used to do this. Of course, so can git clean -dfx
if you're installing from the repo instead of from the tarball. ]
Upvotes: 2