[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Making a package with multiple binaries



On Sun, Oct 22, 2000 at 10:07:12AM -0400, Adam C Powell IV wrote:
> > > I fail to see how to run configure twice, with different options in the
> > > build-stamp rule and then install both into the right place in the install
> > > rule (I just get identical stuff pacakged in two locations),
> >
> > Well, it's simple really :) Just do something like this in the build rule:
> >
> >         dh_testdir
> >         ./configure --with-one-set-of-options
> >         $(MAKE)
> >         mkdir option1-build-dir
> >         mv src/foo src/bar src/baz option1-build-dir
> >         $(MAKE) distclean
> >         ./configure --with-another-set-of-options
> >         $(MAKE)
> >         mkdir option2-build-dir
> >         mv src/foo src/bar src/baz option2-build-dir
> >         touch $@
> 
> Or how about:
> 
>         dh_testdir
>         mkdir option1-build-dir
>         cd option1-build-dir
>         ../configure --with-one-set-of-options && $(MAKE)
>         cd ..

Only you can't have cd's on separate lines, because it's a makefile.

> Then the install (or binary) step can just "$(MAKE) install
> DESTDIR=whatever" in each build dir.

If nothing but the binaries change with different configure flags, and make
install would install lots of static stuff like images or such, then there's
no point in two invocations of make install.

> > Of course, in the clean rule, also do
> >
> >         rm -rf option1-build-dir option2-build-dir
> 
> Still holds.  In fact, that and dh_clean are about all you need to do.

Nitpick: having dh_test{dir,root} there is nice, too. :)

-- 
Digital Electronic Being Intended for Assassination and Nullification



Reply to: