[asterisk-commits] pabelanger: branch pabelanger/non-root r618 - in /asterisk/team/pabelanger/no...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jul 28 13:24:10 CDT 2010


Author: pabelanger
Date: Wed Jul 28 13:24:06 2010
New Revision: 618

URL: http://svnview.digium.com/svn/testsuite?view=rev&rev=618
Log:
Move improvements to configure script.  Clean up asttest Makefile.

Modified:
    asterisk/team/pabelanger/non-root/asttest/Makefile
    asterisk/team/pabelanger/non-root/configure
    asterisk/team/pabelanger/non-root/configure.ac
    asterisk/team/pabelanger/non-root/makeopts.in

Modified: asterisk/team/pabelanger/non-root/asttest/Makefile
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/non-root/asttest/Makefile?view=diff&rev=618&r1=617&r2=618
==============================================================================
--- asterisk/team/pabelanger/non-root/asttest/Makefile (original)
+++ asterisk/team/pabelanger/non-root/asttest/Makefile Wed Jul 28 13:24:06 2010
@@ -19,16 +19,6 @@
 endif
 
 .PHONY: clean dist-clean distclean test check asterisk
-
-INSTALL?=install
-DESTDIR?=
-PREFIX?=/usr
-EXEC_PREFIX?=$(PREFIX)
-BINDIR?=$(EXEC_PREFIX)/bin
-
-ASTSRCDIR ?= ../
-ASTDSTDIR ?= $(PWD)/asterisk
-
 
 LUAFILESYSTEM=luafilesystem-1.4.2
 LUASOCKET=luasocket-2.0.2
@@ -52,10 +42,9 @@
 L_OBJS:=lib/lua/testlib.o lib/lua/astlib.o lib/lua/proclib.o
 T_LIBS:=`pkg-config --libs lua5.1 2> /dev/null || pkg-config --libs lua 2> /dev/null || echo -llua -lm -ldl`
 
-
 all: _all 
 
-_all: makeopts asttest
+_all: asttest
 
 makeopts: configure
 	@echo "****"
@@ -64,51 +53,14 @@
 	@echo "****"
 	@exit 1
 
-#$(OBJS) $(C_OBJS): autoconfig.h menuselect.h
-#
-#makeopts autoconfig.h: autoconfig.h.in makeopts.in
-#	@./configure $(CONFIGURE_SILENT) CC= LD= AR= CFLAGS=
-#
-#ifdef C_OBJS
-#menuselect_curses.o: CFLAGS+=$(C_INCLUDE)
-#cmenuselect: $(OBJS) $(C_OBJS)
-#	$(CC) -o $@ $^ $(C_LIBS)
-#else
-#cmenuselect:
-#endif
-#
-#ifdef G_OBJS
-#menuselect_gtk.o: CFLAGS+=$(G_INCLUDE)
-#gmenuselect: $(OBJS) $(G_OBJS)
-#	$(CC) -o $@ $^ $(G_LIBS)
-#else
-#gmenuselect:
-#endif
-#
-#ifdef N_OBJS
-#menuselect_newt.o: CFLAGS+=$(N_INCLUDE)
-#nmenuselect: $(OBJS) $(N_OBJS)
-#	$(CC) -o $@ $^ $(N_LIBS)
-#else
-#nmenuselect:
-#endif
-
 lib/lua/%_lua.h : lib/lua/%.lua tools/mkstring
-	luac -o $(basename $<).luac $<
+	$(LUAC) -o $(basename $<).luac $<
 	./tools/mkstring -n $(notdir $(basename $<))_lua -o $@ $(basename $<).luac 
 
 lib/%.o: lib/%.c include/asttest/%.h
 
 # this line does not seem to work
 #lib/lua/%.o: lib/lua/%.c lib/lua/%_lua.h include/asttest/lua/%.h
-
-asterisk:
-	cd $(ASTSRCDIR) && ./configure --enable-dev-mode \
-		--prefix=$(ASTDSTDIR)/usr \
-		--sysconfdir=$(ASTDSTDIR)/etc \
-		--localstatedir=$(ASTDSTDIR)/var
-	$(MAKE) -C $(ASTSRCDIR) install
-	$(MAKE) -C $(ASTSRCDIR) samples
 
 lib/testsuite.o: lib/testsuite.c include/asttest/testsuite.h include/asttest/asttest.h
 lib/testutils.o: lib/testutils.c include/asttest/testutils.h include/asttest/asttest.h include/asttest/testsuite.h include/asttest/lua.h
@@ -158,8 +110,7 @@
 	$(CC) -D_GNU_SOURCE -Wall -o $@ $^
 
 install: asttest
-	install -d $(DESTDIR)$(BINDIR)
-	install -m 755 asttest $(DESTDIR)$(BINDIR)
+	$(INSTALL) -m 755 asttest $(DESTDIR)$(ASTSBINDIR)/
 
 uninstall:
 	rm -f $(DESTDIR)$(BINDIR)/asttest

Modified: asterisk/team/pabelanger/non-root/configure.ac
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/non-root/configure.ac?view=diff&rev=618&r1=617&r2=618
==============================================================================
--- asterisk/team/pabelanger/non-root/configure.ac (original)
+++ asterisk/team/pabelanger/non-root/configure.ac Wed Jul 28 13:24:06 2010
@@ -3,7 +3,7 @@
 AC_INIT([testsuite], [trunk], [https://issues.asterisk.org])
 
 # check existence of the package
-AC_CONFIG_SRCDIR([asttest.c])
+AC_CONFIG_SRCDIR([asttest/asttest.c])
 
 BUILD_PLATFORM=${build}
 BUILD_CPU=${build_cpu}
@@ -35,9 +35,26 @@
 AC_PROG_LN_S
 AC_PROG_RANLIB
 
+AC_PATH_PROG([LUAC], [luac], :)
+
 ACX_PTHREAD
 
 AC_LANG(C)
+
+AC_ARG_ENABLE([dev-mode],
+	[AS_HELP_STRING([--enable-dev-mode],
+		[Turn on developer mode])],
+	[case "${enableval}" in
+		y|ye|yes) AST_DEVMODE=yes ;;
+		n|no)  AST_DEVMODE=no ;;
+		noisy)
+		AST_DEVMODE=yes
+		NOISY_BUILD=yes
+		;;
+		*) AC_MSG_ERROR(bad value ${enableval} for --enable-dev-mode)  ;;
+	esac])
+AC_SUBST(NOISY_BUILD)
+AC_SUBST(AST_DEVMODE)
 
 AST_EXT_LIB_SETUP([LUA], [Lua], [lua])
 

Modified: asterisk/team/pabelanger/non-root/makeopts.in
URL: http://svnview.digium.com/svn/testsuite/asterisk/team/pabelanger/non-root/makeopts.in?view=diff&rev=618&r1=617&r2=618
==============================================================================
--- asterisk/team/pabelanger/non-root/makeopts.in (original)
+++ asterisk/team/pabelanger/non-root/makeopts.in Wed Jul 28 13:24:06 2010
@@ -4,3 +4,7 @@
 CXX=@CXX@
 
 INSTALL=@INSTALL@
+LUAC=@LUAC@
+
+AST_DEVMODE=@AST_DEVMODE@
+NOISY_BUILD=@NOISY_BUILD@




More information about the asterisk-commits mailing list