From owner-freebsd-ports Thu Aug 1 18:13:33 1996 Return-Path: owner-ports Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id SAA09523 for ports-outgoing; Thu, 1 Aug 1996 18:13:33 -0700 (PDT) Received: from time.cdrom.com (time.cdrom.com [204.216.27.226]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id SAA09515 for ; Thu, 1 Aug 1996 18:13:25 -0700 (PDT) Received: from time.cdrom.com (localhost [127.0.0.1]) by time.cdrom.com (8.7.5/8.6.9) with ESMTP id SAA10177; Thu, 1 Aug 1996 18:12:16 -0700 (PDT) To: Chuck Robey cc: "David E. O'Brien" , FreeBSD Ports Subject: Re: Sample Makefile In-reply-to: Your message of "Thu, 01 Aug 1996 18:48:49 EDT." Date: Thu, 01 Aug 1996 18:12:16 -0700 Message-ID: <10174.838948336@time.cdrom.com> From: "Jordan K. Hubbard" Sender: owner-ports@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > I didn't want to at first, it's 13K in size, but I guess I will. I've > pasted it to the end of this file. If you comment on it, please don't > repost the whole thing to the list, but I'd like any comments anyone might > have. Hmmm. That's pretty huge. Erm.. As that most worthy tome, "Science Made Stupid", states: "Warty things too big, start over." [Those unfamilar with SMS will simply have to run right out and buy a copy, now won't you?] I think this Makefile is a convincing argument that the human-readable template file approach is a bad idea. What you want instead is a template file that's *program* readable, and a program which uses libdialog or X or whatever your choice of GUI technology is to prompt the user for various things based on which fields it sees as "optional", "non-optional" and so on. There would have to be some very port-specific assumptions for certain fields, such as the *_DEPENDS values which would require that you turn lists like "libz xpm" into "Xpm\\.4\\.:${PORTSDIR}/graphics/xpm z\\.1\\.:${PORTSDIR}/devel/libz" by searching the INDEX. A little additional stickyness, but nothing insoluble. If you design the template file right, I could even see a cgi version of the Makefile generator program. :-) Jordan