Thread View: gnu.utils.bug
1 messages
1 total messages
Started by Paul Higgins
Tue, 09 May 1989 00:10
Bug in handling of double colon rules (make 3.48)
Author: Paul Higgins
Date: Tue, 09 May 1989 00:10
Date: Tue, 09 May 1989 00:10
134 lines
4477 bytes
4477 bytes
Version 3.48 of Make doesn't handle double colon rules correctly in
some cases. This simple Makefile produces the correct results with
Make 3.48:
test:: /bin/true
echo "hello 1"
clean::
rm myprog
test:: /bin/echo
echo "hello 2"
When I'm using Make version 3.48 to install X11, however, it seems to
only notice the first double colon rule. In the following Makefile,
incorrect results occur for the targets "relink", "install" and
"clean".
I've tried Make 3.48 on a Sun 3 running SunOS 4.0.1, a Sun 4 running
SunOS 4.0.1, and a Sequent Symmetry S81 running Dynix 3.0.12, each time
comparing Make version 3.48 to the vendor's /bin/make.
By the way, the Makefiles used in generating and installing X11 are full
of double colon rules.
Using the "-p" option when executing Make 3.48 shows that only one of
each of the double colon rules appears in the data base.
BOOTSTRAPCFLAGS =
INSTALL = install
TAGS = ctags
RM = rm -f
MV = mv
MAKE = make
STD_DEFINES =
CC = gcc
DESTDIR =
BINDIR = $(DESTDIR)/usr/bin/X11
MANPATH = $(DESTDIR)/usr/man
MANSOURCEPATH = $(MANPATH)/man
MANDIR = $(MANSOURCEPATH)d
INSTMANFLAGS = -m 0444
CDEBUGFLAGS = -O -traditional -finline-functions -fstrength-reduce \
-msoft-float -DPURDUE -DUCI
DEPEND = $(DEPENDSRC)/makedepend
IMAKE = $(IMAKESRC)/imake
CFLAGS = $(CDEBUGFLAGS) $(INCLUDES) $(STD_DEFINES) $(DEFINES)
LDFLAGS = $(CDEBUGFLAGS) $(SYS_LIBRARIES) $(SYSAUX_LIBRARIES)
TOP = /usr/cfp/sun3-40/X11
UTILSRC = $(TOP)/util
DEPENDSRC = $(UTILSRC)/makedepend
IMAKESRC = $(UTILSRC)/imake
IRULESRC = $(UTILSRC)/imake.includes
XLIB = /usr/lib/libX11.a
XMULIB = /usr/lib/libXmu.a
MACROFILE = Sun.macros
IMAKE_DEFINES =
IMAKE_CMD = $(NEWTOP)$(IMAKE) -TImake.tmpl -I$(NEWTOP)$(IRULESRC) \
-s Makefile $(IMAKE_DEFINES)
RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a \
.emacs_* tags TAGS make.log MakeOut
SRCS1 = bitmap.c dialog.c
OBJS1 = bitmap.o dialog.o
SRCS2 = bmtoa.c
OBJS2 = bmtoa.o
SRCS3 = atobm.c
OBJS3 = atobm.o
PROGRAMS = bitmap bmtoa atobm
OBJS = $(OBJS1) $(OBJS2) $(OBJS3)
SRCS = $(SRCS1) $(SRCS2) $(SRCS3)
all:: $(PROGRAMS)
bitmap: $(OBJS1) $(XMULIB) $(XLIB)
$(RM) $@
$(CC) -o $@ $(OBJS1) $(XMULIB) $(XLIB) $(LDFLAGS) -lm $(SYSLAST_LIBRARIES)
install:: bitmap
$(INSTALL) -c $(INSTALLFLAGS) bitmap $(BINDIR)
install.man:: bitmap.man
$(INSTALL) -c $(INSTMANFLAGS) bitmap.man $(MANDIR)/bitmap.d
relink::
$(RM) $(PROGRAMS)
$(MAKE) $(MFLAGS) $(PROGRAMS)
depend:: $(DEPEND)
depend::
$(DEPEND) -s "# DO NOT DELETE" -- $(CFLAGS) -- $(SRCS)
$(DEPEND):
@echo "making $@"; \
cd $(DEPENDSRC); $(MAKE)
clean::
$(RM) $(PROGRAMS)
bmtoa: $(OBJS2) $(XMULIB)
$(RM) $@
$(CC) -o $@ $(OBJS2) $(XMULIB) $(LDFLAGS) $(SYSLAST_LIBRARIES)
relink::
$(RM) bmtoa
$(MAKE) $(MFLAGS) bmtoa
clean::
$(RM) bmtoa
atobm: $(OBJS3)
$(RM) $@
$(CC) -o $@ $(OBJS3) $(LDFLAGS) $(SYSLAST_LIBRARIES)
relink::
$(RM) atobm
$(MAKE) $(MFLAGS) atobm
clean::
$(RM) atobm
install:: bmtoa
$(INSTALL) -c bmtoa $(BINDIR)
install:: atobm
$(INSTALL) -c atobm $(BINDIR)
emptyrule::
clean::
$(RM_CMD) \#*
Makefile:: $(IMAKE)
Makefile:: Imakefile \
$(IRULESRC)/Imake.tmpl \
$(IRULESRC)/Imake.rules \
$(IRULESRC)/site.def \
$(IRULESRC)/$(MACROFILE)
-@if [ -f Makefile ]; then \
echo "$(RM) Makefile.bak; $(MV) Makefile Makefile.bak"; \
$(RM) Makefile.bak; $(MV) Makefile Makefile.bak; \
else exit 0; fi
$(IMAKE_CMD) -DTOPDIR=$(TOP)
$(IMAKE):
@echo "making $@"; \
cd $(IMAKESRC); $(MAKE) BOOTSTRAPCFLAGS=$(BOOTSTRAPCFLAGS)
tags::
$(TAGS) -w *.[ch]
$(TAGS) -xw *.[ch] > TAGS
install::
@echo "install done"
install.man::
@echo "install.man done"
Makefiles::
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads