3d89b8 build system: when present, use the git refdir as a version.tag dependency.

Authored and Committed by midipix 8 years ago
    build system: when present, use the git refdir as a version.tag dependency.
    
        
file modified
+2 -1
Makefile.in CHANGED
@@ -1,5 +1,6 @@
1
1
PACKAGE = @package@
2
2
PROJECT_DIR = @project_dir@
3
+ GIT_REFERENCE_DIR = @git_reference_dir@
3
4
4
5
BUILD = @build@
5
6
HOST = @host@
@@ -177,7 +178,7 @@ host.tag: Makefile
177
178
$(PROJECT_DIR)/sysinfo/host/host.sh --compiler="$(CC)" --cflags="$(CFLAGS)"
178
179
touch host.tag
179
180
180
- version.tag:
181
+ version.tag: $(GIT_REFERENCE_DIR)
181
182
$(PROJECT_DIR)/sysinfo/version.sh \
182
183
-s $(PROJECT_DIR) \
183
184
-o build/$(PACKAGE)_version.h \
file modified
+6 -0
configure CHANGED
@@ -28,6 +28,11 @@ init_vars()
28
28
. "$mb_config" || exit 2
29
29
fi
30
30
31
+ # git
32
+ if [ -d "$mb_project_dir/.git" ]; then
33
+ mb_git_reference_dir="\$(PROJECT_DIR)/.git"
34
+ fi
35
+
31
36
# dirs
32
37
mb_prefix=$PREFIX
33
38
mb_exec_prefix=$EXEC_PREFIX
@@ -304,6 +309,7 @@ config_copy()
304
309
{
305
310
sed -e 's^@package@^'"$mb_package"'^g' \
306
311
-e 's^@project_dir@^'"$mb_project_dir"'^g' \
312
+ -e 's^@git_reference_dir@^'"$mb_git_reference_dir"'^g' \
307
313
\
308
314
-e 's^@build@^'"$mb_build"'^g' \
309
315
-e 's^@host@^'"$mb_host"'^g' \