From 37a13feeb9d1708c972a7c6fd41bd7ae8343ea7f Mon Sep 17 00:00:00 2001 From: gdr Date: Sat, 1 Nov 1997 19:10:37 +0000 Subject: [PATCH] [Changes submitted by Derek Taubert.] binconst.mk, binrules.mk: The $(MAIN) macro is now the basename of the file containing the main() function, and therefore the only .root file that should exist is $(MAIN).root. If MAIN is not set in the lower level makefiles, it defaults to $(PROG). paths.mk: ORCA_DIST has changed from /orca-native to /lang/orca. --- binconst.mk | 6 +++++- binrules.mk | 8 ++++---- paths.mk | 5 ++--- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/binconst.mk b/binconst.mk index 7661661..662bd1b 100644 --- a/binconst.mk +++ b/binconst.mk @@ -2,7 +2,7 @@ # Compilation constants for utilities (directories ./bin, ./sbin, # ./usr.bin, ./usr.sbin). These are not used when building the libraries. # -# $Id: binconst.mk,v 1.2 1997/09/24 06:43:52 gdr Exp $ +# $Id: binconst.mk,v 1.3 1997/11/01 19:10:37 gdr Exp $ # # Devin Reade, 1997. # @@ -27,6 +27,10 @@ DESC_SRC = $(DESC_DIR)/describe.src SRCS = $(PROG).c .END +# If no main file was defined, use program name +.IF $(MAIN) == $(NULL) + MAIN = $(PROG) +.END # Define DESC if it's not already done. .IF $(DESC) == $(NULL) DESC = $(PROG).desc diff --git a/binrules.mk b/binrules.mk index b5000a4..b1ebcb8 100644 --- a/binrules.mk +++ b/binrules.mk @@ -2,7 +2,7 @@ # Standard compilation rules for utilities (directories ./bin, ./sbin, # ./usr.bin, ./usr.sbin). These are not used when building the libraries. # -# $Id: binrules.mk,v 1.2 1997/09/24 06:43:53 gdr Exp $ +# $Id: binrules.mk,v 1.3 1997/11/01 19:10:37 gdr Exp $ # # Devin Reade, Dave Tribby, 1997. # @@ -14,8 +14,8 @@ build: $(PROG) # Include standard occ options # -a0: use .o suffix for object file # -c: don't link after compiling -$(PROG).o: $(PROG).c - $(CC) $(CFLAGS:s/ -r / /) -a0 -c $(PROG).c +$(MAIN).o: $(MAIN).c + $(CC) $(CFLAGS:s/ -r / /) -a0 -c $(MAIN).c # Program depends upon all the objects. Add the version resource. $(PROG): $(OBJS) $(PROG).r @@ -27,7 +27,7 @@ $(PROG): $(OBJS) $(PROG).r # exec the line directly clean: -$(RM) -f $(OBJS) - -$(RM) -f $(PROG).root + -$(RM) -f $(MAIN).root -$(RM) -f $(PROG).r -$(RM) -f $(PROG).rej diff --git a/paths.mk b/paths.mk index a32f259..8ea962f 100644 --- a/paths.mk +++ b/paths.mk @@ -7,7 +7,7 @@ # # Devin Reade, 1997 # -# $Id: paths.mk,v 1.2 1997/09/21 21:52:19 gdr Exp $ +# $Id: paths.mk,v 1.3 1997/11/01 19:10:37 gdr Exp $ # # SRC_DIR is the top-level GNO source distribution directory (containing @@ -25,9 +25,8 @@ RELEASE_DIR = /dist # ORCA_DIST is the directory containing the standard Orca distribution. # It shouldn't contain any GNO-isms. -# I recommend using /orca-native and defining it in /etc/namespace. -ORCA_DIST = /orca-native +ORCA_DIST = /lang/orca # ORCA_SRC is the directory containing the sources to the ORCA libraries # This is (and should only be) used when building libc. We do this kludge