Ævar Arnfjörð Bjarmason wrote: > [Sorry for not CC-ing you on the last version. Forgot to update the > giant send-email line I'm juggling for this series]. No worries. It is a rather large CC list at this point. :) > This *.pmc thing is just me being overly clever. Here's a v5 that gets > rid of it. Diff with v4: Ahh, thanks for the additional details on this. > -+PMFILES := $(wildcard perl/*.pm perl/*/*.pm perl/*/*/*.pm perl/*/*/*/*.pm) > -+PMCFILES := $(patsubst perl/%.pm,perl/build/lib/%.pmc,$(PMFILES)) > ++LIB_PERL := $(wildcard perl/*.pm perl/*/*.pm perl/*/*/*.pm perl/*/*/*/*.pm) > ++LIB_PERL_GEN := $(patsubst perl/%.pm,perl/build/lib/%.pm,$(LIB_PERL)) > + > +ifndef NO_PERL > -+all:: $(PMCFILES) > ++all:: $(LIB_PERL_GEN) > +endif > + > -+perl/build/lib/%.pmc: perl/%.pm > ++perl/build/lib/%.pm: perl/%.pm > + $(QUIET_GEN)mkdir -p $(dir $@) && \ > + sed -e 's|@@LOCALEDIR@@|$(localedir_SQ)|g' < $< > $@ > + Without the .pmc extensions, rpm picks up the perl dependencies, which is good. But an additional build/lib dir is created, which ends up in $perllibdir after install. Here's an extract from a local build: mkdir -p perl/build/lib/build/lib/ && \ sed -e 's|@@LOCALEDIR@@|/usr/share/locale|g' < perl/build/lib/Git.pm > perl/build/lib/build/lib/Git.pm mkdir -p perl/build/lib/build/lib/Git/ && \ sed -e 's|@@LOCALEDIR@@|/usr/share/locale|g' < perl/build/lib/Git/IndexInfo.pm > perl/build/lib/build/lib/Git/IndexInfo.pm mkdir -p perl/build/lib/build/lib/Git/ && \ sed -e 's|@@LOCALEDIR@@|/usr/share/locale|g' < perl/build/lib/Git/SVN.pm > perl/build/lib/build/lib/Git/SVN.pm mkdir -p perl/build/lib/build/lib/Git/ && \ sed -e 's|@@LOCALEDIR@@|/usr/share/locale|g' < perl/build/lib/Git/Error.pm > perl/build/lib/build/lib/Git/Error.pm mkdir -p perl/build/lib/build/lib/Git/ && \ sed -e 's|@@LOCALEDIR@@|/usr/share/locale|g' < perl/build/lib/Git/I18N.pm > perl/build/lib/build/lib/Git/I18N.pm When PMFILES and PMCFILES matched .pm and .pmc respectively, the glob didn't match duplicated files under build/lib, so this wasn't an issue. I'm not sure where this is best fixed. The build/lib dir could be moved outside of perl or it could be made .build/lib to avoid the wildcard match, perhaps. Building with perllibdir=/usr/share/perl5/vendor_perl results in: /usr/share/perl5/vendor_perl/Git /usr/share/perl5/vendor_perl/Git.pm /usr/share/perl5/vendor_perl/Git/Error.pm /usr/share/perl5/vendor_perl/Git/FromCPAN /usr/share/perl5/vendor_perl/Git/FromCPAN/Error.pm /usr/share/perl5/vendor_perl/Git/I18N.pm /usr/share/perl5/vendor_perl/Git/IndexInfo.pm /usr/share/perl5/vendor_perl/Git/SVN /usr/share/perl5/vendor_perl/Git/SVN.pm /usr/share/perl5/vendor_perl/Git/SVN/Editor.pm /usr/share/perl5/vendor_perl/Git/SVN/Fetcher.pm /usr/share/perl5/vendor_perl/Git/SVN/GlobSpec.pm /usr/share/perl5/vendor_perl/Git/SVN/Log.pm /usr/share/perl5/vendor_perl/Git/SVN/Memoize /usr/share/perl5/vendor_perl/Git/SVN/Memoize/YAML.pm /usr/share/perl5/vendor_perl/Git/SVN/Migration.pm /usr/share/perl5/vendor_perl/Git/SVN/Prompt.pm /usr/share/perl5/vendor_perl/Git/SVN/Ra.pm /usr/share/perl5/vendor_perl/Git/SVN/Utils.pm /usr/share/perl5/vendor_perl/build /usr/share/perl5/vendor_perl/build/lib /usr/share/perl5/vendor_perl/build/lib/Git /usr/share/perl5/vendor_perl/build/lib/Git.pm /usr/share/perl5/vendor_perl/build/lib/Git/Error.pm /usr/share/perl5/vendor_perl/build/lib/Git/I18N.pm /usr/share/perl5/vendor_perl/build/lib/Git/IndexInfo.pm /usr/share/perl5/vendor_perl/build/lib/Git/SVN.pm Note that not all of the .pm files are matched, which I believe is due to the glob matches only going 4 levels deep under the perl dir. Thanks, -- Todd ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Never do today that which will become someone else's responsibility tomorrow.