From owner-freebsd-toolchain@freebsd.org Wed Dec 2 15:22:29 2015 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B3319A3E258 for ; Wed, 2 Dec 2015 15:22:29 +0000 (UTC) (envelope-from wam@hiwaay.net) Received: from fly.hiwaay.net (fly.hiwaay.net [216.180.54.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 839361379 for ; Wed, 2 Dec 2015 15:22:29 +0000 (UTC) (envelope-from wam@hiwaay.net) Received: from kabini1.local (dynamic-216-186-213-32.knology.net [216.186.213.32] (may be forged)) (authenticated bits=0) by fly.hiwaay.net (8.13.8/8.13.8/fly) with ESMTP id tB2FMLQD030963 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Wed, 2 Dec 2015 09:22:22 -0600 Subject: Re: [Re-post from users]: gmake question To: FreeBSD toolchain mailing list !!!! References: <565DA0F6.9010709@hiwaay.net> From: "William A. Mahaffey III" Message-ID: <565F0CAD.4090605@hiwaay.net> Date: Wed, 2 Dec 2015 09:27:51 -0553.75 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <565DA0F6.9010709@hiwaay.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-toolchain@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Dec 2015 15:22:29 -0000 On 12/01/15 07:35, William A. Mahaffey III wrote: > > > I am using gmake under FreeBSD 9.3R to (try to) maintain some inhouse > mixed language code (ANSI C, some c++, FORTRAN 77). I have a utility > library which I use to hold C & c++ object files, using the 'target::' > syntax. This works AOK under Linux (gmake 3.8.2), puts both types of > objects in the same library smooth as silk. However under FreeBSD > (gmake 4.1.2), it only puts the 1st group of objects in, either the C > or c++ depending on which is 1st in the makefile. When I try the > 'target:' syntax, it wound up deleting some of my source files > (!!!!!). I reproduce the relevant parts of the makefile below: > > > . > . > . > . > > force: clean all > > depend: > @makedepend -- $(CFLAGS) -- -f Makefile $(SRCS) > @\rm -f Makefile.bak > @cp -p Makefile MakeUtils > @echo MakeUtils: Done with $@. > > iccdepend: > @icc $(IFLAGS) -c -MM -MF depends.inc $(SRCS) > @echo MakeUtils: Done with $@. > > $(LIB):: $(CPPSRC) > $(CC) $(CPPFLAGS) -c $? > ar ruv $@ ${?:.cpp=.o} && rm -f ${?:.cpp=.o} > @echo MakeUtils: Done with $@. > > $(LIB):: $(SRCS) > $(CC) $(CFLAGS) -c $? > ar ruv $@ ${?:.c=.o} && rm -f ${?:.c=.o} > @echo MakeUtils: Done with $@. > > # DO NOT DELETE THIS LINE -- make depend depends on it. > > > CPPSRC lists the c++ files & SRCS lists the C files. Is this supposed > to work under FreeBSD 9.3R & this version of gmake ? TIA for any > pointers & have a good one. > > > BTW: > > [wam@devbox, pre, 8:08:13pm] 2846 % uname -a > FreeBSD devbox 9.3-RELEASE-p30 FreeBSD 9.3-RELEASE-p30 #0: Mon Nov 2 > 10:11:50 UTC 2015 > root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 > [wam@devbox, pre, 8:08:16pm] 2847 % grep make /etc/LIST.installed.txt > automake-1.15_1 GNU Standards-compliant Makefile generator > automake-wrapper-20131203 Wrapper script for GNU automake > gmake-4.1_2 GNU version of 'make' utility > libxklavier-5.3_1,1 Utility library to make XKB stuff easier > makedepend-1.0.5,1 Dependency generator for makefiles > [wam@devbox, pre, 8:08:53pm] 2848 % Update: I went ahead & downloaded & installed (in /usr/local/bin) GNU make 3.8.2 & it indeed works as expected & as I interpret the online docs. Bug in make 4.1.2 ? Any more info wanted, just ask.... -- William A. Mahaffey III ---------------------------------------------------------------------- "The M1 Garand is without doubt the finest implement of war ever devised by man." -- Gen. George S. Patton Jr.