tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: RFC: New pkglint warning for Makefile.common




To: "tech-pkg%NetBSD.org@localhost" <tech-pkg%NetBSD.org@localhost>

Subject: Re: RFC: New pkglint warning for Makefile.common

From: "Johnny C. Lam" <jlam%pkgsrc.org@localhost>

Date: Fri, 04 Jan 2008 09:33:09 -0500


Roland Illig wrote:


When updating such a package or
 modifying Makefile.common, one has to  search the whole pkgsrc tree for files that use the Makefile.common, and  in some cases this cannot be guessed by the package names alone. For  example, x11/labltk/Makefile uses lang/ocaml/Makefile.common, which was  a little surprise for me, because the former doesn't have a name related  to OCaml.

Therefore, I wrote a bit of code that prints the following warning:

$ pkglint -e x11/labltk
WARN: x11/labltk/../../lang/ocaml/Makefile.common:3: \
        Please add a line "# used by x11/labltk/Makefile" here.

        Since Makefile.common files usually don't have any comments and
        therefore not a clearly defined interface, they should at least
        contain references to all files that include them, so that it is
        easier to see what effects future changes may have.

        If there are more than five packages that use a Makefile.common,
        you should think about giving it a proper name (maybe plugin.mk)
        and documenting its interface.

Do you find this warning useful? Unnecessary? Whatever?


This is useful, if a bit verbose.
 Documenting which Makefiles include  Makefile.common is just generally a good idea.

        Cheers,

        -- Johnny C. Lam



Follow-Ups:

Re: RFC: New pkglint warning for Makefile.common
From: Roland Illig


References:

RFC: New pkglint warning for Makefile.common
From: Roland Illig




Prev by Date: Re: CVS commit: pkgsrc/mk/flavor/pkg

Next by Date: Re: CVS commit: pkgsrc/mk/flavor/pkg

Previous by Thread: Re: RFC: New pkglint warning for Makefile.common

Next by Thread: Re: RFC: New pkglint warning for Makefile.common

Indexes:

reverse Date

reverse Thread

Old Index



Home | Main Index | Thread Index | Old Index