Difference between revisions of "Dev:Build Instructions"

From Synfig Studio :: Documentation
Jump to: navigation, search
m (synfig: line was 625 not 622 for me)
(Update for git repo.)
Line 4: Line 4:
 
== Notes ==
 
== Notes ==
  
If you are using the released versions instead of SVN, none of the libtoolize or autoreconf steps are necessary. For released versions, "./configure && make && sudo make install" should be enough.
+
* If you are using the released versions instead of GIT, none of the libtoolize or autoreconf steps are necessary. For released versions, "./configure && make && sudo make install" should be enough.
  
If you are using packages for synfig's dependencies, you want the '''development packages''' not the main packages. Check below for your distribution's packages.
+
* If you are using packages for synfig's dependencies, you want the '''development packages''' not the main packages. Check below for your distribution's packages.
  
Please read the [[Source code|source code]] page to check out the latest code. Please also check the [[Download|download page]] and the [[FAQ]] to find out about any issues that you may run into along the way.
+
* Please read the [[Source code|source code]] page to check out the latest code. Please also check the [[Download|download page]] and the [[FAQ]] to find out about any issues that you may run into along the way.
  
Some Linux/BSD distros have a pkg-config that doesn't look in /usr/local/lib/pkgconfig by default. So if you are installing in anywhere other than the system pkg-config path, please run "export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig" or similar before building or installing anything.
+
* Some Linux/BSD distros have a pkg-config that doesn't look in /usr/local/lib/pkgconfig by default. So if you are installing in anywhere other than the system pkg-config path, please run "export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig" or similar before building or installing anything.
  
Don't use automake 1.4, there are problems with it.
+
* Don't use automake 1.4, there are problems with it.
  
Using automake 1.9, 'make install' seems to re-link and re-install all the synfig core modules every time whether they have changed or not. [http://dooglus.rincevent.net/synfig/automake.html here] is an ugly workaround - it's only worth using if you intend to rebuild synfig repeatedly
+
* Using automake 1.9, 'make install' seems to re-link and re-install all the synfig core modules every time whether they have changed or not. If you intend to build code repetitively you can export export CXX="/usr/bin/ccache /usr/bin/g++". This allows to not rebuild the already build modules so they taken from the cache.
  
The instructions below result in 3 separate subversion working directories being created.  This is inconvenient to work with - you'll need to 'svn commit' in 3 different places to send changes, 'svn update' in 3 different places to get the latest updates, etc. [[Subversion|This page]] shows how to arrange for the code to be checked out into a single working directory. You can also download a daily updated tarball that uses this from the [[Source code|source code]] page.
+
* After you obtain the source code using the git repository, you obtain a single 'synfig' folder where the three main modules (etl, synfig-core and synfig-studio) are up to date. Those three modules keep a ancient "trunk" intermediate folder before the real code. I hope this is fixed in future versions.
  
The CVS requirement is only because the autopoint program run by autoreconf needs CVS. You can avoid the need for CVS by disabling the translation/gettext stuff in configure.ac.
+
* If you want to test a particular branch of the repository do the following:
 
+
<pre>
If you don't want to install to a system-wide directory using sudo, run something like these commands before starting:
+
~/synfig$ git branch -r
 +
</pre>
 +
You'll obtain a list of the remote branches that exists in the repo. For example:
 +
<pre>
 +
  origin/HEAD
 +
  origin/genete_bones
 +
  origin/genete_canvasview
 +
  origin/genete_master
 +
  origin/genete_onionskin
 +
  origin/genete_scale_reverse
 +
  origin/genete_setup_dialog
 +
  origin/genete_svg
 +
  origin/gerco_opengl
 +
  origin/master
 +
  origin/uiomae_opengl
 +
  origin/zelgadis_cia
 +
  origin/zelgadis_master
 +
</pre>
  
 +
Then to checkout properly a remote branch you have to create a local branch to track a particular remote branch and checkout it. For example:
 
<pre>
 
<pre>
export PREFIX="$HOME/opt"
+
~/synfig$ git branch --track test_canvas origin/genete_canvasview
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:$PREFIX/lib/pkgconfig"
+
~/synfig$ git checkout test_canvas
export PATH="$PATH:$PREFIX/bin"
+
 
</pre>
 
</pre>
  
And when you run ./configure, run it with --prefix="$PREFIX" and don't use sudo when you do make install.
+
Your code is ready to be built on that branch.
  
=== Automatic build/update script ===
+
* The CVS requirement is only because the autopoint program run by autoreconf needs CVS. You can avoid the need for CVS by disabling the translation/gettext stuff in configure.ac.
  
You can use [http://zelgadis.profusehost.net/files/synfig/synfigstudio-svn-build this] script to quickly build/update synfigstudio from SVN (software installed in ~/synfig-svn by default).
+
* If you don't want to install to a system-wide directory using sudo, run something like these commands before starting:
  
To use the script just execute following single command in terminal:
+
<pre>
<pre>cd && \
+
prefix=$(pwd)/install
wget http://zelgadis.profusehost.net/files/synfig/synfigstudio-svn-build && \
+
export PKG_CONFIG_PATH="$prefix/lib/pkgconfig"
chmod +x synfigstudio-svn-build && \
+
export PATH=$(pwd)/synfig-core/trunk/src/tool/.libs:$PATH
./synfigstudio-svn-build initialize</pre>
+
export CXX="/usr/bin/ccache /usr/bin/g++"
 +
</pre>
  
'''WARNING:''' Your system must satisfy synfig's build requiments, the sript won't do it for you.
+
** export PKG_CONFIG_PATH="$prefix/lib/pkgconfig" allos to find the linking libraries.
 +
** export PATH=$(pwd)/synfig-core/trunk/src/tool/.libs:$PATH allows synfigstudio find the correct * libraries to render the icons for the toolbox etc.
 +
** export CXX="/usr/bin/ccache /usr/bin/g++" allows to use the cache to avoid rebuilding.
  
=== System-specific instructions ===
+
And when you run ./configure, run it with --prefix="$PREFIX" and don't use sudo when you do make install.
 +
 
 +
* See the automatic building script attached.
 +
 
 +
== System-specific instructions ==
 +
Please update them including the new GIT repo.
  
 
* Gentoo: SVN [[Gentoo Ebuilds|ebuilds]] are available
 
* Gentoo: SVN [[Gentoo Ebuilds|ebuilds]] are available
Line 49: Line 74:
 
* Windows: [[Windows build instructions|instructions for building]] in [[Mingw_installation|mingw]] are available.
 
* Windows: [[Windows build instructions|instructions for building]] in [[Mingw_installation|mingw]] are available.
  
== ETL ==
+
==System wide build Instructions==
 +
 
 +
=== ETL ===
  
 
ETL is a template library, there is nothing to build really, it just needed to be installed.
 
ETL is a template library, there is nothing to build really, it just needed to be installed.
  
Requires: autoconf automake<br>
+
'''Requires''': autoconf automake<br>
 
* Debian: build-essential autoconf automake
 
* Debian: build-essential autoconf automake
  
''Type the following commands at the directory that holds '''ETL:'''''
+
''Type the following commands at the directory where you cloned the git repo''
 
<pre>
 
<pre>
 +
$ cd synfig/ETL/trunk
 
$ autoreconf --install --force
 
$ autoreconf --install --force
 
$ ./configure
 
$ ./configure
Line 63: Line 91:
 
</pre>
 
</pre>
  
== synfig ==
+
=== synfig-core ===
  
Requires: ETL (etl-dev, already installed if you successfully built etl), libxml++, libsigc++, libltdl, libtool, gettext, cvs<br>
+
'''Requires''': ETL (etl-dev, already installed if you successfully built etl), libxml++, libsigc++, libltdl, libtool, gettext, cvs<br>
 
* Debian: etl-dev libxml++2.6-dev libsigc++-2.0-dev libltdl3-dev libtool gettext cvs
 
* Debian: etl-dev libxml++2.6-dev libsigc++-2.0-dev libltdl3-dev libtool gettext cvs
 
* Gentoo: virtual/ETL dev-cpp/libxmlpp dev-libs/libsigc++ dev-util/cvs
 
* Gentoo: virtual/ETL dev-cpp/libxmlpp dev-libs/libsigc++ dev-util/cvs
 
** If you are using ./configure --prefix="$PREFIX" to configure synfig, do not install virtual/ETL.
 
** If you are using ./configure --prefix="$PREFIX" to configure synfig, do not install virtual/ETL.
  
Note: libpng isn't required to build synfig, but if you build synfig without PNG support and go on to build synfigstudio, that step will fail (because the build process for synfigstudio uses synfig to create .png icon files).  The package is  libpng12-dev on Debian or media-libs/libpng on Gentoo.
+
'''Note''': libpng isn't required to build synfig, but if you build synfig without PNG support and go on to build synfigstudio, that step will fail (because the build process for synfigstudio uses synfig to create .png icon files).  The package is  libpng12-dev on Debian or media-libs/libpng on Gentoo.
  
Note: the 'configure.ac' file in the synfig-core directory doesn't work with libtool version 2, as shipped with ubuntu 8.10.  To work around the problem until a proper fix is found, comment out line 622 or thereabouts (it says "AC_CONFIG_SUBDIRS(libltdl)") by putting a "#" at the front of the line.  The line is required for older versions of libtool, as shipped with other distributions.
+
'''Note''': the 'configure.ac' file in the synfig-core directory doesn't work with libtool version 2, as shipped with ubuntu 8.10.  To work around the problem until a proper fix is found, comment out line 622 or thereabouts (it says "AC_CONFIG_SUBDIRS(libltdl)") by putting a "#" at the front of the line.  The line is required for older versions of libtool, as shipped with other distributions. DO it straight with this command:
 +
<pre> sed -i 's/^AC_CONFIG_SUBDIRS/# AC_CONFIG_SUBDIRS/' synfig-core/trunk/configure.ac </pre>
  
Optional: libpng, libmng, libjpeg, libfreetype, libfontconfig, libopenexr, libavcodec, libmagick++, vimage (MacOS only, proprietary)<br>
+
'''Optional''': libpng, libmng, libjpeg, libfreetype, libfontconfig, libopenexr, libavcodec, libmagick++, vimage (MacOS only, proprietary)<br>
 
* Debian: libpng12-dev libmng-dev libjpeg62-dev libfreetype6-dev libfontconfig1-dev libopenexr-dev libavcodec-dev libavformat-dev libswscale-dev libmagick++9-dev
 
* Debian: libpng12-dev libmng-dev libjpeg62-dev libfreetype6-dev libfontconfig1-dev libopenexr-dev libavcodec-dev libavformat-dev libswscale-dev libmagick++9-dev
 
* Gentoo: sys-devel/libtool media-libs/libpng media-libs/libmng media-libs/jpeg media-libs/freetype media-libs/fontconfig media-libs/openexr media-libs/libavcodec
 
* Gentoo: sys-devel/libtool media-libs/libpng media-libs/libmng media-libs/jpeg media-libs/freetype media-libs/fontconfig media-libs/openexr media-libs/libavcodec
*Ubuntu (since Jaunty): Same libraries as Debian but do not use libmagick++9-dev, use graphicsmagick-libmagick-dev-compat instead.
+
*Ubuntu (since Jaunty): Same libraries as Debian but do not use libmagick++9-dev, use graphicsmagick-libmagick-dev-compat instead.  
Runtime: encodedv (from libdv), ffmpeg, convert (from imagemagick)
+
'''Runtime''': encodedv (from libdv), ffmpeg, convert (from imagemagick)
 
* Debian: libdv-bin ffmpeg imagemagick
 
* Debian: libdv-bin ffmpeg imagemagick
 
* Gentoo: media-libs/libdv media-video/ffmpeg media-gfx/imagemagick
 
* Gentoo: media-libs/libdv media-video/ffmpeg media-gfx/imagemagick
  
''Type the following commands at the directory that holds '''synfig-core:'''''
+
''Type the following commands at the directory where you cloned the git repo''
 
<pre>
 
<pre>
 +
$ cd synfig/synfig-core/trunk
 
$ libtoolize --ltdl --copy --force
 
$ libtoolize --ltdl --copy --force
 
$ autoreconf --install --force
 
$ autoreconf --install --force
Line 91: Line 121:
 
</pre>
 
</pre>
  
Notes:
+
''Note'':
  
 
* Don't use --enable-half, it is slow.
 
* Don't use --enable-half, it is slow.
  
== synfigstudio ==
+
=== synfig-studio ===
  
Requires: ETL (etl-dev, already installed if you successfully built etl), synfig (libsynfig-dev, already installed if you successfully built synfig), gtkmm >= 2.4, gtk >= 2.0, glibmm, libsigc++, libltdl, libtool, gettext, cvs<br>
+
''Requires'': ETL (etl-dev, already installed if you successfully built etl), synfig (libsynfig-dev, already installed if you successfully built synfig-core), gtkmm >= 2.4, gtk >= 2.0, glibmm, libsigc++, libltdl, libtool, gettext, cvs<br>
 
* Debian: etl-dev libsynfig-dev libgtkmm-2.4-dev libgtk2.0-dev libglibmm-2.4-dev libsigc++-2.0-dev libltdl3-dev libtool gettext cvs
 
* Debian: etl-dev libsynfig-dev libgtkmm-2.4-dev libgtk2.0-dev libglibmm-2.4-dev libsigc++-2.0-dev libltdl3-dev libtool gettext cvs
 
* Gentoo: virtual/ETL virtual/synfig dev-cpp/gtkmm-2.4 dev-libs/libsigc++ sys-devel/libtool
 
* Gentoo: virtual/ETL virtual/synfig dev-cpp/gtkmm-2.4 dev-libs/libsigc++ sys-devel/libtool
 
** If you are using ./configure --prefix="$PREFIX" to configure synfigstudio, do not install virtual/ETL or virtual/synfig.
 
** If you are using ./configure --prefix="$PREFIX" to configure synfigstudio, do not install virtual/ETL or virtual/synfig.
Optional: fonts (for the images), [http://www.fmod.org FMOD] (version 3.x, proprietary)
+
''Optional'': fonts (for the images), [http://www.fmod.org FMOD] (version 3.x, proprietary)
 
* Debian: ttf-freefont ttf-dejavu ttf-dustin
 
* Debian: ttf-freefont ttf-dejavu ttf-dustin
 
* Gentoo: freefonts dejavu
 
* Gentoo: freefonts dejavu
  
''Type the following commands at the directory that holds '''synfig-studio:'''''
+
''Type the following commands at the directory where you cloned the git repo''
 
<pre>
 
<pre>
 +
$ cd synfig/synfig-studio/trunk
 
$ autoreconf --install --force
 
$ autoreconf --install --force
 
$ ./configure
 
$ ./configure
Line 139: Line 170:
 
$ sudo ldconfig
 
$ sudo ldconfig
 
</pre>
 
</pre>
 +
 +
 +
=== Automatic build script ===
 +
 +
If you want to build a binary for testing or debugging proposes you can run this script:
 +
<pre>
 +
#!/bin/sh
 +
CPUS=4
 +
prefix=$(pwd)/install
 +
export PKG_CONFIG_PATH="$prefix/lib/pkgconfig"
 +
export PATH=$(pwd)/synfig-core/trunk/src/tool/.libs:$PATH
 +
export CXX="/usr/bin/ccache /usr/bin/g++"
 +
# export CXX="/usr/bin/ccache g++-snapshot"
 +
# this comments out the line in configure.ac if it isn't already commented. Needed for Ubuntu 8.10 or higher
 +
sed -i 's/^AC_CONFIG_SUBDIRS/# AC_CONFIG_SUBDIRS/' synfig-core/trunk/configure.ac
 +
 +
cd ETL/trunk &&
 +
autoreconf --install --force &&
 +
./configure --prefix $prefix &&
 +
make --debug=b install &&
 +
\
 +
cd ../../synfig-core/trunk &&
 +
libtoolize --ltdl --copy --force &&
 +
autoreconf --install --force &&
 +
./configure --prefix $prefix --enable-optimization=0 --enable-debug &&
 +
make --debug=b -j $CPUS install &&
 +
      \
 +
cd ../../synfig-studio/trunk &&
 +
autoreconf --install --force &&
 +
./configure --prefix $prefix --enable-optimization=0 --enable-debug &&
 +
make --debug=b -j $CPUS install
 +
</pre>
 +
 +
The binaries are installed at $(pwd)/install/bin. Alter the script according to your preferences.
 +
 +
Your system must satisfy synfig's build requiments, the sript won't do it for you. Also be sure what git branch are you building each time. In some cases you'll need to make clean on each folder first.

Revision as of 19:49, 13 July 2009


Notes

  • If you are using the released versions instead of GIT, none of the libtoolize or autoreconf steps are necessary. For released versions, "./configure && make && sudo make install" should be enough.
  • If you are using packages for synfig's dependencies, you want the development packages not the main packages. Check below for your distribution's packages.
  • Please read the source code page to check out the latest code. Please also check the download page and the FAQ to find out about any issues that you may run into along the way.
  • Some Linux/BSD distros have a pkg-config that doesn't look in /usr/local/lib/pkgconfig by default. So if you are installing in anywhere other than the system pkg-config path, please run "export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig" or similar before building or installing anything.
  • Don't use automake 1.4, there are problems with it.
  • Using automake 1.9, 'make install' seems to re-link and re-install all the synfig core modules every time whether they have changed or not. If you intend to build code repetitively you can export export CXX="/usr/bin/ccache /usr/bin/g++". This allows to not rebuild the already build modules so they taken from the cache.
  • After you obtain the source code using the git repository, you obtain a single 'synfig' folder where the three main modules (etl, synfig-core and synfig-studio) are up to date. Those three modules keep a ancient "trunk" intermediate folder before the real code. I hope this is fixed in future versions.
  • If you want to test a particular branch of the repository do the following:
~/synfig$ git branch -r 

You'll obtain a list of the remote branches that exists in the repo. For example:

  origin/HEAD
  origin/genete_bones
  origin/genete_canvasview
  origin/genete_master
  origin/genete_onionskin
  origin/genete_scale_reverse
  origin/genete_setup_dialog
  origin/genete_svg
  origin/gerco_opengl
  origin/master
  origin/uiomae_opengl
  origin/zelgadis_cia
  origin/zelgadis_master

Then to checkout properly a remote branch you have to create a local branch to track a particular remote branch and checkout it. For example:

~/synfig$ git branch --track test_canvas origin/genete_canvasview
~/synfig$ git checkout test_canvas

Your code is ready to be built on that branch.

  • The CVS requirement is only because the autopoint program run by autoreconf needs CVS. You can avoid the need for CVS by disabling the translation/gettext stuff in configure.ac.
  • If you don't want to install to a system-wide directory using sudo, run something like these commands before starting:
prefix=$(pwd)/install
export PKG_CONFIG_PATH="$prefix/lib/pkgconfig"
export PATH=$(pwd)/synfig-core/trunk/src/tool/.libs:$PATH
export CXX="/usr/bin/ccache /usr/bin/g++"
    • export PKG_CONFIG_PATH="$prefix/lib/pkgconfig" allos to find the linking libraries.
    • export PATH=$(pwd)/synfig-core/trunk/src/tool/.libs:$PATH allows synfigstudio find the correct * libraries to render the icons for the toolbox etc.
    • export CXX="/usr/bin/ccache /usr/bin/g++" allows to use the cache to avoid rebuilding.

And when you run ./configure, run it with --prefix="$PREFIX" and don't use sudo when you do make install.

  • See the automatic building script attached.

System-specific instructions

Please update them including the new GIT repo.

System wide build Instructions

ETL

ETL is a template library, there is nothing to build really, it just needed to be installed.

Requires: autoconf automake

  • Debian: build-essential autoconf automake

Type the following commands at the directory where you cloned the git repo

$ cd synfig/ETL/trunk
$ autoreconf --install --force
$ ./configure
$ sudo make install

synfig-core

Requires: ETL (etl-dev, already installed if you successfully built etl), libxml++, libsigc++, libltdl, libtool, gettext, cvs

  • Debian: etl-dev libxml++2.6-dev libsigc++-2.0-dev libltdl3-dev libtool gettext cvs
  • Gentoo: virtual/ETL dev-cpp/libxmlpp dev-libs/libsigc++ dev-util/cvs
    • If you are using ./configure --prefix="$PREFIX" to configure synfig, do not install virtual/ETL.

Note: libpng isn't required to build synfig, but if you build synfig without PNG support and go on to build synfigstudio, that step will fail (because the build process for synfigstudio uses synfig to create .png icon files). The package is libpng12-dev on Debian or media-libs/libpng on Gentoo.

Note: the 'configure.ac' file in the synfig-core directory doesn't work with libtool version 2, as shipped with ubuntu 8.10. To work around the problem until a proper fix is found, comment out line 622 or thereabouts (it says "AC_CONFIG_SUBDIRS(libltdl)") by putting a "#" at the front of the line. The line is required for older versions of libtool, as shipped with other distributions. DO it straight with this command:

 sed -i 's/^AC_CONFIG_SUBDIRS/# AC_CONFIG_SUBDIRS/' synfig-core/trunk/configure.ac 

Optional: libpng, libmng, libjpeg, libfreetype, libfontconfig, libopenexr, libavcodec, libmagick++, vimage (MacOS only, proprietary)

  • Debian: libpng12-dev libmng-dev libjpeg62-dev libfreetype6-dev libfontconfig1-dev libopenexr-dev libavcodec-dev libavformat-dev libswscale-dev libmagick++9-dev
  • Gentoo: sys-devel/libtool media-libs/libpng media-libs/libmng media-libs/jpeg media-libs/freetype media-libs/fontconfig media-libs/openexr media-libs/libavcodec
  • Ubuntu (since Jaunty): Same libraries as Debian but do not use libmagick++9-dev, use graphicsmagick-libmagick-dev-compat instead.

Runtime: encodedv (from libdv), ffmpeg, convert (from imagemagick)

  • Debian: libdv-bin ffmpeg imagemagick
  • Gentoo: media-libs/libdv media-video/ffmpeg media-gfx/imagemagick

Type the following commands at the directory where you cloned the git repo

$ cd synfig/synfig-core/trunk
$ libtoolize --ltdl --copy --force
$ autoreconf --install --force
$ ./configure
$ make
$ sudo make install

Note:

  • Don't use --enable-half, it is slow.

synfig-studio

Requires: ETL (etl-dev, already installed if you successfully built etl), synfig (libsynfig-dev, already installed if you successfully built synfig-core), gtkmm >= 2.4, gtk >= 2.0, glibmm, libsigc++, libltdl, libtool, gettext, cvs

  • Debian: etl-dev libsynfig-dev libgtkmm-2.4-dev libgtk2.0-dev libglibmm-2.4-dev libsigc++-2.0-dev libltdl3-dev libtool gettext cvs
  • Gentoo: virtual/ETL virtual/synfig dev-cpp/gtkmm-2.4 dev-libs/libsigc++ sys-devel/libtool
    • If you are using ./configure --prefix="$PREFIX" to configure synfigstudio, do not install virtual/ETL or virtual/synfig.

Optional: fonts (for the images), FMOD (version 3.x, proprietary)

  • Debian: ttf-freefont ttf-dejavu ttf-dustin
  • Gentoo: freefonts dejavu

Type the following commands at the directory where you cloned the git repo

$ cd synfig/synfig-studio/trunk
$ autoreconf --install --force
$ ./configure
$ make
$ sudo make install


finalizing

Depending on where you installed synfig to, you might have to tell your system where the libraries can be found. That can be done via the following command:

$ sudo ldconfig


Automatic build script

If you want to build a binary for testing or debugging proposes you can run this script:

#!/bin/sh
CPUS=4
prefix=$(pwd)/install
export PKG_CONFIG_PATH="$prefix/lib/pkgconfig"
export PATH=$(pwd)/synfig-core/trunk/src/tool/.libs:$PATH
export CXX="/usr/bin/ccache /usr/bin/g++"
# export CXX="/usr/bin/ccache g++-snapshot"
# this comments out the line in configure.ac if it isn't already commented. Needed for Ubuntu 8.10 or higher
sed -i 's/^AC_CONFIG_SUBDIRS/# AC_CONFIG_SUBDIRS/' synfig-core/trunk/configure.ac

cd ETL/trunk								&&
autoreconf --install --force						&&
./configure --prefix $prefix						&&
make --debug=b install							&&
									\
cd ../../synfig-core/trunk						&&
libtoolize --ltdl --copy --force					&&
autoreconf --install --force						&&
./configure --prefix $prefix --enable-optimization=0 --enable-debug	&&
make --debug=b -j $CPUS install						&&
     	  								\
cd ../../synfig-studio/trunk						&&
autoreconf --install --force						&&
./configure --prefix $prefix --enable-optimization=0 --enable-debug	&&
make --debug=b -j $CPUS install

The binaries are installed at $(pwd)/install/bin. Alter the script according to your preferences.

Your system must satisfy synfig's build requiments, the sript won't do it for you. Also be sure what git branch are you building each time. In some cases you'll need to make clean on each folder first.