Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 01 Feb 2018 10:06:59 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 225601] /usr/share/mk/bsd.lib.mk LIBDIR improper conduct
Message-ID:  <bug-225601-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D225601

            Bug ID: 225601
           Summary: /usr/share/mk/bsd.lib.mk LIBDIR improper conduct
           Product: Base System
           Version: 10.3-STABLE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: misc
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: koue@chaosophia.net

Howdy,

I'm dealing with bsd.lib.mk and if 'LIBDIR' is defined in the Makefile file=
=20
it's not handled properly.

# cat Makefile
LIB=3D            test
CFLAGS+=3D        -Wall -Wstrict-prototypes
SRCS=3D           test.c
NO_OBJ=3D         yes
.include <bsd.lib.mk>

# make
cc -O2 -pipe -Wall -Wstrict-prototypes -DNDEBUG -std=3Dgnu99=20
-Qunused-arguments -c test.c -o test.o building static test library ranlib=
=20
-D libtest.a

# make install
install -C -o root -g wheel -m 444   libtest.a /usr/lib

# ls -la /usr/lib/libtest.a=20
-r--r--r--  1 root  wheel  1398 Jan 31 18:23 /usr/lib/libtest.a

If 'LIBDIR' is defined in Makefile the library file is installed as '${LIBD=
IR}'
instead in '${LIBDIR}'

# cat Makefile=20
LIB=3D            test
CFLAGS+=3D        -Wall -Wstrict-prototypes
SRCS=3D           test.c
NO_OBJ=3D         yes
LIBDIR=3D         /usr/lib/mylibz
.include <bsd.lib.mk>

# make
cc -O2 -pipe -Wall -Wstrict-prototypes -DNDEBUG -std=3Dgnu99=20
-Qunused-arguments -c test.c -o test.o building static test library ranlib=
=20
-D libtest.a

# make install
install -C -o root -g wheel -m 444   libtest.a /usr/lib/mylibz

# ls -la /usr/lib/mylibz=20
-r--r--r--  1 root  wheel  1398 Jan 31 18:24 /usr/lib/mylibz

According to /usr/share/mk/bsd.README:
LIBDIR          Target directory for libraries.

Instead of install the library file as '${LIBDIR}' 'make' should complain=20
if the directory is missing or try to create it and then install the=20
library file in it.

Do I miss something?

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-225601-8>