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

Re: debstd-like tool for those who don't want to use debmake



Andreas Jellinghaus wrote:
> please look at automake. we could write a similiar program, that creates
> debian/rules from debian/{autorules,rules.ar}. this design is far better
> than a black box desing like debstd. joeyh's approach will create
> several new and smaller and maybe only grey, but it will be black boxes.

I haven't looked at automake, but I have written configure.in files. I think
the two are similar, where you have a large makefile or a shell script
created from a smaller description file, right?

Writing configure.in, I always feel that I'm walking on eggshells. Will this
character be escaped to something else, will m4 interpret it in some strange
way, etc. And when I have to take a look at the multiple-thousand line
configure script that is generated, I get lost in the complexity.

Look at it this way - install, cp, dpkg-shlibdeps, dpkg-gencontrol, all of
these are "black boxes" that all of us call routinely in debian/rules. My
programs are actually less complicated than things like dpkg-shlibdeps or
dpkg-gencontrol. They are designed to each do one specific thing and to be
easy to understand. They have a well defined interface, and so it's
appropriate that they be black boxes, in the best tradition of encapsulating
a certian behavior in a black box with a well defined interface, and using
it without worrying about exactly how it accomplishes what it accomplishes.

> how does your debian/rules look like ?
> i don't want a debian/rules that calls strange commands.

Here is my experimental debian/rules for pdmenu that uses my tools. Again, I
don't think these are any more "strange commands" than are dpkg-shlibdeps,
etc.

#!/usr/bin/make -f
PATH += :debian:/usr/lib/joeystuff

build: build-stamp
build-stamp:
#       d2_preserve
        d2_testdir
        ./configure --prefix=/usr --sysconfdir=/etc
        $(MAKE)
        touch build-stamp

clean:
        d2_testdir
        d2_testroot
        d2_cleantmp
        d2_restore
        -$(MAKE) distclean
        rm -f build-stamp

# Build architecture-independent files here.
binary-indep: build
        # We have nothing to do by default.

# Build architecture-dependent files here.
binary-arch: build
        d2_testdir
        d2_testroot
        d2_cleantmp
        $(MAKE) INSTALL_PREFIX=debian/tmp install
        d2_installmenu
#       d2_installmanpages
        d2_installdocs
        d2_installexamples
        d2_installchangelogs
        d2_compress
        d2_installdebfiles
        d2_fixperms
        d2_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary

-- 
see shy jo


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: