From 7104dd0bc94b6b1aa4b06686f7e51be2af82fca1 Mon Sep 17 00:00:00 2001 From: kpfleming Date: Tue, 5 Jul 2005 19:30:18 +0000 Subject: make editline build properly on cygwin (bug #4624) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6029 f38db490-d61c-443f-a65b-d21fe96a405b --- editline/Makefile.in | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'editline/Makefile.in') diff --git a/editline/Makefile.in b/editline/Makefile.in index 67ae6ad40..c4e569515 100755 --- a/editline/Makefile.in +++ b/editline/Makefile.in @@ -3,6 +3,13 @@ # OSTYPE=$(shell uname -s) +cygx="$(shell uname -s | sed -e c\cygwin | tr [:upper:] [:lower:])" +define cyg_subst_sys + if [ $(cygx) = "cygwin" ]; then \ + cat $@ | sed -e s/"sys\.h"/"config.h"/g > $@.copy; \ + mv --force $@.copy $@; \ + fi +endef SHELL = /bin/sh @@ -184,7 +191,7 @@ $(LIB_A) : $(BGCSRCS:.c=.o_a) $(CCSRCS:.c=.o_a) $(RANLIB) $@ $(LIB_S) : $(BGCSRCS:.c=.o_s) $(CCSRCS:.c=.o_s) - $(CC) $(S_LDFLAGS) -o $@ $(BGCSRCS:.c=.o_s) $(CCSRCS:.c=.o_s) + $(CC) $(S_LDFLAGS) -o $@ $(BGCSRCS:.c=.o_s) $(CCSRCS:.c=.o_s) $(LIBS) $(TEST) : $(TCSRCS:.c=.o) $(LIB_A) $(CC) -o $@ $(TCSRCS:.c=.o) $(LIB_A) $(LIBS) @@ -203,12 +210,14 @@ fcns.h : $(AGHDRS) fcns.c : $(AGHDRS) fcns.h $(SHELL) makelist -fc $(AGHDRS) > $@ + $(cyg_subst_sys) help.h : $(ACSRCS) $(SHELL) makelist -bh $(ACSRCS) > $@ help.c : $(ACSRCS) help.h $(SHELL) makelist -bc $(ACSRCS) > $@ + $(cyg_subst_sys) editline.c : $(ACSRCS) $(BCSRCS) $(AGCSRCS) $(SHELL) makelist -e $(ACSRCS) $(BCSRCS) $(AGCSRCS) > $@ -- cgit v1.2.3