[PATCH] Fix : Support for Solaris default shell restriction

Masashi Honma honma
Sat Oct 24 20:38:04 PDT 2009


Hello.

This is a patch for three Makefile changes.

1.Some shells (like Solaris default /bin/sh) doesn't allow blank
$(SUBDIRS) in the statement below.

for d in $(SUBDIRS); do make -C $$d clean; done

So use

ifneq ($(SUBDIRS),)
for d in $(SUBDIRS); do make -C $$d clean; done
endif

2.Some shells (like Solaris default /bin/sh) doesn't allow -e
option for file existence check. Use -f instead.

3.Use "${MAKE}" instead of "make" in the statement below.
(Currently this is not a problem. Just for future use.)

for d in $(SUBDIRS); do make -C $$d clean; done


diff --git a/hostapd/Makefile b/hostapd/Makefile
index 169177e..b22a257 100644
--- a/hostapd/Makefile
+++ b/hostapd/Makefile
@@ -689,7 +689,7 @@ install: all
for i in $(ALL); do cp $$i /usr/local/bin/$$i; done

../src/drivers/build.hostapd:
- @if [ -e ../src/drivers/build.wpa_supplicant ]; then \
+ @if [ -f ../src/drivers/build.wpa_supplicant ]; then \
$(MAKE) -C ../src/drivers clean; \
fi
@touch ../src/drivers/build.hostapd
diff --git a/src/common/Makefile b/src/common/Makefile
index cffba62..d914bc6 100644
--- a/src/common/Makefile
+++ b/src/common/Makefile
@@ -2,7 +2,9 @@ all:
@echo Nothing to be made.

clean:
- for d in $(SUBDIRS); do make -C $$d clean; done
+ifneq ($(SUBDIRS),)
+ for d in $(SUBDIRS); do ${MAKE} -C $$d clean; done
+endif
rm -f *~ *.o *.d

install:
diff --git a/src/crypto/Makefile b/src/crypto/Makefile
index cffba62..d914bc6 100644
--- a/src/crypto/Makefile
+++ b/src/crypto/Makefile
@@ -2,7 +2,9 @@ all:
@echo Nothing to be made.

clean:
- for d in $(SUBDIRS); do make -C $$d clean; done
+ifneq ($(SUBDIRS),)
+ for d in $(SUBDIRS); do ${MAKE} -C $$d clean; done
+endif
rm -f *~ *.o *.d

install:
diff --git a/src/drivers/Makefile b/src/drivers/Makefile
index 8da6994..2bb45c5 100644
--- a/src/drivers/Makefile
+++ b/src/drivers/Makefile
@@ -2,7 +2,9 @@ all:
@echo Nothing to be made.

clean:
- for d in $(SUBDIRS); do make -C $$d clean; done
+ifneq ($(SUBDIRS),)
+ for d in $(SUBDIRS); do ${MAKE} -C $$d clean; done
+endif
rm -f *~ *.o *.d
rm -f build.wpa_supplicant build.hostapd

diff --git a/src/eap_common/Makefile b/src/eap_common/Makefile
index cffba62..d914bc6 100644
--- a/src/eap_common/Makefile
+++ b/src/eap_common/Makefile
@@ -2,7 +2,9 @@ all:
@echo Nothing to be made.

clean:
- for d in $(SUBDIRS); do make -C $$d clean; done
+ifneq ($(SUBDIRS),)
+ for d in $(SUBDIRS); do ${MAKE} -C $$d clean; done
+endif
rm -f *~ *.o *.d

install:
diff --git a/src/eap_peer/Makefile b/src/eap_peer/Makefile
index d9449a2..83fb819 100644
--- a/src/eap_peer/Makefile
+++ b/src/eap_peer/Makefile
@@ -2,7 +2,9 @@ all:
@echo Nothing to be made.

clean:
- for d in $(SUBDIRS); do make -C $$d clean; done
+ifneq ($(SUBDIRS),)
+ for d in $(SUBDIRS); do ${MAKE} -C $$d clean; done
+endif
rm -f *~ *.o *.so *.d

install:
diff --git a/src/eap_server/Makefile b/src/eap_server/Makefile
index cffba62..d914bc6 100644
--- a/src/eap_server/Makefile
+++ b/src/eap_server/Makefile
@@ -2,7 +2,9 @@ all:
@echo Nothing to be made.

clean:
- for d in $(SUBDIRS); do make -C $$d clean; done
+ifneq ($(SUBDIRS),)
+ for d in $(SUBDIRS); do ${MAKE} -C $$d clean; done
+endif
rm -f *~ *.o *.d

install:
diff --git a/src/eapol_supp/Makefile b/src/eapol_supp/Makefile
index cffba62..d914bc6 100644
--- a/src/eapol_supp/Makefile
+++ b/src/eapol_supp/Makefile
@@ -2,7 +2,9 @@ all:
@echo Nothing to be made.

clean:
- for d in $(SUBDIRS); do make -C $$d clean; done
+ifneq ($(SUBDIRS),)
+ for d in $(SUBDIRS); do ${MAKE} -C $$d clean; done
+endif
rm -f *~ *.o *.d

install:
diff --git a/src/hlr_auc_gw/Makefile b/src/hlr_auc_gw/Makefile
index cffba62..d914bc6 100644
--- a/src/hlr_auc_gw/Makefile
+++ b/src/hlr_auc_gw/Makefile
@@ -2,7 +2,9 @@ all:
@echo Nothing to be made.

clean:
- for d in $(SUBDIRS); do make -C $$d clean; done
+ifneq ($(SUBDIRS),)
+ for d in $(SUBDIRS); do ${MAKE} -C $$d clean; done
+endif
rm -f *~ *.o *.d

install:
diff --git a/src/l2_packet/Makefile b/src/l2_packet/Makefile
index cffba62..d914bc6 100644
--- a/src/l2_packet/Makefile
+++ b/src/l2_packet/Makefile
@@ -2,7 +2,9 @@ all:
@echo Nothing to be made.

clean:
- for d in $(SUBDIRS); do make -C $$d clean; done
+ifneq ($(SUBDIRS),)
+ for d in $(SUBDIRS); do ${MAKE} -C $$d clean; done
+endif
rm -f *~ *.o *.d

install:
diff --git a/src/radius/Makefile b/src/radius/Makefile
index cffba62..d914bc6 100644
--- a/src/radius/Makefile
+++ b/src/radius/Makefile
@@ -2,7 +2,9 @@ all:
@echo Nothing to be made.

clean:
- for d in $(SUBDIRS); do make -C $$d clean; done
+ifneq ($(SUBDIRS),)
+ for d in $(SUBDIRS); do ${MAKE} -C $$d clean; done
+endif
rm -f *~ *.o *.d

install:
diff --git a/src/rsn_supp/Makefile b/src/rsn_supp/Makefile
index cffba62..d914bc6 100644
--- a/src/rsn_supp/Makefile
+++ b/src/rsn_supp/Makefile
@@ -2,7 +2,9 @@ all:
@echo Nothing to be made.

clean:
- for d in $(SUBDIRS); do make -C $$d clean; done
+ifneq ($(SUBDIRS),)
+ for d in $(SUBDIRS); do ${MAKE} -C $$d clean; done
+endif
rm -f *~ *.o *.d

install:
diff --git a/src/tls/Makefile b/src/tls/Makefile
index cffba62..d914bc6 100644
--- a/src/tls/Makefile
+++ b/src/tls/Makefile
@@ -2,7 +2,9 @@ all:
@echo Nothing to be made.

clean:
- for d in $(SUBDIRS); do make -C $$d clean; done
+ifneq ($(SUBDIRS),)
+ for d in $(SUBDIRS); do ${MAKE} -C $$d clean; done
+endif
rm -f *~ *.o *.d

install:
diff --git a/src/utils/Makefile b/src/utils/Makefile
index cffba62..d914bc6 100644
--- a/src/utils/Makefile
+++ b/src/utils/Makefile
@@ -2,7 +2,9 @@ all:
@echo Nothing to be made.

clean:
- for d in $(SUBDIRS); do make -C $$d clean; done
+ifneq ($(SUBDIRS),)
+ for d in $(SUBDIRS); do ${MAKE} -C $$d clean; done
+endif
rm -f *~ *.o *.d

install:
diff --git a/src/wps/Makefile b/src/wps/Makefile
index cffba62..d914bc6 100644
--- a/src/wps/Makefile
+++ b/src/wps/Makefile
@@ -2,7 +2,9 @@ all:
@echo Nothing to be made.

clean:
- for d in $(SUBDIRS); do make -C $$d clean; done
+ifneq ($(SUBDIRS),)
+ for d in $(SUBDIRS); do ${MAKE} -C $$d clean; done
+endif
rm -f *~ *.o *.d

install:
diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
index 6e15f24..8e6f50c 100644
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -1191,7 +1191,7 @@ endif
dynamic_eap_methods: $(EAPDYN)

../src/drivers/build.wpa_supplicant:
- @if [ -e ../src/drivers/build.hostapd ]; then \
+ @if [ -f ../src/drivers/build.hostapd ]; then \
$(MAKE) -C ../src/drivers clean; \
fi
@touch ../src/drivers/build.wpa_supplicant


Regards,
Masashi Honma.



__________  ESET NOD32 Antivirus ?????, ?????????????????? 4539 (20091024) __________

???????? ESET NOD32 Antivirus ???????????

http://canon-its.jp





More information about the Hostap mailing list