Skip all-local and clean-local targets when building with --with-only-libndpi

The all-local and clean-local targets copy configuration files from example/,
lists/, and tests/cfgs/ directories for out-of-tree builds. These files are only
needed for example programs and tests, not for library-only builds.

When configured with --with-only-libndpi, EXTRA_TARGETS is empty, so we can skip
these setup/cleanup operations by checking if EXTRA_TARGETS is non-empty.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Ivan Nardi 2025-12-08 15:02:49 +00:00 committed by Toni
parent 99b0668765
commit 85a8ed8a10

View file

@ -75,8 +75,9 @@ changelog:
# For out-of-tree builds: copy required configuration files
# ndpiReader has some hard-coded paths in some unit tests: in the out-of-tree builds we need
# some configuration files in the expected path
# Avoid all of that if we are compiling only the library
all-local:
@if test "$(srcdir)" != . ; then \
@if test "$(srcdir)" != . && test -n "@EXTRA_TARGETS@" ; then \
echo "Setting up out-of-tree build configuration files..."; \
$(MKDIR_P) example lists tests/cfgs; \
$(INSTALL_DATA) $(srcdir)/example/*.txt example/; \
@ -95,7 +96,7 @@ all-local:
fi
clean-local:
@if test "$(srcdir)" != . ; then \
@if test "$(srcdir)" != . && test -n "@EXTRA_TARGETS@" ; then \
echo "Cleaning out-of-tree build configuration files..."; \
-$(RM) example/*.txt; \
-$(RM) example/*.conf; \