Subject: Re: make rules bug
To: Christos Zoulas <christos@deshaw.com>
From: Chris G. Demetriou <cgd@alpha.bostic.com>
List: current-users
Date: 07/19/1994 18:27:03
> The prog rules were supposed to work with shell scripts too, but they
> don't anymore. Try making genclass in the libg++ subdirectory...
248 [sun-lamp] genclass % pwd
/usr/src/gnu/lib/libg++/genclass
249 [sun-lamp] genclass % ls -la obj/.
total 2
drwxrwxr-x 2 cgd source 512 Jul 19 15:21 ./
drwxrwxr-x 4 cgd source 512 Jul 16 16:57 ../
250 [sun-lamp] genclass % make
sed -e 's|^PROTODIR=.*|PROTODIR=/users/cgd/940718/usr/include/g++/gen|' -e 's|<VERSION>|2.4|' /usr/src/gnu/lib/libg++/genclass/genclass.sh /usr/lib/crt0.o /usr/lib/libc.a > genclass
251 [sun-lamp] genclass % ls -la obj/.
total 42
drwxrwxr-x 2 cgd source 512 Jul 19 15:21 ./
drwxrwxr-x 4 cgd source 512 Jul 16 16:57 ../
-rw-rw-r-- 1 cgd source 40543 Jul 19 15:21 genclass
'make genclass' also works fine from src/lib/libg++
there was a problem with this, but i fixed it a while ago...
are you using the latest make rules? the fix for the problem
that _i_ had with them is included below... basically,
the ${SRCS:N*.h:N*.sh:R:S/$/.o/g} was yeilding "", i.e. an empty
string, which was being added to OBJS for the libg++...
thoughts?
chris
===================================================================
RCS file: /b/source/CVS/src/share/mk/bsd.prog.mk,v
retrieving revision 1.44
retrieving revision 1.45
diff -c -r1.44 -r1.45
*** 1.44 1994/06/30 05:31:21
--- 1.45 1994/06/30 06:35:50
***************
*** 1,4 ****
! # $NetBSD: bsd.prog.mk,v 1.44 1994/06/30 05:31:21 cgd Exp $
# @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91
.if exists(${.CURDIR}/../Makefile.inc)
--- 1,4 ----
! # $NetBSD: bsd.prog.mk,v 1.45 1994/06/30 06:35:50 cgd Exp $
# @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91
.if exists(${.CURDIR}/../Makefile.inc)
***************
*** 53,59 ****
--- 53,61 ----
.if defined(PROG)
SRCS?= ${PROG}.c
+ .if !empty(SRCS:N*.h:N*.sh)
OBJS+= ${SRCS:N*.h:N*.sh:R:S/$/.o/g}
+ .endif
.if defined(LDONLY)
------------------------------------------------------------------------------