Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
H
hdl-make
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
misc
hdl-make
Commits
6b7aa78e
Commit
6b7aa78e
authored
May 04, 2013
by
Pawel Szostek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Makefile: add release generation
Conflicts: Makefile
parent
20c784df
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
34 deletions
+33
-34
.gitignore
.gitignore
+1
-0
Makefile
Makefile
+24
-15
embed_build_id.sh
embed_build_id.sh
+3
-15
hdlmake
hdlmake
+0
-0
global_mod.py
src/global_mod.py
+0
-3
msg.py
src/msg.py
+5
-1
No files found.
.gitignore
View file @
6b7aa78e
misc
src/build_hash.py
examples
Makefile
View file @
6b7aa78e
# -*- coding: utf-8 -*-
#
# Copyright (c) 2011 Pawel Szostek (pawel.szostek@cern.ch)
#
# This source code is free software; you can redistribute it
...
...
@@ -17,24 +15,35 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
#
SRC
:=
configparser.py connection.py dep_solver.py fetch.py
\
SRC
_FILES
:=
configparser.py connection.py dep_solver.py fetch.py
\
flow.py flow_altera.py global_mod.py hdlmake_kernel.py
\
__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
PREFIX
:=
src
ARCH
:=
hdlmake
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
$(ARCH)
:
$(foreach src
,
$(SRC)
,
$(PREFIX)/$(src)) Makefile
executable
:
$(EXEC)
$(EXEC)
:
$(SRC)
bash embed_build_id.sh
cd
$(PREFIX)
&&
\
zip
$(ARCH)
$(SRC)
&&
\
echo
'#!/usr/bin/python'
>
$(ARCH)
&&
\
cat
$(ARCH)
.zip
>>
$(ARCH)
&&
\
rm
$(ARCH)
.zip
&&
\
mv
$(ARCH)
..
chmod
+x
$(ARCH)
cd
$(SRC_DIR)
&&
\
zip
$(EXEC)
build_hash.py
$(SRC_FILES)
&&
\
echo
'#!/usr/bin/python'
>
$(EXEC)
&&
\
cat
$(EXEC)
.zip
>>
$(EXEC)
&&
\
rm
$(EXEC)
.zip
&&
\
chmod
+x
$(EXEC)
&&
\
mv
$(EXEC)
..
release
:
$(RELEASE)
$(RELEASE)
:
$(EXEC) $(SRC)
tar
-zcvf
$@
*
.PHONY
:
clean
clean
:
rm
-f
$(PREFIX)
/
*
~
$(PREFIX)
/
*
pyc
\ No newline at end of file
rm
-f
$(SRC_DIR)
/
*
~
$(PREFIX)
/
*
pyc
$(EXEC)
hdlmake-
*
.tar.gz
embed_build_id.sh
View file @
6b7aa78e
...
...
@@ -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 @
6b7aa78e
No preview for this file type
src/global_mod.py
View file @
6b7aa78e
...
...
@@ -22,7 +22,4 @@
options
=
None
top_module
=
None
global_target
=
"''"
#######
#this var is modified by the build makefile - DON'T TOUCH IT!
BUILD_ID
=
"2013Jan23:405c28"
######
src/msg.py
View file @
6b7aa78e
...
...
@@ -21,6 +21,10 @@
import
global_mod
try
:
from
build_hash
import
BUILD_ID
except
:
BUILD_ID
=
"unrecognized"
import
time
import
os
import
sys
...
...
@@ -52,7 +56,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