Re: Makefiles compatible with both BSD and GNU make?

From: David Kelly (dkelly_at_hiwaay.net)
Date: 03/16/05

  • Next message: Danny: "Portsnap necessary? CVSup insecure?"
    Date: Wed, 16 Mar 2005 16:58:51 -0600
    To: Dan Nelson <dnelson@allantgroup.com>
    
    

    On Wed, Mar 16, 2005 at 02:50:17PM -0600, Dan Nelson wrote:
    >
    > FreeBSD's make understands the gnu-style include syntax with no leading
    > dot, even though it's undocumented (grep for SYSVINCLUDE in the
    > source). Automake is the usual way around compatibility issues; it has
    > its own conditional syntax that it expands out when it generates the
    > Makefile, and will create the appropriate dependency lines.

    Sure enough.

    BSD make requires quotes around the filename in .include ".depend" but
    if one removes the leading dot on "include" it can't find .depend if the
    filename is still quoted.

    This works in BSD make altho its not doing anything that isn't
    automatically done:
    .include ".depend"

    Above is apparently the same as this in GNU make and accepted by BSD:
    include .depend

    This does not work in BSD as it seems to be trying to find ".depend"
    with quotes, which doesn't exist:
    include ".depend"

    -- 
    David Kelly N4HHE, dkelly@HiWAAY.net
    ========================================================================
    Whom computers would destroy, they must first drive mad.
    _______________________________________________
    freebsd-questions@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-questions
    To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
    

  • Next message: Danny: "Portsnap necessary? CVSup insecure?"

    Relevant Pages

    • Re: posix ps (was Re: Adding `pgrep and `pkill to /usr/bin)
      ... I use to switch between personalities. ... the bsd syntax. ... hpux -f only list the first 64 characters of a command line ...
      (freebsd-arch)
    • Re: Simple BSD Backup System
      ... coming to BSD is meant to pick up the essential syntax and primary ... Please note that the handbook clearly notes this a bit above the ... | points for other file systems or symbolic links into those file systems. ...
      (comp.unix.bsd.freebsd.misc)
    • Re: Problem mit init.d script
      ... Nimm ein System V ps bzw. GNU procutil ps und die Optionen ... Das ist wesentlich robuster als das dysfunktionale BSD ps bzw. der BSD ... Syntax vom GNU procutils ps. ...
      (de.comp.os.unix.shell)
    • Re: make vs. gmake
      ... BSD make and GNU make use different syntax, ... except for working around bugs in BSD make. ...
      (comp.unix.bsd.freebsd.misc)