tags 477956 +patch
thanks

It seems even bash was getting confused by some of the stuff in debian/rules

The following modified rules file is enough to make it build ok with bash and dash, posh fails on the configure script before it gets to the isntallation sections.


#!/usr/bin/make -f

SHELL=/bin/bash

package=the

CCOPTS="-O2 -g"

build: stamp-build stamp-doc
stamp-build: stamp-configure
        $(checkdir)
        $(MAKE) CFLAGS=$(CCOPTS) the THE_Help.txt
        touch stamp-build

configure: stamp-configure
stamp-configure:
        $(checkdir)
        ./configure --prefix=/usr --exec-prefix=/usr --with-ncurses 
--with-rexx=regina \
             --with-rexxincdir=/usr/include/regina --srcdir=`pwd`
        touch stamp-configure

stamp-doc: stamp-build
        $(checkdir)
        $(MAKE) html
        touch stamp-doc

doc: stamp-doc

clean:
        $(checkdir)
        -rm -f stamp-build stamp-configure stamp-doc
        -$(MAKE) distclean
        -rm -f `find . \( -name '*~' -o -name '*.bak' \) -print`
        -rm -rf core debian/tmp* debian/files* debian/*substvars

binary-indep: checkroot build stamp-doc
        -rm -rf debian/tmp-doc
        install -d -m755 debian/tmp-doc/DEBIAN
        install -d -m755 debian/tmp-doc/usr/share/doc/the/html
        install -d -m755 debian/tmp-doc/usr/share/doc/the-doc
        install -d -m755 debian/tmp-doc/usr/share/doc-base
        install -d -m755 debian/tmp-doc/usr/share/THE
        cp debian/manual.the debian/tmp-doc/usr/share/THE
        gzip -9fc the.man > debian/tmp-doc/usr/share/doc/the/the.man.gz
        gzip -9fc debian/changelog > 
debian/tmp-doc/usr/share/doc/the-doc/changelog.Debian.gz
        cp debian/copyright debian/tmp-doc/usr/share/doc/the-doc
        install -m644 {*.html,doc/*.gif} debian/tmp-doc/usr/share/doc/the/html/
        uudecode debian/*.png.uu && mv *.png 
debian/tmp-doc/usr/share/doc/the/html/
        install -m755 debian/postinst-doc debian/tmp-doc/DEBIAN/postinst
        install -m755 debian/prerm-doc debian/tmp-doc/DEBIAN/prerm
        install -m755 debian/postrm debian/tmp-doc/DEBIAN/postrm
        cp debian/menu-doc debian/tmp-doc/usr/share/doc-base/the
        dpkg-gencontrol -isp -p$(package)-doc -Pdebian/tmp-doc
        chown -R root.root debian/tmp-doc
        chmod -R go=rX debian/tmp-doc
        chmod 755 debian/md5_sums
        debian/md5_sums tmp-doc
        dpkg --build debian/tmp-doc ..

binary-arch: checkroot build
        $(checkdir)
        -rm -rf debian/tmp
        install -d -m755 
debian/tmp/{DEBIAN,etc,usr/{bin,lib/{THE,menu},share/man/man1,share/doc/the}}
        $(MAKE) install prefix=debian/tmp/usr exec_prefix=debian/tmp/usr
        strip --strip-all --remove-section=.comment --remove-section=.note 
debian/tmp/usr/bin/the
        #cp debian/the.1 debian/tmp/usr/share/man/man1
        cp README TODO debian/tmp/usr/share/doc/the
        cp HISTORY debian/tmp/usr/share/doc/the/changelog
        cp debian/changelog debian/tmp/usr/share/doc/the/changelog.Debian
        gzip -9f debian/tmp/usr/share/{doc/the/*,man/man1/the.1}
        #rm debian/tmp/usr/lib/THE/the.man
        cp debian/copyright debian/tmp/usr/share/doc/the
        install -m755 debian/postinst debian/tmp/DEBIAN/postinst
        install -m755 debian/postrm debian/tmp/DEBIAN/postrm
        install -m755 debian/prerm debian/tmp/DEBIAN/prerm
        install -m644 debian/conffiles debian/tmp/DEBIAN/conffiles
        install -m644 debian/therc.default debian/tmp/etc/therc
        install -m644 debian/therc.example 
debian/tmp/usr/share/THE/therc.example
        cp debian/menu debian/tmp/usr/lib/menu/the
ifeq ($(AZ),true)
        LD_LIBRARY_PATH=/debian/home/azekulic/az/usr/lib dpkg-shlibdeps 
debian/tmp/usr/bin/the
else
        dpkg-shlibdeps debian/tmp/usr/bin/the
endif
        dpkg-gencontrol -isp -p$(package) -Pdebian/tmp
        chown -R root.root debian/tmp*
        chmod -R go=rX debian/tmp*
        chmod 755 debian/md5_sums
        debian/md5_sums tmp
        dpkg --build debian/tmp ..

define checkdir
        test -f debian/rules
endef

binary: binary-arch binary-indep

source diff:
        @echo >&2 'source and diff are obsolete - use dpkg-source -b'; false

checkroot:
        $(checkdir)
        test root = "`whoami`"

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

Reply via email to