Skip to content

Commit 5fa84f1

Browse files
committed
Release 0.5.7
* Updated makefiles: added `make tree` target.
2 parents c9b1461 + 6abc93e commit 5fa84f1

File tree

6 files changed

+69
-17
lines changed

6 files changed

+69
-17
lines changed

CHANGELOG

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
* RECENT CHANGES
33
*******************************************************************************
44

5+
=== 0.5.7 ===
6+
* Updated makefiles: added `make tree` target.
7+
58
=== 0.5.6 ===
69
* Added build of static library.
710
* Source code now more properly references LGPL3+ license.

Makefile

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ include $(BASEDIR)/project.mk
3939
CHK_CONFIG = test -f "$(CONFIG)" || (echo "System not properly configured. Please launch 'make config' first" && exit 1)
4040

4141
.DEFAULT_GOAL := all
42-
.PHONY: all compile install uninstall depend clean
42+
.PHONY: all compile install uninstall depend clean chkconfig
4343

4444
compile all install uninstall depend:
4545
@$(CHK_CONFIG)
@@ -51,15 +51,22 @@ clean:
5151
@echo "Clean OK"
5252

5353
# Module-related tasks
54-
.PHONY: fetch prune
54+
.PHONY: fetch tree prune
5555
fetch:
56-
@echo "Fetching source code dependencies"
56+
@$(CHK_CONFIG)
57+
@echo "Fetching desired source code dependencies"
5758
@$(MAKE) -s -f "make/modules.mk" $(@) BASEDIR="$(BASEDIR)" CONFIG="$(CONFIG)"
5859
@echo "Fetch OK"
60+
61+
tree:
62+
@echo "Fetching all possible source code dependencies"
63+
@$(MAKE) -s -f "make/modules.mk" $(@) BASEDIR="$(BASEDIR)" CONFIG="$(CONFIG)" TREE="1"
64+
@echo "Fetch OK"
5965

6066
prune: clean
6167
@echo "Pruning the whole project tree"
6268
@$(MAKE) -s -f "make/modules.mk" prune BASEDIR="$(BASEDIR)" CONFIG="$(CONFIG)"
69+
@$(MAKE) -s -f "make/modules.mk" prune BASEDIR="$(BASEDIR)" TREE="1"
6370
@-rm -rf "$(CONFIG)"
6471
@echo "Prune OK"
6572

@@ -78,10 +85,13 @@ help:
7885
@echo " clean Clean all build files and configuration file"
7986
@echo " config Configure build"
8087
@echo " depend Update build dependencies for current project"
81-
@echo " fetch Fetch all source code dependencies from git"
88+
@echo " fetch Fetch all desired source code dependencies from git"
8289
@echo " help Print this help message"
8390
@echo " info Output build configuration"
8491
@echo " install Install all binaries into the system"
92+
@echo " prune Cleanup build and all fetched dependencies from git"
93+
@echo " tree Fetch all possible source code dependencies from git"
94+
@echo " to make source code portable between machines"
8595
@echo " uninstall Uninstall binaries"
8696
@echo ""
8797
@$(MAKE) -s -f "$(BASEDIR)/make/configure.mk" $(@)

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,13 @@ To clean the whole project tree including configuration files, run:
9898
make prune
9999
```
100100

101+
To fetch all possible dependencies and make the source code tree portable between
102+
different architectures and platforms, run:
103+
104+
```bash
105+
make tree
106+
```
107+
101108
Usage
102109
======
103110

include/lsp-plug.in/dsp/version.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
// Define version of headers
2626
#define LSP_DSP_LIB_MAJOR 0
2727
#define LSP_DSP_LIB_MINOR 5
28-
#define LSP_DSP_LIB_MICRO 6
28+
#define LSP_DSP_LIB_MICRO 7
2929

3030
#ifdef LSP_DSP_LIB_BUILTIN
3131
#define LSP_DSP_LIB_CPPEXPORT

make/modules.mk

Lines changed: 35 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,42 @@
2121
BASEDIR := $(CURDIR)
2222
CONFIG := $(CURDIR)/.config.mk
2323

24-
include $(CONFIG)
24+
include $(BASEDIR)/dependencies.mk
25+
-include $(CONFIG)
2526
include $(BASEDIR)/project.mk
2627

27-
DEPENDENCIES += $(TEST_DEPENDENCIES)
28+
SYS_DEPENDENCIES = $(DEPENDENCIES) $(TEST_DEPENDENCIES)
29+
30+
# Find the proper branch of the GIT repository
31+
ifeq ($(TREE),1)
32+
MODULES := $(BASEDIR)/modules
33+
GIT := git
34+
35+
ifeq ($(findstring -devel,$(ARTIFACT_VERSION)),-devel)
36+
$(foreach dep, $(ALL_DEPENDENCIES), \
37+
$(eval $(dep)_BRANCH=devel) \
38+
$(eval $(dep)_PATH=$(MODULES)/$($(dep)_NAME)) \
39+
)
40+
else
41+
$(foreach dep, $(ALL_DEPENDENCIES), \
42+
$(eval $(dep)_BRANCH="$($(dep)_NAME)-$($(dep)_VERSION)") \
43+
$(eval $(dep)_PATH=$(MODULES)/$($(dep)_NAME)) \
44+
)
45+
endif
46+
endif
2847

2948
# Form list of modules, exclude all modules that have 'system' version
30-
SRC_MODULES = $(foreach dep, $(DEPENDENCIES), $(if $(findstring src,$($(dep)_TYPE)),$(dep)))
31-
HDR_MODULES = $(foreach dep, $(DEPENDENCIES), $(if $(findstring hdr,$($(dep)_TYPE)),$(dep)))
49+
SRC_MODULES = $(foreach dep, $(SYS_DEPENDENCIES), $(if $(findstring src,$($(dep)_TYPE)),$(dep)))
50+
HDR_MODULES = $(foreach dep, $(SYS_DEPENDENCIES), $(if $(findstring hdr,$($(dep)_TYPE)),$(dep)))
51+
ALL_SRC_MODULES = $(foreach dep, $(ALL_DEPENDENCIES), $(if $(findstring src,$($(dep)_TYPE)),$(dep)))
52+
ALL_HDR_MODULES = $(foreach dep, $(ALL_DEPENDENCIES), $(if $(findstring hdr,$($(dep)_TYPE)),$(dep)))
53+
ALL_PATHS = $(foreach dep, $(ALL_SRC_MODULES) $(ALL_HDR_MODULES), $($(dep)_PATH))
3254

3355
# Branches
34-
.PHONY: $(SRC_MODULES) $(HDR_MODULES)
56+
.PHONY: $(ALL_SRC_MODULES) $(ALL_HDR_MODULES) $(ALL_PATHS)
3557
.PHONY: fetch prune clean
3658

37-
$(SRC_MODULES) $(HDR_MODULES):
59+
$(ALL_SRC_MODULES) $(ALL_HDR_MODULES):
3860
@echo "Cloning $($(@)_URL) -> $($(@)_PATH) [$($(@)_BRANCH)]"
3961
@test -f "$($(@)_PATH)/.git/config" || $(GIT) clone "$($(@)_URL)" "$($(@)_PATH)"
4062
@$(GIT) -C "$($(@)_PATH)" reset --hard
@@ -43,12 +65,17 @@ $(SRC_MODULES) $(HDR_MODULES):
4365
@$(GIT) -c advice.detachedHead=false -C "$($(@)_PATH)" checkout origin/$($(@)_BRANCH) || \
4466
$(GIT) -c advice.detachedHead=false -C "$($(@)_PATH)" checkout refs/tags/$($(@)_BRANCH)
4567

68+
$(ALL_PATHS):
69+
@echo "Removing $(notdir $(@))"
70+
@-rm -rf $(@)
71+
4672
fetch: $(SRC_MODULES) $(HDR_MODULES)
4773

74+
tree: $(ALL_SRC_MODULES) $(ALL_HDR_MODULES)
75+
4876
clean:
4977
@echo rm -rf "$($(ARTIFACT_VARS)_BIN)/$(ARTIFACT_NAME)"
5078
@-rm -rf "$($(ARTIFACT_VARS)_BIN)/$(ARTIFACT_NAME)"
5179

52-
prune:
53-
@-find 'modules' -mindepth 1 -maxdepth 1 -type d -exec rm -rf '{}' \;
80+
prune: $(ALL_PATHS)
5481

project.mk

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,18 @@ ARTIFACT_DESC = DSP library for digital signal processing
2323
ARTIFACT_NAME = lsp-dsp-lib
2424
ARTIFACT_VARS = LSP_DSP_LIB
2525
ARTIFACT_HEADERS = lsp-plug.in
26-
ARTIFACT_VERSION = 0.5.6
26+
ARTIFACT_VERSION = 0.5.7
2727

2828
# List of dependencies
29+
DEPENDENCIES = \
30+
STDLIB \
31+
LSP_COMMON_LIB
32+
2933
TEST_DEPENDENCIES = \
3034
TEST_STDLIB \
3135
LSP_TEST_FW
3236

33-
DEPENDENCIES = \
34-
STDLIB \
35-
LSP_COMMON_LIB
37+
# All possible dependencies
38+
ALL_DEPENDENCIES = \
39+
$(DEPENDENCIES) \
40+
$(TEST_DEPENDENCIES)

0 commit comments

Comments
 (0)