Fix dependencies so that we can build code.o first.

on i386, build code.o with -O0 to work around a gcc bug.
This commit is contained in:
espie 2000-04-10 00:40:28 +00:00
parent 86ec251992
commit b9d316ef1d
2 changed files with 20 additions and 7 deletions

View File

@ -1,5 +1,5 @@
# Ports collection makefile for "hoc", the High Order Calculator
# $OpenBSD: Makefile,v 1.11 2000/04/08 22:18:00 espie Exp $
# $OpenBSD: Makefile,v 1.12 2000/04/10 00:40:28 espie Exp $
DISTNAME= hoc
PKGNAME= hoc-1.1
@ -24,6 +24,13 @@ FAKE= Yes
ALL_TARGET= hoc
MAKE_FILE= makefile
# Bug-fix for gcc 2.95.2
.if ${MACHINE_ARCH} == "i386"
pre-build:
cd ${WRKSRC} && make code.o CFLAGS=-O0
.endif
WRKDIST= ${WRKDIR}
do-install:

View File

@ -1,5 +1,5 @@
--- makefile.orig Wed Oct 27 15:58:26 1999
+++ makefile Wed Oct 27 16:01:24 1999
--- makefile.orig Mon Apr 10 02:37:28 2000
+++ makefile Mon Apr 10 02:39:09 2000
@@ -1,11 +1,11 @@
YFLAGS = -d
-CFLAGS = -g
@ -14,14 +14,20 @@
hoc.o code.o init.o symbol.o: hoc.h
@@ -13,10 +13,6 @@
@@ -14,13 +14,12 @@ code.o init.o symbol.o: x.tab.h
x.tab.h: y.tab.h
-cmp -s x.tab.h y.tab.h || cp y.tab.h x.tab.h
-
-pr: $(SRC)
- @prcan $?
- @touch pr
-
install: hoc
cp hoc /usr/bin
strip /usr/bin/hoc
+
+y.tab.h y.tab.c: hoc.y
+ yacc ${YFLAGS} hoc.y
clean:
rm -f $(OBJS) [xy].tab.[ch] hoc