tech-toolchain archive

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

Make and makefile bugs (PRs 49085, 49086, 49087)



Hi!

I've just added some PRs concerning make(1).  I've prepared patches
for fixing the problems in a way I find good.  And this is where you
come in.  Someone might have a different opinion on some of these
things, so please discuss and lets find the best solution.

Here is a summary of all of the issues.  I've marked the ones I don't
expect anyone to object being bugs with only one way to fix as "obvious".
If you feel otherwise, please do raise an objection.  For the others
I have expressed my opinion.

I have successfully complied src/ with these patches applied, so
there's at least some proof of them working.  More testing is of course
needed.  The related documentation changes and tests are still a work
in progress.


    PR 49085: make(1): several parsing errors
        Issue 1: variable modifiers don't work with D and F forms of
                local variables
        Issue 2: $(?D) and $(?F) expand to null string
        Issue 4: lib(member) as the last target before ':' results in
                syntax error

            Obvious.

        Issue 3: line continuations in commands are handled incorrectly

            This is a point of whether we want to be POSIX compliant
            or not.  I support POSIX compliance.


    PR 49086: make(1): many problems with dependency handling
        Issue 1: explicit rules for lib(member) targets do not work
                properly
        Issue 2: POSIX .s1.a transformations do not work
        Issue 3: single suffix rules remain active after .SUFFIXES is
                cleared
        Issue 4: suffix rules do not become regular rules when .SUFFIXES
                is cleared
        Issue 5: adding more suffixes does not make existing rules
                into suffix rules
        Issue 6: transformation search can end up in an infinite loop
        Issue 8: implicit/explicit sources from suffix rules are added to
                all targets
        Issue 9: the value of $(*) sometimes does not contain
                the directory part
        Issue 11: sources from transformation rules are expanded
                incorrectly

            Obvious.

        Issue 7: using the .NULL special target breaks single suffix
                rules

            Also obviously a bug.  But in my opinion this whole feature
            can be scrapped.  I can't see anything it does that couldn't
            better be done with single suffix transformation rules.
            My patch removes this feature, making .NULL to be a parsing
            error (so people who might've used it catch the change).

        Issue 10: explicit dependencies affect transformation rule
                selection

            This seems to have been intended to be a feature, but I
            consider it to be a bug.  If you want to choose a different
            transformation rule, re-order the SUFFIXES in to the correct
            order.  Thus my patch removes this completely.

        Issue 12: if a rule is defined multiple times, the first one
                is used

            This seems to have been intended to work so that the last
            one is the one used (POSIX way), but there's a comment
            "We cannot do this until we fix the tree".  What tree
            does this mean?  The NetBSD source tree?  The target
            tree inside make?  My patch enables the proper way.


    PR 49087: some makefiles in src/ use $(.IMPSRC) in explicit rules

        Obvious.


I've sent emails to attach links to patches to the PRs, but I've been
graylisted.  I must've found too many bugs ;D  So here are the links
to the patches.

    http://roskakori.fi/software/bugs/NetBSD/PR49085/patch
    http://roskakori.fi/software/bugs/NetBSD/PR49086/patch
    http://roskakori.fi/software/bugs/NetBSD/PR49087/patch

-- 
Jarmo Jaakkola


Home | Main Index | Thread Index | Old Index