Subversion Repositories tendra.SVN

Rev

Rev 38 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 38 Rev 105
Line 134... Line 134...
134
 
134
 
135
 
135
 
136
	nm = (whole ? MAKEFILE_API : MAKEFILE);
136
	nm = (whole ? MAKEFILE_API : MAKEFILE);
137
	nm = string_printf(nm, output_src_dir, api, api2);
137
	nm = string_printf(nm, output_src_dir, api, api2);
138
	if (verbose > 1)
138
	if (verbose > 1)
139
		printf("Creating %s ...", nm);
139
		IGNORE printf("Creating %s ...", nm);
140
 
140
 
141
	create_dir(nm);
141
	create_dir(nm);
142
	output = fopen(nm, "w");
142
	output = fopen(nm, "w");
143
	if (output == null) {
143
	if (output == null) {
144
		error(ERR_SERIOUS, "Can't open output file, %s", nm);
144
		error(ERR_SERIOUS, "Can't open output file, %s", nm);
145
		return;
145
		return;
146
	}
146
	}
147
	for (pos = template; *pos != 0; pos++) {
147
	for (pos = template; *pos != 0; pos++) {
148
		if (*pos != '-') {
148
		if (*pos != '-') {
149
			fputc(*pos, output);
149
			IGNORE fputc(*pos, output);
150
			continue;
150
			continue;
151
		}
151
		}
152
		if (strncmp("-NAME-", pos, strlen("-NAME-")) == 0) {
152
		if (strncmp("-NAME-", pos, strlen("-NAME-")) == 0) {
153
			pos += strlen("-NAME-") - 1;
153
			pos += strlen("-NAME-") - 1;
154
			fputs(api, output);
154
			IGNORE fputs(api, output);
155
			continue;
155
			continue;
156
		}
156
		}
157
		if (strncmp("-OBJS-", pos, strlen("-OBJS-")) == 0) {
157
		if (strncmp("-OBJS-", pos, strlen("-OBJS-")) == 0) {
158
			pos += strlen("-OBJS-") - 1;
158
			pos += strlen("-OBJS-") - 1;
159
 
159
 
160
			for (e = f; e != null; e = e->next) {
160
			for (e = f; e != null; e = e->next) {
161
				info           *i = e->obj->u.u_info;
161
				info           *i = e->obj->u.u_info;
162
				if (need_info(i, api)) {
162
				if (need_info(i, api)) {
163
					int 		m;
163
					int 		m;
164
					strcpy(buffer, basename(i->src));
164
					IGNORE strcpy(buffer, basename(i->src));
165
					m = strlen(buffer) - 1;
165
					m = (int)strlen(buffer) - 1;
166
					buffer[m] = 'j';
166
					buffer[m] = 'j';
167
					fprintf(output, "\\\n\t%s", basename(buffer));
167
					IGNORE fprintf(output, "\\\n\t%s", basename(buffer));
168
				}
168
				}
169
			}
169
			}
170
			continue;
170
			continue;
171
		}
171
		}
172
		fputc(*pos, output);
172
		IGNORE fputc(*pos, output);
173
 
173
 
174
	}
174
	}
175
	fclose (output);
175
	IGNORE fclose (output);
176
}
176
}
177
 
177
 
178
 
178