From df07fb73be98dc1087346c184877666970a88f4a Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Wed, 10 Feb 2016 23:27:55 -0600 Subject: Wean scripts/install.c off toys.h so cross compiling less brittle. --- scripts/install.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'scripts') diff --git a/scripts/install.c b/scripts/install.c index a9a05500..3ffb867d 100644 --- a/scripts/install.c +++ b/scripts/install.c @@ -3,28 +3,26 @@ * Copyright 2006 Rob Landley */ -#include "toys.h" +#include +#include "generated/config.h" +#include "lib/toyflags.h" -#undef NEWTOY -#undef OLDTOY -#define NEWTOY(name, opts, flags) {#name, 0, 0, flags}, -#define OLDTOY(name, oldname, flags) {#name, 0, 0, flags}, +#define NEWTOY(name, opts, flags) {#name, flags}, +#define OLDTOY(name, oldname, flags) {#name, flags}, // Populate toy_list[]. -struct toy_list toy_list[] = { +struct {char *name; int flags;} toy_list[] = { #include "generated/newtoys.h" }; -#define TOY_LIST_LEN (sizeof(toy_list)/sizeof(struct toy_list)) - int main(int argc, char *argv[]) { static char *toy_paths[]={"usr/","bin/","sbin/",0}; int i, len = 0; // Output list of applets. - for (i=1; i1) { -- cgit v1.2.3