Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

What specific tools are available, if any, or should we just use a fake Makefile that runs scons?

share|improve this question

1 Answer 1

up vote 4 down vote accepted

The debian/rules file is a Makefile. Anything you might want to do in a "fake" Makefile, you can just do there. The dh command Manpage icon is a helper that will run most build systems with Debian defaults for you. I believe it supports scons If so, all you need is:

#!/usr/bin/make -f

%:
    dh $@

You can override its default behavior if you need to pass custom options (or if it doesn't really support scons). Then your rules file might look like:

#!/usr/bin/make -f

SCONS=scons 

%:
    dh $@

override_dh_auto_build:
    $(SCONS) --prefix=$(DEB_DESTDIR)/usr

override_dh_auto_clean:
    dh_auto_clean
    $(SCONS)  -c

override_dh_auto_install:
    $(SCONS) install --prefix=$(DEB_DESTDIR)/usr

Sometimes, the best way to learn how to do something is to look at how other packages do it. The command:

reverse-depends -b scons

will list all packages that Build-Depend on scons Grab their source and see the different ways they build.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.