Simplify tests/xbps/xbps-rindex structure.

This commit is contained in:
Juan RP 2013-11-06 11:11:00 +01:00
parent 8f36f8e638
commit 6952144d60
8 changed files with 16 additions and 29 deletions

1
.gitignore vendored
View File

@ -26,4 +26,5 @@ doc/xbps_api_doxyfile
ftperr.h ftperr.h
httperr.h httperr.h
tests/*/*/*/*_test tests/*/*/*/*_test
tests/*/*/*_test
include/xbps.h include/xbps.h

View File

@ -3,16 +3,21 @@
OBJS ?= main.o OBJS ?= main.o
.PHONY: all .PHONY: all
all: $(TEST) all: $(TEST) $(TESTSHELL)
.PHONY: clean .PHONY: clean
clean: clean:
-rm -f $(TEST) $(OBJS) -rm -f $(TEST) $(TESTSHELL) $(OBJS)
.PHONY: install .PHONY: install
install: all install:
install -d $(DESTDIR)$(TESTSDIR)/$(TESTSSUBDIR) install -d $(DESTDIR)$(TESTSDIR)/$(TESTSSUBDIR)
ifdef TEST
install -m755 $(TEST) $(DESTDIR)$(TESTSDIR)/$(TESTSSUBDIR) install -m755 $(TEST) $(DESTDIR)$(TESTSDIR)/$(TESTSSUBDIR)
endif
ifdef TESTSHELL
install -m755 $(TESTSHELL) $(DESTDIR)$(TESTSDIR)/$(TESTSSUBDIR)
endif
ifdef EXTRA_FILES ifdef EXTRA_FILES
for f in $(EXTRA_FILES); do \ for f in $(EXTRA_FILES); do \
install -m644 $${f} $(DESTDIR)$(TESTSDIR)/$(TESTSSUBDIR); \ install -m644 $${f} $(DESTDIR)$(TESTSDIR)/$(TESTSSUBDIR); \
@ -22,6 +27,7 @@ endif
.PHONY: uninstall .PHONY: uninstall
uninstall: uninstall:
-rm -f $(DESTDIR)$(TESTSDIR)/$(TESTSSUBDIR)/$(TEST) -rm -f $(DESTDIR)$(TESTSDIR)/$(TESTSSUBDIR)/$(TEST)
-rm -f $(DESTDIR)$(TESTSDIR)/$(TESTSSUBDIR)/$(TESTSHELL)
%.o: %.c %.o: %.c
@printf " [CC]\t\t$@\n" @printf " [CC]\t\t$@\n"

View File

@ -1,5 +1,8 @@
-include ../../../config.mk TOPDIR = ../../..
-include $(TOPDIR)/config.mk
SUBDIRS = common clean TESTSHELL = clean_test
TESTSSUBDIR = xbps/xbps-rindex
EXTRA_FILES = Kyuafile
include ../../../mk/subdir.mk include $(TOPDIR)/mk/test.mk

View File

@ -1 +0,0 @@
TESTSSUBDIR = xbps/xbps-rindex

View File

@ -1,7 +0,0 @@
TOPDIR = ../../../..
-include $(TOPDIR)/config.mk
TEST = clean_test
include ../Makefile.inc
include $(TOPDIR)/mk/test-shell.mk

View File

@ -1,15 +0,0 @@
TOPDIR = ../../../..
-include $(TOPDIR)/config.mk
include ../Makefile.inc
all:
install:
install -d $(DESTDIR)$(TESTSDIR)/$(TESTSSUBDIR)
install -m644 Kyuafile $(DESTDIR)$(TESTSDIR)/$(TESTSSUBDIR)
uninstall:
-rm -f $(DESTDIR)$(TESTSDIR)/$(TESTSSUBDIR)/Kyuafile
clean: