fix firmwarehotplug prereq check on sdcc
[openwrt/svn-archive/archive.git] / utils / firmwarehotplug / Makefile
index 2ad31dc1c261ab82a8987a0f33549abb6d82c442..cff3be1c1415b37267ed4daec6ea6c2fc6ca82ad 100644 (file)
@@ -50,30 +50,16 @@ endef
 $(eval $(call BuildPackage,firmwarehotplug))
 
 define Require/working-sdcc
-        echo 'int main() { return 0; }' >$(TMP_DIR)/a.c; \
-        sdcc -o $(TMP_DIR)/a.out $(TMP_DIR)/a.c; \
-       rm -f $(TMP_DIR)/a.*
+       echo 'int main() { return 0; }' >$(TMP_DIR)/a.c; \
+       sdcc -o $(TMP_DIR)/a.out $(TMP_DIR)/a.c && { \
+               rm -f $(TMP_DIR)/a.* \
+       } || { \
+               rm -f $(TMP_DIR)/a.*; \
+               false \
+       }
+
 endef
 
 $(eval $(call Require,working-sdcc, \
         Please install the SDCC Cross Compiler (sdcc). \
 ))
-
-define Require/working-sgml2html
-       echo >$(TMP_DIR)/test.sgml ' \
-<!doctype linuxdoc system> \
-<article> \
-<!-- Title information --> \
-<title>test \
-<author>test \
-<htmlurl url="localhost"> \
-<date>test \
-<sect>test \
-</article>' ; \
-        sgml2html $(TMP_DIR)/test.sgml >$(TMP_DIR)/test.html; \
-       rm -f $(TMP_DIR)/test.*
-endef
-
-$(eval $(call Require,working-sgml2html, \
-        Please install the sgml-common package (sgml2html). \
-))