dhcpcd-discuss

dhcpcd doesn't build vs make-4.2.90

balducci

Thu Sep 05 13:05:31 2019

hello

this is just a headsup that you might be interested in

Running on linux.

dhcpcd doesn't build vs recently released (GNU) make-4.2.90 run candidate.

The reason seems to be using suffix rules with prerequisites in both
src/Makefile and src/dev/Makefile.

From make-4.2.90's NEWS:
    ----8<----
    * WARNING: Backward-incompatibility!
      Contrary to the documentation, suffix rules with prerequisites were being
      treated BOTH as simple targets AND as pattern rules.  Behavior now matches
      the documentation, and pattern rules are no longer created in this case.
    ---->8----

which basically says that suffix rules with prerequisites aren't
tolerated any longer

For me, running vs make-4.2.1 or the following workaround (which I
don't think is portable, though):

    ----8<----
    diff -c src/Makefile.FIX_SUFFIX_RULE src/Makefile
    *** src/Makefile.FIX_SUFFIX_RULE	Thu Sep  5 14:46:20 2019
    --- src/Makefile	Thu Sep  5 14:46:20 2019
    ***************
    *** 50,56 ****
      dev:
            cd dev && ${MAKE}

    ! .c.o: Makefile ${TOP}/config.mk
            ${CC} ${CFLAGS} ${CPPFLAGS} -c $< -o $@

      CLEANFILES+=	dhcpcd-embedded.h dhcpcd-embedded.c
    --- 50,56 ----
      dev:
            cd dev && ${MAKE}

    ! %.o : %.c  Makefile ${TOP}/config.mk
            ${CC} ${CFLAGS} ${CPPFLAGS} -c $< -o $@

      CLEANFILES+=	dhcpcd-embedded.h dhcpcd-embedded.c

    diff -c src/dev/Makefile.FIX_SUFFIX_RULE src/dev/Makefile
    *** src/dev/Makefile.FIX_SUFFIX_RULE	Thu Sep  5 14:46:20 2019
    --- src/dev/Makefile	Thu Sep  5 14:46:20 2019
    ***************
    *** 20,26 ****
      .c.So:
            ${CC} ${PICFLAG} -DPIC ${CPPFLAGS} ${CFLAGS} -c $< -o $@

    ! .So.so: ${DSOBJ}
            ${CC} ${LDFLAGS} -shared -Wl,-x -o $@ -Wl,-soname,$@ \
                $< ${LIBS}

    --- 20,26 ----
      .c.So:
            ${CC} ${PICFLAG} -DPIC ${CPPFLAGS} ${CFLAGS} -c $< -o $@

    ! %.so : %.So  ${DSOBJ}
            ${CC} ${LDFLAGS} -shared -Wl,-x -o $@ -Wl,-soname,$@ \
                $< ${LIBS}
    ---->8----


allows the build to complete successfully

thanks a lot for your valuable work

ciao
-gabriele

Follow-Ups:
Re: dhcpcd doesn't build vs make-4.2.90Stuart Henderson
Re: dhcpcd doesn't build vs make-4.2.90Roy Marples
Archive administrator: postmaster@marples.name