head	1.4;
access;
symbols
	RELEASE_4_10_0:1.3
	RELEASE_5_2_1:1.2
	RELEASE_5_2_0:1.2
	RELEASE_4_9_0:1.2;
locks; strict;
comment	@# @;


1.4
date	2004.09.02.12.22.30;	author stefanf;	state dead;
branches;
next	1.3;

1.3
date	2004.01.29.17.21.51;	author arved;	state Exp;
branches;
next	1.2;

1.2
date	2003.09.08.21.04.36;	author glewis;	state Exp;
branches;
next	1.1;

1.1
date	2003.06.03.08.16.58;	author arved;	state Exp;
branches;
next	;


desc
@@


1.4
log
@Update TenDRA to 4.20040902.  Major changes are support for the Alpha
architecture and that perl is no longer required.

Approved by:	arved
@
text
@--- mk/base/tendra.install.mk.orig	Wed Aug 27 09:00:00 2003
+++ mk/base/tendra.install.mk	Thu Aug 28 21:14:55 2003
@@@@ -24,10 +24,6 @@@@
 
 .if defined(API)
 INSTALL_TARGETS+=	install-api
-INSTALL_SUB+=		lib/include/${API}.api lib/include/shared/${API}.api
-.if defined(API_SUBDIR)
-INSTALL_SUB+=		${API_SUBDIR:C/^/lib\/include\/${API}.api\//}
-.endif
 .endif
 
 .if defined(INSTALL_ENV)
@@@@ -102,27 +98,9 @@@@
 
 # lib/apis: our api files.
 install-api:
-.for i in ${API}.api shared/${API}.api
-	cd ${OBJ_PREFIX}/lib/apis/${i}; \
-	for i in *.h; do \
-		${BIN_CP} ${OBJ_PREFIX}/lib/apis/${i}/$$i \
-			${INSTALL_PREFIX}/lib/include/${i}/$$i; \
-		${BIN_CHMOD} ${ARGS_CHMOD_DATA} \
-			${INSTALL_PREFIX}/lib/include/${i}/$$i; \
-	done
-.endfor
-.if defined (API_SUBDIR)
-.for i in ${API_SUBDIR}
-	cd ${.OBJDIR}.api/${i}; \
-	for i in *.h; do \
-		${BIN_CP} ${.OBJDIR}.api/${i}/$$i \
-			${INSTALL_PREFIX}/lib/include/${API}.api/${i}/$$i; \
-		${BIN_CHMOD} ${ARGS_CHMOD_DATA} \
-			${INSTALL_PREFIX}/lib/include/${API}.api/${i}/$$i; \
-	done
-.endfor
-.endif
-
+	env MAKEOBJDIR=${OBJ_DIR}.api MKDIR="${BIN_MKDIR} ${ARGS_MKDIR}" \
+		CP=${BIN_CP} CHMOD="${BIN_CHMOD} ${ARGS_CHMOD_DATA}" \
+		INSTALL_PREFIX=${INSTALL_PREFIX} make install
 
 # lib/apis/lib lib/apis/lib/diag: our tl files.
 install-tl:
--- src/tools/tspec/makefile.c.orig	Mon Aug 25 09:01:13 2003
+++ src/tools/tspec/makefile.c	Thu Aug 28 21:18:27 2003
@@@@ -71,10 +71,10 @@@@
  */
 
 static boolean
-need_info(info *i, char *api)
+need_info(info *i, char *api, boolean lax)
 {
     if (restrict_depth && !streq (api, i->api)) return (0);
-    return (i->implemented && i->tokens && i->src);
+    return (i->implemented && (lax || (i->tokens && i->src)));
 }
 
 
@@@@ -95,6 +95,8 @@@@
     char *api2 = hack_name (api, "_Aa0");
     int li = output_incl_len;
     int ls = output_src_len;
+    hash_table *subdirs = make_hash_table("Subdirs");
+    int i;
 	
     /* Open output file */
     nm = (whole ? MAKEFILE_API : MAKEFILE);
@@@@ -135,11 +137,47 @@@@
     }
     IGNORE fputs ("SHELL=/bin/sh\n\n", output);
 	
+	/* Print all headers we want to install */
+	IGNORE fprintf (output, "HEADERS=");
+	for (e = f ; e != null ; e = e->next) {
+		info *i = e->obj->u.u_info;
+		char *p;
+		object *o;
+
+		if (!need_info(i, api, 1))
+			continue;
+
+		if (i->file == NULL || strstr(i->file, "dummy") != NULL ||
+			i->api == NULL  || strstr(i->api, "dummy") != NULL)
+			continue;
+
+		IGNORE fprintf (output, "\\\n %s", i->incl + ls);
+
+		buffer[0] = '\0';
+		IGNORE strncat(buffer, i->incl + ls, buffsize);
+		if ((p = strrchr(buffer, '/')) != NULL) {
+			*p = '\0';
+			/* Add the directory if it isn't in the subdirs hash table yet */
+			if (search_hash(subdirs, buffer, 0) == NULL) {
+				p = xalloc(strlen(buffer) + 1);
+				IGNORE strcpy(p, buffer);
+				o = make_object(p, TYPE_VOID);
+				IGNORE add_hash(subdirs, o, 0);
+			}
+		}
+	}
+
+	/* Print the list of subdirectories we have to create */
+	IGNORE fputs ("\n\nDIRS=", output);
+	for (i = 0; i < sizeof (subdirs->array) / sizeof (*subdirs->array); i++)
+		for (e = subdirs->array[i]; e != null; e = e->next)
+			IGNORE fprintf (output, "\\\n %s", e->obj->name);
+
     /* Print the list of files */
-    IGNORE fputs ("JFILES=", output);
+    IGNORE fputs ("\n\nJFILES=", output);
     for (e = f ; e != null ; e = e->next) {
 		info *i = e->obj->u.u_info;
-		if (need_info (i, api)) {
+		if (need_info (i, api, 0)) {
 			int m;
 			char *a = i->api;
 			if (strneq (a, "shared/", 7)) a += 7;
@@@@ -159,7 +197,7 @@@@
     /* Print the construction for each file */
     for (e = f ; e != null ; e = e->next) {
 		info *i = e->obj->u.u_info;
-		if (need_info (i, api)) {
+		if (need_info (i, api, 0)) {
 			int m;
 			char *a = i->api;
 			if (strneq (a, "shared/", 7)) a += 7;
@@@@ -192,7 +230,17 @@@@
 	
     /* End of makefile */
     IGNORE fputs ("clean :\n\trm -f ${JFILES}\n\n", output);
-    IGNORE fputs ("clobber : clean\n\trm -f ${LIB}\n", output);
+    IGNORE fputs ("clobber : clean\n\trm -f ${LIB}\n\n", output);
+
+    IGNORE fprintf (output, "install : \n"
+					".for i in ${DIRS}\n"
+					"\t${MKDIR} ${INSTALL_PREFIX}/lib/include/${i}\n"
+					".endfor\n"
+					".for i in ${HEADERS}\n"
+					"\t${CP} ../${i} ${INSTALL_PREFIX}/lib/include/${i:H}\n"
+					"\t${CP} ../${i} ${INSTALL_PREFIX}/lib/include/${i:H}\n"
+					".endfor\n");
+
     IGNORE fclose (output);
     return;
 }
@


1.3
log
@Update to 20040128 ten15 snapshot

PR:		62038
Submitted by:	Stefan Farfeleder <stefan@@fafoe.narf.at>
@
text
@@


1.2
log
@. Update to 4-20030825.

PR:		56430
Submitted by:	Stefan Farfeleder <stefan@@fafoe.narf.at> (maintainer)
@
text
@d1 3
a3 8
Index: mk/base/tendra.install.mk
===================================================================
RCS file: /usr/home/stefan/tendra/cvsup/tendra/mk/base/tendra.install.mk,v
retrieving revision 1.19
diff -u -r1.19 tendra.install.mk
--- mk/base/tendra.install.mk	18 Aug 2003 04:35:26 -0000	1.19
+++ mk/base/tendra.install.mk	19 Aug 2003 14:23:00 -0000
@@@@ -21,7 +21,6 @@@@
d8 3
d14 1
a14 1
@@@@ -70,14 +69,9 @@@@
d18 7
a24 2
-	for i in ${.OBJDIR}.api/*.h; do \
-		${BIN_INSTALL} $$i ${INSTALL_PREFIX}/lib/include/${API}.api; \
d26 9
a34 2
-	for i in ${.OBJDIR:C/apis/apis\/shared/}.api/*.h; do \
-		${BIN_INSTALL} $$i ${INSTALL_PREFIX}/lib/include/shared/${API}.api; \
d36 5
a40 4
-	${BIN_INSTALL} ${.OBJDIR:C/apis/apis\/lib/}/${API}.tl \
-		${INSTALL_PREFIX}/lib
+	env MAKEOBJDIR=${OBJ_DIR}.api INSTALL=${BIN_INSTALL} \
+		MKDIR=${BIN_MKDIR} ARGS_MKDIR=${ARGS_MKDIR} \
d43 4
a46 9
 # lib/env: our environment files.
 install-env:
Index: src/tools/tspec/makefile.c
===================================================================
RCS file: /usr/home/stefan/tendra/cvsup/tendra/src/tools/tspec/makefile.c,v
retrieving revision 1.3
diff -u -r1.3 makefile.c
--- src/tools/tspec/makefile.c	12 Dec 2002 05:54:55 -0000	1.3
+++ src/tools/tspec/makefile.c	10 Jun 2003 12:36:12 -0000
d128 1
a128 1
@@@@ -192,7 +230,19 @@@@
d137 1
a137 1
+					"\t${MKDIR} ${ARGS_MKDIR} ${INSTALL_PREFIX}/lib/include/${i}\n"
d140 3
a142 5
+					"\t${INSTALL} ../${i} ${INSTALL_PREFIX}/lib/include/"
+					"${i:H}\n"
+					".endfor\n"
+					"\t${INSTALL} ../lib/%s/%s.tl ${INSTALL_PREFIX}/lib\n",
+					api, api);
@


1.1
log
@- Update to CVS snapshot 20030526, which fixes the build problems on 5.x
- Give maintainership to submitter

"Unfortunately FreeBSD 5.x uses the GNU C extension
__attribute__((__aligned__(x))) in a couple of system headers
(<machine/npx.h>, <machine/signal.h> and <machine/ucontext.h> for i386).  To
avoid a syntax error __aligned(x) is removed by a #define, but programs that
use struct sigcontext, struct savexmm or mcontext_t probably won't work."

PR:		52619
Submitted by:	Stefan Farfeleder <stefan@@fafoe.dyndns.org>
@
text
@d1 142
a142 12
--- mk/base/tendra.install.mk.orig	Mon Mar 31 10:00:01 2003
+++ mk/base/tendra.install.mk	Mon May 12 21:20:53 2003
@@@@ -60,6 +60,9 @@@@
 	for i in ${.OBJDIR}.api/*.h; do \
 		${INSTALL} $$i ${INSTALL_PREFIX}/lib/include/${API}.api; \
 	done
+	for i in `${FIND} ${.OBJDIR}.api/ -type d -mindepth 1` ; do \
+		${CP} -pR $$i ${INSTALL_PREFIX}/lib/include/${API}.api; \
+	done
 	for i in ${.OBJDIR:C/apis/apis\/shared/}.api/*.h; do \
 		${INSTALL} $$i ${INSTALL_PREFIX}/lib/include/shared/${API}.api; \
 	done
@

