Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 Jun 2002 02:26:33 -0700
From:      Jos Backus <jos@catnook.com>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: Improving GNU make compatibility in BSD make (+ patch)
Message-ID:  <20020601092655.GC10523@lizzy.catnook.com>
In-Reply-To: <3CF887D7.27BBFAE5@mindspring.com>
References:  <20020531024250.GA90997@lizzy.catnook.com> <3CF73679.A5AB7886@mindspring.com> <20020531170746.GA93242@lizzy.catnook.com> <3CF7EDC5.CF27B997@mindspring.com> <20020601015343.GA1132@lizzy.catnook.com> <3CF8825A.E05C65AC@mindspring.com> <20020601082419.GA10523@lizzy.catnook.com> <3CF887D7.27BBFAE5@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, Jun 01, 2002 at 01:37:43AM -0700, Terry Lambert wrote:
> Jos Backus wrote:
> > I hope you don't see any problems with generally improving compatibility
> > between the two?
> 
> As long as any changes do not conflict with OpenBSD "make", NetBSD
> "make", BSDi "make", Darwin "make", or "OP make".

Well, you are saying that some BSD make out there uses $^ so that pretty much
rules out changing it.

> It's a lot easier to change gmake, I think...

It took me about the same amount of time to create both patches...

> I think "OP make" is most important:
> 
> 	http://openpackages.org/

You could buddy this patch for me :-)

Index: generate.c
===================================================================
RCS file: /cvs/op/tools/make/generate.c,v
retrieving revision 1.7
diff -u -r1.7 generate.c
--- generate.c	2001/07/03 14:23:10	1.7
+++ generate.c	2002/06/01 09:04:22
@@ -40,6 +40,7 @@
 	M(TARGET),
 	M(OODATE),
 	M(ALLSRC),
+	M(GALLSRC),
 	M(IMPSRC),
 	M(PREFIX),
 	M(ARCHIVE),
Index: var.c
===================================================================
RCS file: /cvs/op/tools/make/var.c,v
retrieving revision 1.13
diff -u -r1.13 var.c
--- var.c	2001/05/29 15:29:24	1.13
+++ var.c	2002/06/01 09:04:23
@@ -144,6 +144,7 @@
     MEMBER,
     OODATE,
     ALLSRC,
+    GALLSRC,
     IMPSRC,
     FTARGET,
     DTARGET,
@@ -277,6 +278,10 @@
 	break;
     case K_ALLSRC % MAGICSLOTS1:
 	if (name[0] == ALLSRC[0] && len == 1)
+	    return ALLSRC_INDEX;
+	break;
+    case K_GALLSRC % MAGICSLOTS1:
+	if (name[0] == GALLSRC[0] && len == 1)
 	    return ALLSRC_INDEX;
 	break;
     case K_IMPSRC % MAGICSLOTS1:
Index: var.h
===================================================================
RCS file: /cvs/op/tools/make/var.h,v
retrieving revision 1.1
diff -u -r1.1 var.h
--- var.h	2001/05/29 13:39:59	1.1
+++ var.h	2002/06/01 09:04:23
@@ -65,7 +65,8 @@
 #define MEMBER_INDEX	3
 #define OODATE_INDEX	4
 #define ALLSRC_INDEX	5
-#define IMPSRC_INDEX	6
+#define GALLSRC_INDEX	6
+#define IMPSRC_INDEX	7
 extern char *Varq_Value(int,  GNode *);
 extern void Varq_Set(int, const char *, GNode *);
 extern void Varq_Append(int, const char *, GNode *);
Index: var_int.h
===================================================================
RCS file: /cvs/op/tools/make/var_int.h,v
retrieving revision 1.1
diff -u -r1.1 var_int.h
--- var_int.h	2001/05/29 13:39:59	1.1
+++ var_int.h	2002/06/01 09:04:23
@@ -29,6 +29,7 @@
 #define TARGET		  "@"	/* Target of dependency */
 #define OODATE		  "?"	/* All out-of-date sources */
 #define ALLSRC		  ">"	/* All sources */
+#define GALLSRC		  "^"	/* All sources, GNU make style */
 #define IMPSRC		  "<"	/* Source implied by transformation */
 #define PREFIX		  "*"	/* Common prefix */
 #define ARCHIVE 	  "!"	/* Archive in "archive(member)" syntax */

-- 
Jos Backus                 _/  _/_/_/        Santa Clara, CA
                          _/  _/   _/
                         _/  _/_/_/             
                    _/  _/  _/    _/
jos@catnook.com     _/_/   _/_/_/            use Std::Disclaimer;

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020601092655.GC10523>