aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2008-01-10 14:40:13 -0600
committerRob Landley <rob@landley.net>2008-01-10 14:40:13 -0600
commit58ecc3e589c2edc0ef4f33d4419b0b2e7ac6a83d (patch)
tree91ea841d12149b894afae50cee40ec96cc15b57b
parent6a9e5b4654e76585e38c6c6002eccba9b4b1b310 (diff)
downloadtoybox-58ecc3e589c2edc0ef4f33d4419b0b2e7ac6a83d.tar.gz
Move some generated files into the "generated" subdirectory.
-rw-r--r--Makefile18
-rw-r--r--generated/README.txt3
-rw-r--r--toys.h2
-rw-r--r--toys/help.c2
4 files changed, 14 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index c70306bb..7e91ded4 100644
--- a/Makefile
+++ b/Makefile
@@ -26,7 +26,7 @@ include kconfig/Makefile
# The long and roundabout sed is to make old versions of sed happy. New ones
# have '\n' so can replace one line with two without all the branches and
# mucking about with hold space.
-gen_config.h: .config
+generated/gen_config.h: .config
sed -n -e 's/^# CONFIG_\(.*\) is not set.*/\1/' \
-e 't notset' -e 'b tryisset' -e ':notset' \
-e 'h' -e 's/.*/#define CFG_& 0/p' \
@@ -46,19 +46,19 @@ bloatcheck: toybox_old toybox_unstripped
toyfiles = main.c lib/*.c \
$(shell scripts/cfg2files.sh < .config | sed 's@\(.*\)@toys/\1.c@')
-# The following still depends on toys/help.h even when it's not there, so *.h
-# isn't sufficient by itself.
+# The following still depends on generated/help.h even when it's not there, so
+# *.h isn't sufficient by itself.
-toybox_unstripped: gen_config.h $(toyfiles) toys/toylist.h toys/help.h toys/*.h lib/*.h toys.h
+toybox_unstripped: generated/gen_config.h generated/help.h $(toyfiles) toys/toylist.h toys/*.h lib/*.h toys.h
$(CC) $(CCFLAGS) -I . $(toyfiles) -o toybox_unstripped $(OPTIMIZE)
toybox: toybox_unstripped
$(STRIP) toybox_unstripped -o toybox
-toys/help.c: toys/help.h
+toys/help.c: generated/help.h
-toys/help.h: Config.in toys/Config.in scripts/config2help.py
- scripts/config2help.py Config.in > toys/help.h
+generated/help.h: Config.in toys/Config.in scripts/config2help.py
+ scripts/config2help.py Config.in > generated/help.h
instlist: toybox
$(HOSTCC) $(CCFLAGS) -I . scripts/install.c -o instlist
@@ -69,10 +69,10 @@ install_flat: instlist
@for i in `./instlist`; do ln -s toybox "$(PREFIX)/$$i"; done
clean::
- rm -f toybox toybox_unstripped gen_config.h instlist
+ rm -f toybox toybox_unstripped generated/gen_config.h instlist
distclean: clean
- rm -f toybox_old .config* toys/help.h
+ rm -f toybox_old .config* generated/help.h
test: tests
diff --git a/generated/README.txt b/generated/README.txt
new file mode 100644
index 00000000..e7b0325f
--- /dev/null
+++ b/generated/README.txt
@@ -0,0 +1,3 @@
+All the files in this directory except this README are generated by the
+build. Some of them may require python on the host system, and are thus
+shipped in the build tarball so python isn't a build requirement.
diff --git a/toys.h b/toys.h
index 5ccec7d3..c54dbd6f 100644
--- a/toys.h
+++ b/toys.h
@@ -6,7 +6,7 @@
* Licensed under GPL version 2, see file LICENSE in this tarball for details.
*/
-#include "gen_config.h"
+#include "generated/gen_config.h"
#include "lib/portability.h"
diff --git a/toys/help.c b/toys/help.c
index 6dd7fb1c..42d06a8c 100644
--- a/toys/help.c
+++ b/toys/help.c
@@ -6,7 +6,7 @@
*/
#include "toys.h"
-#include "toys/help.h"
+#include "generated/help.h"
#undef NEWTOY
#undef OLDTOY