diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2018-07-02 12:38:33 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2018-07-02 12:38:33 +0000 |
commit | 3cb4106b13aa883f3b704aa4026b78fd36db3756 (patch) | |
tree | 7909fa214055aa344a71b515c8781c03db32ab79 /Makefile | |
parent | 42c3adc8841167026bb8409cb5e4390a32bff49a (diff) | |
download | nsss-3cb4106b13aa883f3b704aa4026b78fd36db3756.tar.xz |
Add test framework, fix some bugs
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -61,7 +61,7 @@ ALL_INCLUDES := $(wildcard src/include/$(package)/*.h) all: $(ALL_LIBS) $(ALL_BINS) $(ALL_INCLUDES) src/include/pwd.h src/include/grp.h src/include/shadow.h clean: - @exec rm -f $(ALL_LIBS) $(ALL_BINS) $(wildcard src/*/*.o src/*/*.lo) $(EXTRA_TARGETS) + @exec rm -f $(ALL_LIBS) $(ALL_BINS) $(wildcard src/*/*.o src/*/*.lo) $(TEST_BINS) $(EXTRA_TARGETS) distclean: clean @exec rm -f config.mak src/include/$(package)/config.h @@ -90,6 +90,12 @@ install-lib: $(STATIC_LIBS:lib%.a.xyzzy=$(DESTDIR)$(libdir)/lib%.a) install-include: $(ALL_INCLUDES:src/include/$(package)/%.h=$(DESTDIR)$(includedir)/$(package)/%.h) $(DESTDIR)$(includedir)/pwd.h $(DESTDIR)$(includedir)/grp.h $(DESTDIR)$(includedir)/shadow.h install-data: $(ALL_DATA:src/etc/%=$(DESTDIR)$(datadir)/%) +tests: $(TEST_BINS) + +check: tests + @for i in $(TEST_BINS) ; do ./tools/run-test.sh $$i || exit 1 ; done + + ifneq ($(exthome),) $(DESTDIR)$(exthome): $(DESTDIR)$(home) @@ -145,7 +151,7 @@ $(DESTDIR)$(includedir)/shadow.h: src/include/shadow.h %.lo: %.c exec $(REALCC) $(CPPFLAGS_ALL) $(CFLAGS_ALL) $(CFLAGS_SHARED) -c -o $@ $< -$(ALL_BINS): +$(ALL_BINS) $(TEST_BINS): exec $(REALCC) -o $@ $(CFLAGS_ALL) $(LDFLAGS_ALL) $(LDFLAGS_NOSHARED) $^ $(EXTRA_LIBS) $(LDLIBS) lib%.a.xyzzy: @@ -155,6 +161,6 @@ lib%.a.xyzzy: lib%.so.xyzzy: exec $(REALCC) -o $@ $(CFLAGS_ALL) $(CFLAGS_SHARED) $(LDFLAGS_ALL) $(LDFLAGS_SHARED) -Wl,-soname,$(patsubst lib%.so.xyzzy,lib%.so.$(version_M),$@) $^ $(EXTRA_LIBS) $(LDLIBS) -.PHONY: it all clean distclean tgz strip install install-dynlib install-bin install-lib install-include install-data +.PHONY: it all clean distclean tgz strip install install-dynlib install-bin install-lib install-include install-data tests check .DELETE_ON_ERROR: |