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.

I am building a new .deb and want to fix lintian errors in the packaging. However, every time I rebuild, the rules file does a 'make clean' and thus starts compiling again.

Is there a way to instruct the build process that I do not want to recompile, that I'm just altering the packaging, and using the last set of binaries will be fine for now?

share|improve this question

2 Answers 2

up vote 8 down vote accepted

That depends on how you're building the package. dpkg-buildpackage doesn't call the clean target if you pass it the -nc option. Another useful option for test build is -uc (don't sign the changes file). debuild inherits these options from dpkg-buildpackage.

For a test build, you can simply do fakeroot debian/rules binary (adjust the target as appropriate for a multiple-binary package).

share|improve this answer
    
-nc is spot on. Thanks! –  crb Aug 22 '10 at 19:01

Using ccache, you can build the package as normal, without actually recompiling unchanged source files.

ccache works by storing old results of compilations, and only rebuilds if the source actually changed.

debuild --prepend-path=/usr/lib/ccache --preserve-envvars=CCACHE_*
share|improve this answer
1  
I got dpkg-buildpackage: unknown option or argument --preserve-envvars=CCACHE_* but I removed that option, seems to work ok without it –  Dave Butler Oct 15 '13 at 15:12

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.