diff options
author | schmonz <schmonz@pkgsrc.org> | 2013-03-26 15:08:28 +0000 |
---|---|---|
committer | schmonz <schmonz@pkgsrc.org> | 2013-03-26 15:08:28 +0000 |
commit | 6609056fb76201ce427d4c6ca286f255753df5a2 (patch) | |
tree | 0bf1a0d691f001e6f2e6068c10d3cd7b0db053c4 /pkgtools/pkglint/Makefile | |
parent | c1be6520b967aa90997379068eb76183b2323c3e (diff) | |
download | pkgsrc-6609056fb76201ce427d4c6ca286f255753df5a2.tar.gz |
Extract PkgLint::* to files, then inline them.
These bits of non-main functionality are distracting to the casual
reader, and also to your intrepid refactorer. Since we recently
added some characterization tests that run the pkglint executable
against real packages, we can safely extract bits of code to separate
files and prove nothing broke in the move.
Instead of installing the new Perl modules where pkglint can find
them at runtime, I've added a build step to inline them right back
where they used to be (same order and everything). This is a little
annoying, but less annoying than suddenly needing to deal with Perl
runtime paths just for these few tiny modules. Also, loading modules
at runtime would affect pkglint's performance, and I don't yet have
performance tests to prove that this would be fine (or not), so I
can't safely do it.
No functional change intended.
Diffstat (limited to 'pkgtools/pkglint/Makefile')
-rw-r--r-- | pkgtools/pkglint/Makefile | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/pkgtools/pkglint/Makefile b/pkgtools/pkglint/Makefile index a38dd5a0eb4..111e21a1185 100644 --- a/pkgtools/pkglint/Makefile +++ b/pkgtools/pkglint/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.424 2013/01/19 22:51:11 schmonz Exp $ +# $NetBSD: Makefile,v 1.425 2013/03/26 15:08:28 schmonz Exp $ # Note: if you update the version number, please have a look at the # changes between the CVS tag "pkglint_current" and HEAD. @@ -22,7 +22,6 @@ PKG_INSTALLATION_TYPES= overwrite pkgviews WRKSRC= ${WRKDIR} NO_CHECKSUM= yes -NO_BUILD= yes USE_LANGUAGES= # none AUTO_MKDIRS= yes @@ -30,8 +29,7 @@ AUTO_MKDIRS= yes SUBST_CLASSES+= pkglint SUBST_STAGE.pkglint= post-configure -SUBST_FILES.pkglint+= pkglint.pl pkglint.t -SUBST_FILES.pkglint+= plist-clash.pl +SUBST_FILES.pkglint+= build.pl pkglint.pl pkglint.t plist-clash.pl .if defined(BATCH) SUBST_SED.pkglint+= -e s\|@PKGSRCDIR@\|/usr/pkgsrc\|g .else @@ -49,10 +47,16 @@ SUBST_SED.pkglint+= -e s\|@DATADIR@\|${PREFIX}/share/pkglint\|g quick-install: ${RM} -rf ${WRKSRC} ${MKDIR} ${WRKSRC} - ${MAKE} do-extract subst-pkglint do-install selftest clean + ${MAKE} do-extract subst-pkglint do-build do-install selftest clean do-extract: - cd ${FILESDIR} && ${CP} pkglint.0 pkglint.1 pkglint.pl pkglint.t plist-clash.pl ${WRKSRC} + cd ${FILESDIR} && ${CP} build.pl pkglint.0 pkglint.1 pkglint.pl pkglint.t plist-clash.pl ${WRKSRC} + mkdir ${WRKSRC}/PkgLint + cd ${FILESDIR} && ${CP} PkgLint/*.pm ${WRKSRC}/PkgLint + +do-build: + cd ${WRKSRC} && ${PERL5} build.pl < pkglint.pl > pkglint.pl.inlined \ + && mv pkglint.pl.inlined pkglint.pl do-test: cd ${WRKSRC} && prove pkglint.t |