correct cygwin detection (issue #5328)

handle parallel make better (issue #5328)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2005-10-05 00:17:57 +00:00
parent aeaf9f4cc6
commit 0bffff1930
5 changed files with 14 additions and 11 deletions

View File

@@ -160,6 +160,8 @@ ringtone.h: gentone
chan_oss.o: chan_oss.c busy.h ringtone.h chan_oss.o: chan_oss.c busy.h ringtone.h
chan_alsa.o: chan_alsa.c busy.h ringtone.h
ifeq (${OSARCH},OpenBSD) ifeq (${OSARCH},OpenBSD)
chan_oss.so: chan_oss.o chan_oss.so: chan_oss.o
$(CC) $(SOLINK) -o $@ chan_oss.o -lossaudio $(CC) $(SOLINK) -o $@ chan_oss.o -lossaudio

View File

@@ -3,9 +3,8 @@
# #
OSTYPE=$(shell uname -s) OSTYPE=$(shell uname -s)
cygx="$(shell uname -s | sed -e c\cygwin | tr [:upper:] [:lower:])"
define cyg_subst_sys define cyg_subst_sys
if [ $(cygx) = "cygwin" ]; then \ if uname -s | grep -qi cygwin; then \
cat $@ | sed -e s/"sys\.h"/"config.h"/g > $@.copy; \ cat $@ | sed -e s/"sys\.h"/"config.h"/g > $@.copy; \
mv --force $@.copy $@; \ mv --force $@.copy $@; \
fi fi
@@ -230,3 +229,5 @@ editline.c : $(ACSRCS) $(BCSRCS) $(AGCSRCS)
.c.o_s : $(AGHDRS) $(BGHDRS) .c.o_s : $(AGHDRS) $(BGHDRS)
$(CC) -c $(S_CFLAGS) $(CFLAGS) $(CPPFLAGS) $< -o $@ $(CC) -c $(S_CFLAGS) $(CFLAGS) $(CPPFLAGS) $< -o $@
$(CCSRCS) : $(BGHDRS)

3
editline/configure vendored
View File

@@ -895,8 +895,7 @@ case "${host}" in
ABI="elf" ABI="elf"
;; ;;
*-*-linux* | *cygwin*) *-*-linux* | *cygwin*)
cyg="$(echo ${host} | sed -e c\cygwin)" if echo ${host} | grep -q cygwin ; then \
if [ ${cyg} = cygwin ]; then \
echo "cygwin detected"; \ echo "cygwin detected"; \
S_CFLAGS=""; \ S_CFLAGS=""; \
echo "/* cygdef.h. Generated automatically by configure. */ echo "/* cygdef.h. Generated automatically by configure. */

View File

@@ -32,8 +32,7 @@ case "${host}" in
ABI="elf" ABI="elf"
;; ;;
*-*-linux* | *cygwin*) *-*-linux* | *cygwin*)
cyg="$(echo ${host} | sed -e c\cygwin)" if echo ${host} | grep -q cygwin ; then \
if [ ${cyg} = cygwin ]; then \
echo "cygwin detected"; \ echo "cygwin detected"; \
S_CFLAGS=""; \ S_CFLAGS=""; \
echo "/* cygdef.h. Generated automatically by configure. */ echo "/* cygdef.h. Generated automatically by configure. */

View File

@@ -29,12 +29,12 @@ STANDALONE_FUNCS=$(filter-out $(BUILTINS),$(patsubst %.c,%.o,$(wildcard func*.c)
FUNCS+=$(STANDALONE_FUNCS:.o=.so) FUNCS+=$(STANDALONE_FUNCS:.o=.so)
FUNC_STRUCTS=$(shell grep 'struct ast_custom_function' $(BUILTINS:.o=.c) | awk '{print $$3};') FUNC_SOURCES=$(BUILTINS:.o=.c)
FUNC_STRUCTS=$(shell grep 'struct ast_custom_function' $(FUNC_SOURCES) | awk '{print $$3};')
CFLAGS+=-fPIC CFLAGS+=-fPIC
FUNC_SOURCES=$(BUILTINS:.o=.c)
ifeq ($(findstring BSD,${OSARCH}),BSD) ifeq ($(findstring BSD,${OSARCH}),BSD)
CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib CFLAGS+=-I$(CROSS_COMPILE_TARGET)/usr/local/include -L$(CROSS_COMPILE_TARGET)/usr/local/lib
endif endif
@@ -49,13 +49,15 @@ clean:
#$(BUILTINS) : CFLAGS += -DBUILTIN_FUNC #$(BUILTINS) : CFLAGS += -DBUILTIN_FUNC
pbx_functions.h: $(BUILTINS:.o=.c) pbx_functions.h: $(FUNC_SOURCES)
@echo "/* Automatically generated - do not edit */" > $@ @echo "/* Automatically generated - do not edit */" > $@
@for f in $(FUNC_SOURCES); do echo "#include \"$$f\"" >> $@; done @for f in $(FUNC_SOURCES); do echo "#include \"$$f\"" >> $@; done
@echo "static struct ast_custom_function *builtins[] = {" >> $@ @echo "static struct ast_custom_function *builtins[] = {" >> $@
@for f in $(FUNC_STRUCTS); do echo "&$$f," >> $@; done @for f in $(FUNC_STRUCTS); do echo "&$$f," >> $@; done
@echo "};" >> $@ @echo "};" >> $@
pbx_functions.o: pbx_functions.h
pbx_functions.so: pbx_functions.o #$(BUILTINS) pbx_functions.so: pbx_functions.o #$(BUILTINS)
$(CC) $(SOLINK) -o $@ $< $(CC) $(SOLINK) -o $@ $<