From 9edcbbaa3c0e155a7713dafbdd8d8eec3b6ed468 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Mon, 25 May 2015 01:58:08 +0200 Subject: [PATCH] Also test "libtool" targets --- Makefile | 5 ++++ tests/Makefile | 2 +- tests/libtool/Makefile.Darwin | 43 ++++++++++++++++++++++++++++++++++ tests/libtool/Makefile.Linux | 43 ++++++++++++++++++++++++++++++++++ tests/libtool/Makefile.NetBSD | 43 ++++++++++++++++++++++++++++++++++ tests/libtool/Makefile.Windows | 42 +++++++++++++++++++++++++++++++++ tests/libtool/project.conf | 8 +++++++ tests/project.conf | 4 ++-- tests/tests.sh | 4 ++++ 9 files changed, 191 insertions(+), 3 deletions(-) create mode 100644 tests/libtool/Makefile.Darwin create mode 100644 tests/libtool/Makefile.Linux create mode 100644 tests/libtool/Makefile.NetBSD create mode 100644 tests/libtool/Makefile.Windows create mode 100644 tests/libtool/project.conf diff --git a/Makefile b/Makefile index 9fea65d..39a1170 100644 --- a/Makefile +++ b/Makefile @@ -74,6 +74,11 @@ dist: $(PACKAGE)-$(VERSION)/tests/library/Makefile.Linux \ $(PACKAGE)-$(VERSION)/tests/library/Makefile.NetBSD \ $(PACKAGE)-$(VERSION)/tests/library/Makefile.Windows \ + $(PACKAGE)-$(VERSION)/tests/libtool/project.conf \ + $(PACKAGE)-$(VERSION)/tests/libtool/Makefile.Darwin \ + $(PACKAGE)-$(VERSION)/tests/libtool/Makefile.Linux \ + $(PACKAGE)-$(VERSION)/tests/libtool/Makefile.NetBSD \ + $(PACKAGE)-$(VERSION)/tests/libtool/Makefile.Windows \ $(PACKAGE)-$(VERSION)/tests/object/project.conf \ $(PACKAGE)-$(VERSION)/tests/object/Makefile.NetBSD \ $(PACKAGE)-$(VERSION)/tests/plugin/project.conf \ diff --git a/tests/Makefile b/tests/Makefile index b2df119..47ad6d4 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -10,7 +10,7 @@ INSTALL = install all: $(TARGETS) -$(OBJDIR)tests.log: $(OBJDIR)../src/configure$(EXEEXT) binary/project.conf binary/Makefile.Darwin binary/Makefile.NetBSD binary/Makefile.Windows library/project.conf library/Makefile.Darwin library/Makefile.Linux library/Makefile.NetBSD library/Makefile.Windows object/project.conf object/Makefile.NetBSD plugin/Makefile.Darwin plugin/Makefile.NetBSD script/project.conf script/Makefile.NetBSD tests.sh +$(OBJDIR)tests.log: $(OBJDIR)../src/configure$(EXEEXT) binary/project.conf binary/Makefile.Darwin binary/Makefile.NetBSD binary/Makefile.Windows library/project.conf library/Makefile.Darwin library/Makefile.Linux library/Makefile.NetBSD library/Makefile.Windows libtool/project.conf libtool/Makefile.Darwin libtool/Makefile.Linux libtool/Makefile.NetBSD libtool/Makefile.Windows object/project.conf object/Makefile.NetBSD plugin/Makefile.Darwin plugin/Makefile.NetBSD script/project.conf script/Makefile.NetBSD tests.sh ./tests.sh -P "$(PREFIX)" -- "$(OBJDIR)tests.log" clean: diff --git a/tests/libtool/Makefile.Darwin b/tests/libtool/Makefile.Darwin new file mode 100644 index 0000000..1c491ad --- /dev/null +++ b/tests/libtool/Makefile.Darwin @@ -0,0 +1,43 @@ +TARGETS = $(OBJDIR)libtest.la +OBJDIR = +PREFIX = /usr/local +DESTDIR = +LIBDIR = $(PREFIX)/lib +LDFLAGS = -ldl -lintl -ltest +AR = ar +RANLIB = ranlib +CCSHARED= $(CC) -dynamiclib +LIBTOOL = libtool +RM = rm -f +LN = ln -f +MKDIR = mkdir -m 0755 -p +INSTALL = install + + +all: $(TARGETS) + +libtest_OBJS = $(OBJDIR)test.lo +libtest_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS) +libtest_LDFLAGS = $(LDFLAGSF) $(LDFLAGS) + +$(OBJDIR)libtest.la: $(libtest_OBJS) + $(LIBTOOL) --mode=link $(CC) -o $(OBJDIR)libtest.la $(libtest_OBJS) -rpath $(LIBDIR) $(libtest_LDFLAGS) + +$(OBJDIR)test.o test.lo: test.c + $(LIBTOOL) --mode=compile $(CC) $(libtest_CFLAGS) -o $(OBJDIR)test.o -c test.c + +clean: + $(RM) -- $(libtest_OBJS) + +distclean: clean + $(RM) -- $(TARGETS) + +install: $(TARGETS) + $(MKDIR) $(DESTDIR)$(LIBDIR) + $(LIBTOOL) --mode=install $(INSTALL) -m 0755 $(OBJDIR)libtest.la $(DESTDIR)$(LIBDIR)/libtest.la + $(LIBTOOL) --mode=finish $(DESTDIR)/$(LIBDIR) + +uninstall: + $(LIBTOOL) --mode=uninstall $(RM) -- $(DESTDIR)$(LIBDIR)/libtest.la + +.PHONY: all clean distclean install uninstall diff --git a/tests/libtool/Makefile.Linux b/tests/libtool/Makefile.Linux new file mode 100644 index 0000000..cc1afa6 --- /dev/null +++ b/tests/libtool/Makefile.Linux @@ -0,0 +1,43 @@ +TARGETS = $(OBJDIR)libtest.la +OBJDIR = +PREFIX = /usr/local +DESTDIR = +LIBDIR = $(PREFIX)/lib +LDFLAGS = -ldl -ltest +AR = ar +RANLIB = ranlib +CCSHARED= $(CC) -shared +LIBTOOL = libtool +RM = rm -f +LN = ln -f +MKDIR = mkdir -m 0755 -p +INSTALL = install + + +all: $(TARGETS) + +libtest_OBJS = $(OBJDIR)test.lo +libtest_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS) +libtest_LDFLAGS = $(LDFLAGSF) $(LDFLAGS) + +$(OBJDIR)libtest.la: $(libtest_OBJS) + $(LIBTOOL) --mode=link $(CC) -o $(OBJDIR)libtest.la $(libtest_OBJS) -rpath $(LIBDIR) $(libtest_LDFLAGS) + +$(OBJDIR)test.o test.lo: test.c + $(LIBTOOL) --mode=compile $(CC) $(libtest_CFLAGS) -o $(OBJDIR)test.o -c test.c + +clean: + $(RM) -- $(libtest_OBJS) + +distclean: clean + $(RM) -- $(TARGETS) + +install: $(TARGETS) + $(MKDIR) $(DESTDIR)$(LIBDIR) + $(LIBTOOL) --mode=install $(INSTALL) -m 0755 $(OBJDIR)libtest.la $(DESTDIR)$(LIBDIR)/libtest.la + $(LIBTOOL) --mode=finish $(DESTDIR)/$(LIBDIR) + +uninstall: + $(LIBTOOL) --mode=uninstall $(RM) -- $(DESTDIR)$(LIBDIR)/libtest.la + +.PHONY: all clean distclean install uninstall diff --git a/tests/libtool/Makefile.NetBSD b/tests/libtool/Makefile.NetBSD new file mode 100644 index 0000000..8f76da1 --- /dev/null +++ b/tests/libtool/Makefile.NetBSD @@ -0,0 +1,43 @@ +TARGETS = $(OBJDIR)libtest.la +OBJDIR = +PREFIX = /usr/local +DESTDIR = +LIBDIR = $(PREFIX)/lib +LDFLAGS = -lintl -lossaudio -ltest +AR = ar +RANLIB = ranlib +CCSHARED= $(CC) -shared +LIBTOOL = libtool +RM = rm -f +LN = ln -f +MKDIR = mkdir -m 0755 -p +INSTALL = install + + +all: $(TARGETS) + +libtest_OBJS = $(OBJDIR)test.lo +libtest_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS) +libtest_LDFLAGS = $(LDFLAGSF) $(LDFLAGS) + +$(OBJDIR)libtest.la: $(libtest_OBJS) + $(LIBTOOL) --mode=link $(CC) -o $(OBJDIR)libtest.la $(libtest_OBJS) -rpath $(LIBDIR) $(libtest_LDFLAGS) + +$(OBJDIR)test.o test.lo: test.c + $(LIBTOOL) --mode=compile $(CC) $(libtest_CFLAGS) -o $(OBJDIR)test.o -c test.c + +clean: + $(RM) -- $(libtest_OBJS) + +distclean: clean + $(RM) -- $(TARGETS) + +install: $(TARGETS) + $(MKDIR) $(DESTDIR)$(LIBDIR) + $(LIBTOOL) --mode=install $(INSTALL) -m 0755 $(OBJDIR)libtest.la $(DESTDIR)$(LIBDIR)/libtest.la + $(LIBTOOL) --mode=finish $(DESTDIR)/$(LIBDIR) + +uninstall: + $(LIBTOOL) --mode=uninstall $(RM) -- $(DESTDIR)$(LIBDIR)/libtest.la + +.PHONY: all clean distclean install uninstall diff --git a/tests/libtool/Makefile.Windows b/tests/libtool/Makefile.Windows new file mode 100644 index 0000000..d2baa96 --- /dev/null +++ b/tests/libtool/Makefile.Windows @@ -0,0 +1,42 @@ +TARGETS = $(OBJDIR)libtest.la +OBJDIR = +PREFIX = /usr/local +DESTDIR = +LIBDIR = $(PREFIX)/lib +LDFLAGS = -lintl -ltest -lws2_32 +EXEEXT = .exe +CCSHARED= $(CC) -shared -Wl,-no-undefined -Wl,--enable-runtime-pseudo-reloc +LIBTOOL = libtool +RM = rm -f +LN = ln -f +MKDIR = mkdir -m 0755 -p +INSTALL = install + + +all: $(TARGETS) + +libtest_OBJS = $(OBJDIR)test.lo +libtest_CFLAGS = $(CPPFLAGSF) $(CPPFLAGS) $(CFLAGSF) $(CFLAGS) +libtest_LDFLAGS = $(LDFLAGSF) $(LDFLAGS) + +$(OBJDIR)libtest.la: $(libtest_OBJS) + $(LIBTOOL) --mode=link $(CC) -o $(OBJDIR)libtest.la $(libtest_OBJS) -rpath $(LIBDIR) $(libtest_LDFLAGS) + +$(OBJDIR)test.o test.lo: test.c + $(LIBTOOL) --mode=compile $(CC) $(libtest_CFLAGS) -o $(OBJDIR)test.o -c test.c + +clean: + $(RM) -- $(libtest_OBJS) + +distclean: clean + $(RM) -- $(TARGETS) + +install: $(TARGETS) + $(MKDIR) $(DESTDIR)$(LIBDIR) + $(LIBTOOL) --mode=install $(INSTALL) -m 0755 $(OBJDIR)libtest.la $(DESTDIR)$(LIBDIR)/libtest.la + $(LIBTOOL) --mode=finish $(DESTDIR)/$(LIBDIR) + +uninstall: + $(LIBTOOL) --mode=uninstall $(RM) -- $(DESTDIR)$(LIBDIR)/libtest.la + +.PHONY: all clean distclean install uninstall diff --git a/tests/libtool/project.conf b/tests/libtool/project.conf new file mode 100644 index 0000000..a16a088 --- /dev/null +++ b/tests/libtool/project.conf @@ -0,0 +1,8 @@ +targets=libtest +ldflags=-ldl -lintl -lossaudio -ltest -lws2_32 +dist=Makefile + +[libtest] +type=libtool +sources=test.c +install=$(LIBDIR) diff --git a/tests/project.conf b/tests/project.conf index 1326308..db0212e 100644 --- a/tests/project.conf +++ b/tests/project.conf @@ -1,7 +1,7 @@ targets=tests.log -dist=Makefile,tests.sh,binary/project.conf,binary/Makefile.Darwin,binary/Makefile.NetBSD,binary/Makefile.Windows,library/project.conf,library/Makefile.Darwin,library/Makefile.Linux,library/Makefile.NetBSD,library/Makefile.Windows,object/project.conf,object/Makefile.NetBSD,plugin/project.conf,plugin/Makefile.Darwin,plugin/Makefile.NetBSD,script/project.conf,script/Makefile.NetBSD +dist=Makefile,tests.sh,binary/project.conf,binary/Makefile.Darwin,binary/Makefile.NetBSD,binary/Makefile.Windows,library/project.conf,library/Makefile.Darwin,library/Makefile.Linux,library/Makefile.NetBSD,library/Makefile.Windows,libtool/project.conf,libtool/Makefile.Darwin,libtool/Makefile.Linux,libtool/Makefile.NetBSD,libtool/Makefile.Windows,object/project.conf,object/Makefile.NetBSD,plugin/project.conf,plugin/Makefile.Darwin,plugin/Makefile.NetBSD,script/project.conf,script/Makefile.NetBSD [tests.log] type=script script=./tests.sh -depends=$(OBJDIR)../src/configure$(EXEEXT),binary/project.conf,binary/Makefile.Darwin,binary/Makefile.NetBSD,binary/Makefile.Windows,library/project.conf,library/Makefile.Darwin,library/Makefile.Linux,library/Makefile.NetBSD,library/Makefile.Windows,object/project.conf,object/Makefile.NetBSD,plugin/Makefile.Darwin,plugin/Makefile.NetBSD,script/project.conf,script/Makefile.NetBSD,tests.sh +depends=$(OBJDIR)../src/configure$(EXEEXT),binary/project.conf,binary/Makefile.Darwin,binary/Makefile.NetBSD,binary/Makefile.Windows,library/project.conf,library/Makefile.Darwin,library/Makefile.Linux,library/Makefile.NetBSD,library/Makefile.Windows,libtool/project.conf,libtool/Makefile.Darwin,libtool/Makefile.Linux,libtool/Makefile.NetBSD,libtool/Makefile.Windows,object/project.conf,object/Makefile.NetBSD,plugin/Makefile.Darwin,plugin/Makefile.NetBSD,script/project.conf,script/Makefile.NetBSD,tests.sh diff --git a/tests/tests.sh b/tests/tests.sh index e8bacb4..11a0758 100755 --- a/tests/tests.sh +++ b/tests/tests.sh @@ -69,15 +69,19 @@ _tests() $DATE _test "Darwin" "binary" || ret=2 _test "Darwin" "library" || ret=2 + _test "Darwin" "libtool" || ret=2 _test "Darwin" "plugin" || ret=2 _test "Linux" "library" || ret=2 + _test "Linux" "libtool" || ret=2 _test "NetBSD" "binary" || ret=2 _test "NetBSD" "library" || ret=2 + _test "NetBSD" "libtool" || ret=2 _test "NetBSD" "object" || ret=2 _test "NetBSD" "plugin" || ret=2 _test "NetBSD" "script" || ret=2 _test "Windows" "binary" || ret=2 _test "Windows" "library" || ret=2 + _test "Windows" "libtool" || ret=2 return $ret }