Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/java/org/perlonjava/core/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public final class Configuration {
* Automatically populated by Gradle/Maven during build.
* DO NOT EDIT MANUALLY - this value is replaced at build time.
*/
public static final String gitCommitId = "00cdd0b3a";
public static final String gitCommitId = "00a6d786f";

/**
* Git commit date of the build (ISO format: YYYY-MM-DD).
Expand All @@ -48,7 +48,7 @@ public final class Configuration {
* Parsed by App::perlbrew and other tools via: perl -V | grep "Compiled at"
* DO NOT EDIT MANUALLY - this value is replaced at build time.
*/
public static final String buildTimestamp = "Apr 23 2026 07:38:18";
public static final String buildTimestamp = "Apr 23 2026 08:15:23";

// Prevent instantiation
private Configuration() {
Expand Down
40 changes: 25 additions & 15 deletions src/main/perl/lib/ExtUtils/MakeMaker.pm
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ sub _install_pure_perl {

my $total = scalar(keys %pm) + scalar(keys %scripts);
print "=" x 60, "\n";
print "Configured! $total files will be installed when 'make' runs.\n";
print "Configured! $total files will be installed when 'make install' runs.\n";
print "=" x 60, "\n\n";

return $mm;
Expand Down Expand Up @@ -454,9 +454,11 @@ sub _extract_version {
sub _create_install_makefile {
my ($name, $version, $args, $pm, $scripts, $mm) = @_;

# Create a Makefile that actually installs files when 'make' runs.
# This defers installation to after CPAN.pm has resolved and installed
# dependencies, enabling proper dependency resolution for any CPAN module.
# Create a Makefile that builds into ./blib when 'make' runs, runs tests
# against ./blib when 'make test' runs, and copies files to INSTALLSITELIB
# only when 'make install' runs. This matches standard ExtUtils::MakeMaker
# semantics so that 'cpan -t' (test-only) does not install the module,
# and lets CPAN.pm resolve/install dependencies before the install step.
# Respect custom MAKEFILE name if provided
my $makefile = $args->{MAKEFILE} || 'Makefile';

Expand Down Expand Up @@ -604,8 +606,11 @@ sub _create_install_makefile {

print $fh <<"MAKEFILE";
# Makefile generated by PerlOnJava MakeMaker
# Files are installed during 'make' (not during Makefile.PL)
# This enables CPAN.pm to resolve dependencies before installation
# 'make' builds into ./blib (no files installed to site libdir)
# 'make test' runs the test harness against ./blib
# 'make install' copies ./blib files to INSTALLSITELIB
# This matches standard ExtUtils::MakeMaker semantics so that 'cpan -t'
# (test only) does not install, while 'cpan -i' (install) does.
$prereq_comment
NAME = $name
DISTNAME = $distname
Expand All @@ -618,18 +623,20 @@ NOECHO = \@
RM_RF = rm -rf

all:: pm_to_blib pure_all pl_files blib_scripts config
\t\@echo "PerlOnJava: $name v$version installed ($file_count files)"
\t\@echo "PerlOnJava: $name v$version built ($file_count files in ./blib)"

# Copy module and data files to installation directory
# pm_to_blib: stage module/data files into ./blib/lib (matches standard
# ExtUtils::MakeMaker). Files are NOT copied to INSTALLSITELIB here;
# that happens in the 'install' target.
# Also create blib/arch so that "use blib" / "-Mblib" works (blib.pm requires both).
pm_to_blib::
$install_cmds_str

# Copy to blib/lib for test compatibility (make test uses PERL5LIB=./blib/lib)
# Also create blib/arch so that "use blib" / "-Mblib" works (blib.pm requires both)
pure_all::
\t\@mkdir -p blib/arch
$blib_cmds_str

# pure_all is an alias target some postambles (File::ShareDir::Install,
# Alien::Build) hook to add extra blib-staging steps. Depends on pm_to_blib.
pure_all:: pm_to_blib

# Stage EXE_FILES into blib/script/ so tests can invoke them via the blib tree
blib_scripts::
$blib_script_cmds_str
Expand All @@ -638,7 +645,7 @@ $blib_script_cmds_str
pl_files::
$pl_cmds_str

# Install executable scripts
# Install executable scripts (called only from 'install')
install_scripts::
$script_cmds_str

Expand All @@ -651,8 +658,11 @@ config::
test::
\t$test_cmd

# install: copy staged files from ./lib to INSTALLSITELIB, plus scripts.
# Depends on 'all' to ensure blib is built first (matches standard MakeMaker).
install:: all install_scripts
\t\@echo "PerlOnJava: $name installed to \$(INSTALLSITELIB)"
$install_cmds_str
\t\@echo "PerlOnJava: $name v$version installed ($file_count files) to \$(INSTALLSITELIB)"

clean::
\t\$(RM_RF) blib pm_to_blib
Expand Down
Loading