From 041cb2f9acc93731ccd0b23f0f2641cb30b2c075 Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sat, 13 Aug 2016 20:38:01 +0200 Subject: [PATCH] Add an "include" test for NetBSD --- Makefile | 2 ++ tests/Makefile | 2 +- tests/include/Makefile.NetBSD | 30 ++++++++++++++++++++++++++++++ tests/include/project.conf | 4 ++++ tests/project.conf | 4 ++-- tests/tests.sh | 1 + 6 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 tests/include/Makefile.NetBSD create mode 100644 tests/include/project.conf diff --git a/Makefile b/Makefile index 91f0428..38d1011 100644 --- a/Makefile +++ b/Makefile @@ -75,6 +75,8 @@ dist: $(PACKAGE)-$(VERSION)/tests/binary/Makefile.Darwin \ $(PACKAGE)-$(VERSION)/tests/binary/Makefile.NetBSD \ $(PACKAGE)-$(VERSION)/tests/binary/Makefile.Windows \ + $(PACKAGE)-$(VERSION)/tests/include/project.conf \ + $(PACKAGE)-$(VERSION)/tests/include/Makefile.NetBSD \ $(PACKAGE)-$(VERSION)/tests/library/project.conf \ $(PACKAGE)-$(VERSION)/tests/library/Makefile.Darwin \ $(PACKAGE)-$(VERSION)/tests/library/Makefile.Linux \ diff --git a/tests/Makefile b/tests/Makefile index cd65e1f..be18e56 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -13,7 +13,7 @@ all: $(TARGETS) $(OBJDIR)shlint.log: ../doc/scripts/shlint.sh ../doc/scripts/shlint.sh -P "$(PREFIX)" -- "$(OBJDIR)shlint.log" -$(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 package/project.conf package/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 include/project.conf include/Makefile.NetBSD 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 package/project.conf package/Makefile.NetBSD plugin/Makefile.Darwin plugin/Makefile.NetBSD script/project.conf script/Makefile.NetBSD tests.sh ./tests.sh -P "$(PREFIX)" -- "$(OBJDIR)tests.log" $(OBJDIR)xmllint.log: ../doc/scripts/xmllint.sh diff --git a/tests/include/Makefile.NetBSD b/tests/include/Makefile.NetBSD new file mode 100644 index 0000000..371adbe --- /dev/null +++ b/tests/include/Makefile.NetBSD @@ -0,0 +1,30 @@ +OBJDIR = +PREFIX = /usr/local +DESTDIR = +RM = rm -f +LN = ln -f +MKDIR = mkdir -m 0755 -p +INSTALL = install +INCLUDEDIR= $(PREFIX)/include + + +all: + +clean: + +distclean: clean + +install: + $(MKDIR) $(DESTDIR)$(INCLUDEDIR) + $(INSTALL) -m 0644 stdio.h $(DESTDIR)$(INCLUDEDIR)/stdio.h + $(MKDIR) $(DESTDIR)$(INCLUDEDIR)/staging + $(INSTALL) -m 0644 stdlib.h $(DESTDIR)$(INCLUDEDIR)/staging/stdlib.h + $(MKDIR) $(DESTDIR)$(INCLUDEDIR)/sys + $(INSTALL) -m 0644 sys/socket.h $(DESTDIR)$(INCLUDEDIR)/sys/socket.h + +uninstall: + $(RM) -- $(DESTDIR)$(INCLUDEDIR)/stdio.h + $(RM) -- $(DESTDIR)$(INCLUDEDIR)/staging/stdlib.h + $(RM) -- $(DESTDIR)$(INCLUDEDIR)/sys/socket.h + +.PHONY: all clean distclean install uninstall diff --git a/tests/include/project.conf b/tests/include/project.conf new file mode 100644 index 0000000..08e90f0 --- /dev/null +++ b/tests/include/project.conf @@ -0,0 +1,4 @@ +includes=stdio.h,stdlib.h,sys/socket.h + +[stdlib.h] +install=$(INCLUDEDIR)/staging diff --git a/tests/project.conf b/tests/project.conf index 917de40..f112b7b 100644 --- a/tests/project.conf +++ b/tests/project.conf @@ -1,5 +1,5 @@ targets=shlint.log,tests.log,xmllint.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,libtool/project.conf,libtool/Makefile.Darwin,libtool/Makefile.Linux,libtool/Makefile.NetBSD,libtool/Makefile.Windows,object/project.conf,object/Makefile.NetBSD,package/project.conf,package/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,include/project.conf,include/Makefile.NetBSD,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,package/project.conf,package/Makefile.NetBSD,plugin/project.conf,plugin/Makefile.Darwin,plugin/Makefile.NetBSD,script/project.conf,script/Makefile.NetBSD [shlint.log] type=script @@ -9,7 +9,7 @@ depends=../doc/scripts/shlint.sh [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,libtool/project.conf,libtool/Makefile.Darwin,libtool/Makefile.Linux,libtool/Makefile.NetBSD,libtool/Makefile.Windows,object/project.conf,object/Makefile.NetBSD,package/project.conf,package/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,include/project.conf,include/Makefile.NetBSD,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,package/project.conf,package/Makefile.NetBSD,plugin/Makefile.Darwin,plugin/Makefile.NetBSD,script/project.conf,script/Makefile.NetBSD,tests.sh [xmllint.log] type=script diff --git a/tests/tests.sh b/tests/tests.sh index 0e6ee81..fe26fdf 100755 --- a/tests/tests.sh +++ b/tests/tests.sh @@ -77,6 +77,7 @@ _tests() _test "Linux" "library" || ret=2 _test "Linux" "libtool" || ret=2 _test "NetBSD" "binary" || ret=2 + _test "NetBSD" "include" || ret=2 _test "NetBSD" "library" || ret=2 _test "NetBSD" "libtool" || ret=2 _test "NetBSD" "object" || ret=2