git://git.nikiroo.be
/
nikiroo-utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
bf1268a
)
makefile
author
Niki Roo
<niki@nikiroo.be>
Mon, 1 Jul 2024 18:56:49 +0000
(20:56 +0200)
committer
Niki Roo
<niki@nikiroo.be>
Mon, 1 Jul 2024 18:56:49 +0000
(20:56 +0200)
Makefile
patch
|
blob
|
blame
|
history
diff --git
a/Makefile
b/Makefile
index 596b956d12ab0a9cefeab89a4319660fe8a049af..0e715b9d04813fc191ffc76a04bc60c99ca2ad1c 100644
(file)
--- a/
Makefile
+++ b/
Makefile
@@
-10,10
+10,19
@@
#
NAME = nikiroo-utils
MAIN = be/nikiroo/tests/utils/Test
#
NAME = nikiroo-utils
MAIN = be/nikiroo/tests/utils/Test
-MORE += be/nikiroo/utils/ui/test/TestUI
-# MORE += be/nikiroo/utils/android/test/TestAndroid
TEST = be/nikiroo/tests/utils/Test
TEST = be/nikiroo/tests/utils/Test
+# Option for this program: UI=android (or UI=awt by default)
+ifeq ($(UI),android)
+MORE += be/nikiroo/utils/android/test/TestAndroid
+TEST += be/nikiroo/utils/android/ImageUtilsAndroid
+else
+MORE += be/nikiroo/utils/ui/ImageUtilsAwt
+MORE += be/nikiroo/utils/ui/ImageTextAwt
+TEST += be/nikiroo/utils/ui/test/TestUI
+endif
+
+
JAR_MISC = -C ./ LICENSE -C ./ VERSION -C libs/ licenses
JAR_FLAGS += -C bin/ be -C bin/ org $(JAR_MISC)
SJAR_FLAGS += -C src/ org -C src/ be $(JAR_MISC)
JAR_MISC = -C ./ LICENSE -C ./ VERSION -C libs/ licenses
JAR_FLAGS += -C bin/ be -C bin/ org $(JAR_MISC)
SJAR_FLAGS += -C src/ org -C src/ be $(JAR_MISC)
@@
-63,7
+72,8
@@
help:
@echo " make uninstall : to uninstall the application from $$PREFIX"
@echo " make man : to make the manual pages (requires pandoc)"
@echo " make uninstall : to uninstall the application from $$PREFIX"
@echo " make man : to make the manual pages (requires pandoc)"
-.PHONY: all clean mrproper mrpropre build run jrun jar sjar resources test-resources install libs man love
+.PHONY: all clean mrproper mrpropre build run jrun jar sjar resources \
+ test-resources install libs man love
bin:
@mkdir -p bin
bin:
@mkdir -p bin
@@
-182,7
+192,7
@@
$(NAME)-sources.jar: libs
fi; \
fi;
fi; \
fi;
-$(NAME).jar:
build
resources
+$(NAME).jar: resources
@if [ -d libs/bin/ ]; then \
echo "Copying additional binaries from libs/bin/ into bin/...";\
cp -r libs/bin/* bin/; \
@if [ -d libs/bin/ ]; then \
echo "Copying additional binaries from libs/bin/ into bin/...";\
cp -r libs/bin/* bin/; \
@@
-196,15
+206,15
@@
$(NAME).jar: build resources
@[ ! -e VERSION ] || echo Copying to "$(NAME)-`cat VERSION`.jar"...
@[ ! -e VERSION ] || cp $(NAME).jar "$(NAME)-`cat VERSION`.jar"
@[ ! -e VERSION ] || echo Copying to "$(NAME)-`cat VERSION`.jar"...
@[ ! -e VERSION ] || cp $(NAME).jar "$(NAME)-`cat VERSION`.jar"
-run:
build
+run:
@echo Running "$(NAME)"...
$(JAVA) $(JAVA_FLAGS) $(MAIN)
@echo Running "$(NAME)"...
$(JAVA) $(JAVA_FLAGS) $(MAIN)
-jrun:
build
+jrun:
@echo Running "$(NAME).jar"...
$(RJAR) $(RJAR_FLAGS) $(NAME).jar
@echo Running "$(NAME).jar"...
$(RJAR) $(RJAR_FLAGS) $(NAME).jar
-run-test:
test
+run-test:
@echo Running tests for "$(NAME)"...
@[ "$(TEST)" != "" ] || echo No test sources defined.
@if [ "`whereis tput`" = "tput:" ]; then \
@echo Running tests for "$(NAME)"...
@[ "$(TEST)" != "" ] || echo No test sources defined.
@if [ "`whereis tput`" = "tput:" ]; then \
@@
-214,10
+224,15
@@
run-test: test
else \
ok="`tput bold`[`tput setf 2` OK `tput init``tput bold`]`tput init`"; \
ko="`tput bold`[`tput setf 4` !! `tput init``tput bold`]`tput init`"; \
else \
ok="`tput bold`[`tput setf 2` OK `tput init``tput bold`]`tput init`"; \
ko="`tput bold`[`tput setf 4` !! `tput init``tput bold`]`tput init`"; \
- cols=
'"`tput cols`"'
; \
+ cols=
"`tput cols`"
; \
fi; \
fi; \
- [ "$(TEST)" = "" ] || \
- ( clear ; $(JAVA) $(JAVA_FLAGS) $(TEST) "$$cols" "$$ok" "$$ko" )
+ [ "$(TEST)" = "" ] || ( \
+ clear; \
+ for test in $(TEST); do \
+ $(JAVA) $(JAVA_FLAGS) "$$test" "$$cols" "$$ok" "$$ko"; \
+ done; \
+ );
+
install: man
@[ -e $(NAME).jar ] || echo You need to build the jar
install: man
@[ -e $(NAME).jar ] || echo You need to build the jar