* config/instsh.cf
* config/dirsh.cf
* config/globsh.cf
! Added double quotes to all 'if [ -? * ]' expressions:
'if [ -? "*" ]'. This fixes clean rule in Solaris builds
'[ -z $(EXE_FILE) ]' when $(EXE_FILE) was empty.
(Thanks for Tamas Tevesz for report and fix suggestion)
Please speak up if there is any reason why double quotes
weren't used in bash commands embedded in .cf files while
they are consistently used in all .sh files.
60 lines
855 B
CFEngine3
60 lines
855 B
CFEngine3
#
|
|
# $Id$
|
|
#
|
|
|
|
ifneq ($(HB_SHELL),sh)
|
|
|
|
MK_OS = $(subst /,\,$(MK))
|
|
DIRS_OS = $(subst /,\,$(DIRS))
|
|
|
|
endif
|
|
|
|
ifeq ($(DIRS),) # Empty directory list
|
|
|
|
DIR_RULE =\
|
|
@echo Done
|
|
|
|
else
|
|
|
|
ifeq ($(HB_SHELL),sh)
|
|
|
|
DIR_RULE =\
|
|
@for d in $(DIRS); do \
|
|
if [ -d "$$d" ]; then \
|
|
$(MAKE) -C $$d $@; \
|
|
fi \
|
|
done
|
|
|
|
endif
|
|
|
|
ifeq ($(HB_SHELL),nt)
|
|
|
|
DIR_RULE =\
|
|
$(CMDPREF)for %d in ($(DIRS_OS)) do $(MK_OS) -C %d $@
|
|
|
|
endif
|
|
|
|
ifeq ($(HB_SHELL),os2)
|
|
|
|
DIR_RULE =\
|
|
$(CMDPREF)for %d in ($(DIRS_OS)) do $(MK_OS) -C %d $@
|
|
|
|
endif
|
|
|
|
ifeq ($(HB_SHELL),dos)
|
|
|
|
# We have to use script to overcome the DOS limit of max 128 characters
|
|
# NOTE: The empty line directly before 'endef' HAVE TO exist!
|
|
# It causes that every commands will be separated by LF
|
|
define dir_mk
|
|
$(MK_OS) -C $(file) $@
|
|
|
|
endef
|
|
|
|
DIR_RULE =\
|
|
$(foreach file, $(DIRS_OS), $(dir_mk))
|
|
|
|
endif
|
|
|
|
endif # ! Empty directory list
|