Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
purr-data
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sanket Bhukan
purr-data
Commits
df7f0838
Commit
df7f0838
authored
7 years ago
by
Albert Gräf
Browse files
Options
Downloads
Patches
Plain Diff
Add a dist target to the toplevel Makefile.
parent
ff9e9a09
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Makefile
+38
-0
38 additions, 0 deletions
Makefile
with
38 additions
and
0 deletions
Makefile
+
38
−
0
View file @
df7f0838
...
@@ -31,6 +31,8 @@
...
@@ -31,6 +31,8 @@
# NOTE: this target only works in a working copy of the git repo, not in
# NOTE: this target only works in a working copy of the git repo, not in
# static tarball snapshots of the source
# static tarball snapshots of the source
.PHONY
:
all incremental checkout clean realclean dist
all
:
all
:
cd
l2ork_addons
&&
./tar_em_up.sh
-Tk
cd
l2ork_addons
&&
./tar_em_up.sh
-Tk
...
@@ -58,3 +60,39 @@ realclean:
...
@@ -58,3 +60,39 @@ realclean:
git
submodule
deinit
--all
-f
git
submodule
deinit
--all
-f
git
checkout
.
git
checkout
.
git
clean
-dff
git
clean
-dff
# Build a self-contained distribution tarball (snapshot). This is pretty much
# the same as in debuild/Makefile and must be run in a working copy of the git
# repo.
# The Debian version gets derived from the date and serial number of the last
# commit. You can print it with 'make debversion'.
debversion
=
$(
shell
grep
PD_L2ORK_VERSION pd/src/m_pd.h |
sed
's|^.define *PD_L2ORK_VERSION *"\(.*\)".*|\1|'
)
+git
$(
shell
test
-d
.git
&&
git rev-list
--count
HEAD
)
+
$(
shell
test
-d
.git
&&
git rev-parse
--short
HEAD
)
# Source tarball and folder.
debsrc
=
purr-data_
$(
debversion
)
.orig.tar.gz
debdist
=
purr-data-
$(
debversion
)
# Submodules (Gem, etc.).
submodules
=
$(
sort
$(
shell
test
-d
.git
&&
(
git config
--file
.gitmodules
--get-regexp
path |
awk
'{ print $$2
}
'
)
))
dist
:
$(debsrc)
# Determine the build version which needs git to be computed, so we can't do
# it in a stand-alone build from a tarball.
PD_BUILD_VERSION
:=
$(
shell
test
-d
.git
&&
(
git log
-1
--format
=
%cd
--date
=
short |
sed
-e
's/-//g'
)
)
-rev
.
$(
shell
test
-d
.git
&&
git rev-parse
--short
HEAD
)
$(debsrc)
:
test
-d
.git
||
(
echo
"Not a git repository, bailing out."
&&
false
)
rm
-rf
$(
debdist
)
# Make sure that the submodules are initialized.
git
submodule
update
--init
# Grab the main source.
git
archive
--format
=
tar.gz
--prefix
=
$(
debdist
)
/ HEAD |
tar
xfz -
# Grab the submodules.
for
x
in
$(submodules);
do
(cd
$(debdist)
&&
rm
-rf
$$x
&&
git
-C
../$$x
archive
--format
=
tar.gz
--prefix
=
$$
x/ HEAD |
tar
xfz -
)
;
done
# Pre-generate and put s_stuff.h into the tarball (see above; the build
# version is generated using git which can't be done outside the git repo).
sed
's|^\(#define PD_BUILD_VERSION "\).*"|\1$(PD_BUILD_VERSION)"|'
pd/src/s_stuff.h.in
>
$(debdist)/pd/src/s_stuff.h
# Create the source tarball.
tar
cfz
$(debsrc)
$(debdist)
rm
-rf
$(debdist)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment