X-Git-Url: http://git.ozo.com/?p=openwrt-10.03%2F.git;a=blobdiff_plain;f=include%2Fprereq-build.mk;h=84d3f2274c6b3c8f58cc291018881e4d7f84320c;hp=d6d2d73a63c39549936e19f5e2e4c2920f2fbd55;hb=e30e495bb1cd6df96e6b246a89c8eade514031c7;hpb=bc86dba383e35617ce0f4bf925e711415711a35e diff --git a/include/prereq-build.mk b/include/prereq-build.mk index d6d2d73a6..84d3f2274 100644 --- a/include/prereq-build.mk +++ b/include/prereq-build.mk @@ -37,6 +37,20 @@ $(eval $(call Require,case-sensitive-fs, \ OpenWrt can only be built on a case-sensitive filesystem \ )) +define Require/getopt + getopt --help 2>&1 | grep long >/dev/null +endef +$(eval $(call Require,getopt, \ + Please install GNU getopt \ +)) + +define Require/fileutils + gcp --help || cp --help +endef +$(eval $(call Require,fileutils, \ + Please install GNU fileutils \ +)) + define Require/working-gcc echo 'int main(int argc, char **argv) { return 0; }' | \ gcc -x c -o $(TMP_DIR)/a.out - @@ -48,7 +62,7 @@ $(eval $(call Require,working-gcc, \ define Require/working-g++ echo 'int main(int argc, char **argv) { return 0; }' | \ - g++ -x c++ -o $(TMP_DIR)/a.out -lstdc++ - && \ + g++ -x c++ -o $(TMP_DIR)/a.out - -lstdc++ && \ $(TMP_DIR)/a.out endef @@ -58,7 +72,7 @@ $(eval $(call Require,working-g++, \ define Require/ncurses echo 'int main(int argc, char **argv) { initscr(); return 0; }' | \ - gcc -include ncurses.h -x c -o $(TMP_DIR)/a.out -lncurses - + gcc -include ncurses.h -x c -o $(TMP_DIR)/a.out - -lncurses endef $(eval $(call Require,ncurses, \ @@ -68,7 +82,7 @@ $(eval $(call Require,ncurses, \ define Require/zlib echo 'int main(int argc, char **argv) { gzdopen(0, "rb"); return 0; }' | \ - gcc -include zlib.h -x c -o $(TMP_DIR)/a.out -lz - + gcc -include zlib.h -x c -o $(TMP_DIR)/a.out - -lz endef $(eval $(call Require,zlib, \ @@ -79,10 +93,6 @@ $(eval $(call RequireCommand,gawk, \ Please install GNU awk. \ )) -$(eval $(call RequireCommand,bison, \ - Please install GNU bison. \ -)) - $(eval $(call RequireCommand,flex, \ Please install flex. \ )) @@ -123,12 +133,8 @@ $(eval $(call RequireCommand,svn, \ Please install the subversion client. \ )) -$(eval $(call RequireCommand,autoconf, \ - Please install GNU autoconf. \ -)) - define Require/gnu-find - $(FIND) $(TMP_DIR) -lname foo + $(FIND) --version 2>/dev/null endef $(eval $(call Require,gnu-find, \