The variable $? in "make" is different from $? in "bash",
[freeradius.git] / src / modules / rlm_otp / Makefile.in
index 99608c1..ccdff3a 100644 (file)
@@ -16,7 +16,7 @@
 # ../main/Makefile for building the version of the server with
 # statically linked modules.  Get it from autoconf.
 #
-# RLM_INSTALL is the names of additional rules you need to install 
+# RLM_INSTALL is the names of additional rules you need to install
 # some particular portion of the module.  Usually, leave it blank.
 #
 #######################################################################
@@ -27,8 +27,7 @@ HEADERS        = otp.h otp_rad.h otp_pwe.h otp_cardops.h
 RLM_CFLAGS     = @otp_cflags@ $(OPENSSL_INCLUDE)
 CARDOPS_LTLIBS = $(patsubst %.c,%.lo,$(wildcard cardops/*.c))
 RLM_LIBS       = @otp_ldflags@ $(OPENSSL_LIBS) $(CARDOPS_LTLIBS)
-
-RLM_SUBDIRS = cardops
+RLM_SUBDIRS    = cardops
 
 ## this uses the RLM_CFLAGS and RLM_LIBS and SRCS defs to make TARGET.
 include ../rules.mak
@@ -36,15 +35,11 @@ include ../rules.mak
 # Not part of RLM_CFLAGS to avoid propagation to subdirs
 CFLAGS     += -Wno-unused-label -Wno-cast-qual
 
-$(STATIC_OBJS): $(HEADERS) $(CARDOPS_LTLIBS)
-
-$(DYNAMIC_OBJS): $(HEADERS) $(CARDOPS_LTLIBS)
+$(LT_OBJS): $(HEADERS) $(CARDOPS_LTLIBS)
 
 # Note: dynamic libs only
 $(CARDOPS_LTLIBS) common:
-       @what=$(WHAT_TO_MAKE); \
-       [ -z "$$what" ] && what=dynamic; \
        for dir in $(RLM_SUBDIRS); do \
-               echo "Making $$what in $$dir ..."; \
-               $(MAKE) $(MFLAGS) -C $$dir RLM_CFLAGS="$(RLM_CFLAGS)" $$what || exit $?; \
+               echo "Making $(WHAT_TO_MAKE) in $$dir ..."; \
+               $(MAKE) $(MFLAGS) -C $$dir RLM_CFLAGS="$(RLM_CFLAGS)" $(WHAT_TO_MAKE) || exit $$?; \
        done