mirror of
https://github.com/ntop/n2n.git
synced 2024-09-20 00:51:10 +02:00
Refactor the PHONY make targets to be near their target definitions
This commit is contained in:
parent
bcb3c223d9
commit
150c32562d
12
Makefile.in
12
Makefile.in
|
@ -146,9 +146,8 @@ SUBDIRS+=tools
|
||||||
COVERAGEDIR?=coverage
|
COVERAGEDIR?=coverage
|
||||||
|
|
||||||
.PHONY: $(SUBDIRS)
|
.PHONY: $(SUBDIRS)
|
||||||
.PHONY: steps build push all clean distclean install test cover gcov build-dep
|
|
||||||
.PHONY: lint lint.python lint.ccode lint.shell lint.yaml
|
|
||||||
|
|
||||||
|
.PHONY: all
|
||||||
all: version $(APPS) $(DOCS) $(SUBDIRS)
|
all: version $(APPS) $(DOCS) $(SUBDIRS)
|
||||||
|
|
||||||
# This allows breaking the build if the version.sh script discovers
|
# This allows breaking the build if the version.sh script discovers
|
||||||
|
@ -188,9 +187,11 @@ $(N2N_LIB): $(N2N_OBJS)
|
||||||
|
|
||||||
win32/n2n_win32.a: win32
|
win32/n2n_win32.a: win32
|
||||||
|
|
||||||
|
.PHONY: test
|
||||||
test: tools
|
test: tools
|
||||||
scripts/test_harness.sh
|
scripts/test_harness.sh
|
||||||
|
|
||||||
|
.PHONY: lint lint.python lint.ccode lint.shell lint.yaml
|
||||||
lint: lint.python lint.ccode lint.shell lint.yaml
|
lint: lint.python lint.ccode lint.shell lint.yaml
|
||||||
|
|
||||||
lint.python:
|
lint.python:
|
||||||
|
@ -209,6 +210,7 @@ lint.yaml:
|
||||||
# CFLAGS="-fprofile-arcs -ftest-coverage" LDFLAGS="--coverage"
|
# CFLAGS="-fprofile-arcs -ftest-coverage" LDFLAGS="--coverage"
|
||||||
# and run the desired tests. Ensure that package gcovr is installed
|
# and run the desired tests. Ensure that package gcovr is installed
|
||||||
# and then run "make cover"
|
# and then run "make cover"
|
||||||
|
.PHONY: cover
|
||||||
cover:
|
cover:
|
||||||
mkdir -p $(COVERAGEDIR)
|
mkdir -p $(COVERAGEDIR)
|
||||||
gcovr -s --html --html-details --output=$(COVERAGEDIR)/index.html
|
gcovr -s --html --html-details --output=$(COVERAGEDIR)/index.html
|
||||||
|
@ -217,11 +219,13 @@ cover:
|
||||||
# Unfortunately, these end up in the wrong directory due to the
|
# Unfortunately, these end up in the wrong directory due to the
|
||||||
# makefile layout
|
# makefile layout
|
||||||
# The steps to use this are similar to the "make cover" above
|
# The steps to use this are similar to the "make cover" above
|
||||||
|
.PHONY: gcov
|
||||||
gcov:
|
gcov:
|
||||||
gcov $(N2N_OBJS)
|
gcov $(N2N_OBJS)
|
||||||
$(MAKE) -C tools gcov
|
$(MAKE) -C tools gcov
|
||||||
|
|
||||||
# This is a convinent target to use during development or from a CI/CD system
|
# This is a convinent target to use during development or from a CI/CD system
|
||||||
|
.PHONY: build-dep
|
||||||
build-dep:
|
build-dep:
|
||||||
ifeq ($(CONFIG_TARGET),generic)
|
ifeq ($(CONFIG_TARGET),generic)
|
||||||
sudo apt install $(BUILD_DEP)
|
sudo apt install $(BUILD_DEP)
|
||||||
|
@ -231,11 +235,13 @@ else
|
||||||
echo Not attempting to install dependancies for system $(CONFIG_TARGET)
|
echo Not attempting to install dependancies for system $(CONFIG_TARGET)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(N2N_OBJS) $(N2N_LIB) $(APPS) $(DOCS) $(COVERAGEDIR)/ *.dSYM *~
|
rm -rf $(N2N_OBJS) $(N2N_LIB) $(APPS) $(DOCS) $(COVERAGEDIR)/ *.dSYM *~
|
||||||
rm -f tests/*.out src/*.gcno src/*.gcda
|
rm -f tests/*.out src/*.gcno src/*.gcda
|
||||||
for dir in $(SUBDIRS); do $(MAKE) -C $$dir clean; done
|
for dir in $(SUBDIRS); do $(MAKE) -C $$dir clean; done
|
||||||
|
|
||||||
|
.PHONY: distclean
|
||||||
distclean:
|
distclean:
|
||||||
rm -f tests/*.out src/*.gcno src/*.gcda src/*.indent src/*.unc-backup*
|
rm -f tests/*.out src/*.gcno src/*.gcda src/*.indent src/*.unc-backup*
|
||||||
rm -rf autom4te.cache/
|
rm -rf autom4te.cache/
|
||||||
|
@ -246,6 +252,7 @@ distclean:
|
||||||
rm -f packages/rpm/config.log packages/rpm/config.status
|
rm -f packages/rpm/config.log packages/rpm/config.status
|
||||||
rm -f $(addprefix src/,$(APPS))
|
rm -f $(addprefix src/,$(APPS))
|
||||||
|
|
||||||
|
.PHONY: install
|
||||||
install: edge supernode edge.8.gz supernode.1.gz n2n.7.gz
|
install: edge supernode edge.8.gz supernode.1.gz n2n.7.gz
|
||||||
echo "MANDIR=$(MANDIR)"
|
echo "MANDIR=$(MANDIR)"
|
||||||
$(MKDIR) $(SBINDIR) $(MAN1DIR) $(MAN7DIR) $(MAN8DIR)
|
$(MKDIR) $(SBINDIR) $(MAN1DIR) $(MAN7DIR) $(MAN8DIR)
|
||||||
|
@ -261,6 +268,7 @@ DOCKER_IMAGE_NAME=ntop/supernode
|
||||||
DOCKER_IMAGE_VERSION=$N2N_VERSION_SHORT
|
DOCKER_IMAGE_VERSION=$N2N_VERSION_SHORT
|
||||||
N2N_COMMIT_HASH=$(shell scripts/version.sh hash)
|
N2N_COMMIT_HASH=$(shell scripts/version.sh hash)
|
||||||
|
|
||||||
|
.PHONY: default steps build push
|
||||||
default: steps
|
default: steps
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user