X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/5d739a43e714fc3ec49ff85034a7ecb2a8929958..f78cc362dea387011962941efbc69178e1afe8b5:/include/prereq-build.mk?ds=inline diff --git a/include/prereq-build.mk b/include/prereq-build.mk index fbe7d69f4..f0e1da981 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 - @@ -134,3 +148,11 @@ endef $(eval $(call Require,gnu-find, \ Please install GNU find \ )) + +define Require/getopt-extended + getopt --long - - >/dev/null +endef + +$(eval $(call Require,getopt-extended, \ + Please install an extended getopt version that supports --long \ +))