aboutsummaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap')
-rw-r--r--bootstrap/main.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/bootstrap/main.c b/bootstrap/main.c
index 7f3844c..5e5e4e3 100644
--- a/bootstrap/main.c
+++ b/bootstrap/main.c
@@ -28,7 +28,6 @@ static const char *rootdir;
static FILE *f = NULL;
static const char *output_c_filename = NULL;
-static const char *output_h_filename = NULL;
const char *current_filename = NULL;
static char *last_alloced_filename = NULL;
unsigned current_line = 0;
@@ -53,9 +52,6 @@ NORETURN void error_len(const char *s, const char *arg, size_t arglen)
if (output_c_filename) {
remove(output_c_filename);
}
- if (output_h_filename) {
- remove(output_h_filename);
- }
exit(EXIT_FAILURE);
}
@@ -165,18 +161,18 @@ int main(int argc, char **argv)
enum {
IFACEDIR_ARG = 1,
SOURCE_DIR_ARG = 2,
- C_OUTPUT_ARG = 3,
- H_OUTPUT_ARG = 4
+ C_OUTPUT_ARG = 3
};
- if (argc <= 3 || argc >= 6) {
+ if (argc != 4) {
fprintf(stderr, "usage: "
- "stage1 <interface-dir> <source-dir> <output.c> [<output.h>]\n");
+ "stage1 <interface-dir> <source-dir> <output.c>\n");
return EXIT_FAILURE;
- } else if (argc >= 5) {
- is_library = true;
}
+ /* TODO set is_library if an interface file is present? */
+
+ /* TODO allow the interface files to be read directly from the modules? */
ifacedir = argv[IFACEDIR_ARG];
ifacedir_len = strlen(ifacedir);
@@ -195,11 +191,5 @@ int main(int argc, char **argv)
output_c_filename = argv[C_OUTPUT_ARG];
emit_c_code(output_c_filename);
-
- if (argc >= 5) {
- output_h_filename = argv[H_OUTPUT_ARG];
- /* TODO */
- /*emit_c_header(output_h_filename);*/
- }
return EXIT_SUCCESS;
}