OSDN Git Service

Move some generated files into the "generated" subdirectory.
authorRob Landley <rob@landley.net>
Thu, 10 Jan 2008 20:40:13 +0000 (14:40 -0600)
committerRob Landley <rob@landley.net>
Thu, 10 Jan 2008 20:40:13 +0000 (14:40 -0600)
Makefile
generated/README.txt [new file with mode: 0644]
toys.h
toys/help.c

index c70306b..7e91ded 100644 (file)
--- 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 (file)
index 0000000..e7b0325
--- /dev/null
@@ -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 5ccec7d..c54dbd6 100644 (file)
--- 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"
 
index 6dd7fb1..42d06a8 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #include "toys.h"
-#include "toys/help.h"
+#include "generated/help.h"
 
 #undef NEWTOY
 #undef OLDTOY