Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
Hdlmake
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
15
Issues
15
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
Hdlmake
Commits
fbfab7c7
Commit
fbfab7c7
authored
May 04, 2013
by
Pawel Szostek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Makefile: add release generation
Conflicts: Makefile
parent
349d03a1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
17 additions
and
23 deletions
+17
-23
.gitignore
.gitignore
+1
-0
Makefile
Makefile
+5
-7
embed_build_id.sh
embed_build_id.sh
+3
-15
hdlmake
hdlmake
+0
-0
global_mod.py
src/global_mod.py
+3
-0
msg.py
src/msg.py
+5
-1
No files found.
.gitignore
View file @
fbfab7c7
misc
src/build_hash.py
examples
hdlmake.aux
hdlmake.pdf
...
...
Makefile
View file @
fbfab7c7
# -*- coding: utf-8 -*-
#
# Copyright (c) 2011 Pawel Szostek (pawel.szostek@cern.ch)
#
# This source code is free software; you can redistribute it
...
...
@@ -23,16 +21,16 @@ __main__.py makefile_writer.py manifest_parser.py module.py msg.py path.py \
srcfile.py vlog_parser.py new_dep_solver.py
SRC_DIR
:=
src
SRC
=
$
(
foreach src,
$(SRC_FILES)
,
$(SRC_DIR)
/
$(src)
)
TAG
:=
$(
shell
git describe
--abbrev
=
0
--tags
)
RELEASE
:
=
hdlmake-
$(TAG)
.tar.gz
SRC
:
=
$
(
foreach src,
$(SRC_FILES)
,
$(SRC_DIR)
/
$(src)
)
TAG
=
$(
shell
git describe
--abbrev
=
0
--tags
--always
)
#get the latest tag
RELEASE
=
hdlmake-
$(TAG)
.tar.gz
EXEC
:=
hdlmake
executable
:
$(EXEC)
$(EXEC)
:
$(SRC)
bash embed_build_id.sh
cd
$(SRC_DIR)
&&
\
zip
$(EXEC)
$(SRC_FILES)
&&
\
zip
$(EXEC)
build_hash.py
$(SRC_FILES)
&&
\
echo
'#!/usr/bin/python'
>
$(EXEC)
&&
\
cat
$(EXEC)
.zip
>>
$(EXEC)
&&
\
rm
$(EXEC)
.zip
&&
\
...
...
@@ -46,5 +44,5 @@ $(RELEASE): $(EXEC) $(SRC)
.PHONY
:
clean
clean
:
rm
-f
$(
PREFIX
)
/
*
~
$(PREFIX)
/
*
pyc
$(EXEC)
hdlmake-
*
.tar.gz
rm
-f
$(
SRC_DIR
)
/
*
~
$(PREFIX)
/
*
pyc
$(EXEC)
hdlmake-
*
.tar.gz
embed_build_id.sh
View file @
fbfab7c7
...
...
@@ -6,19 +6,7 @@ commit_string=$(echo $commit_line | awk '{print $2}')
date_line
=
$(
git log |
head
-3
|
tail
-1
)
date_string
=
$(
echo
$date_line
|
awk
'{print $6 $3 $4}'
)
embed_string
=
$(
echo
"
$date_string
:
${
commit_string
:0:6
}
"
)
embed_string
=
'"'
$(
echo
"
$date_string
:
${
commit_string
:0:6
}
"
)
'"'
if
[
!
-f
src/global_mod.py
]
;
then
echo
"Can't find src/global_mod.py file to put the versionID inside"
exit
1
fi
global_mod_path
=
"src/global_mod.py"
sed
's/^BUILD_ID =.*$/BUILD_ID = \"'
$embed_string
'"/'
$global_mod_path
>
${
global_mod_path
}
_TMP
rm
$global_mod_path
mv
${
global_mod_path
}
_TMP
$global_mod_path
if
[
!
-f
src/global_mod.py
]
;
then
echo
"Shit! Something went wrong. Better check what happened to
$global_mod_path
"
exit
1
fi
\ No newline at end of file
build_hash_path
=
"src/build_hash.py"
echo
'BUILD_ID = '
"
$embed_string
"
>
$build_hash_path
hdlmake
View file @
fbfab7c7
No preview for this file type
src/global_mod.py
View file @
fbfab7c7
...
...
@@ -22,7 +22,10 @@
options
=
None
top_module
=
None
global_target
=
"''"
<<<<<<<
HEAD
#######
#this var is modified by the build makefile - DON'T TOUCH IT!
BUILD_ID
=
"2013Feb22:341efe"
=======
>>>>>>>
Makefile
:
add
release
generation
######
src/msg.py
View file @
fbfab7c7
...
...
@@ -21,6 +21,10 @@
import
global_mod
try
:
from
build_hash
import
BUILD_ID
except
:
BUILD_ID
=
"unrecognized"
import
time
import
pprint
as
prettyprinter
...
...
@@ -58,7 +62,7 @@ def vpprint(msg):
pp
.
pprint
(
msg
)
def
print_version
():
rawprint
(
"Hdlmake build "
+
global_mod
.
BUILD_ID
)
rawprint
(
"Hdlmake build "
+
BUILD_ID
)
def
print_action_help
():
rawprint
(
"`Action' variable was not specified"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment