Re: Problem in building c2hs package
Em Qua, 2005-07-06 às 21:54 -0700, John Hendrickson escreveu:
> Hi. I'm not a DM but have a few points.
>
> The tar error will likely fix itself when dpkg-buildpackage completes.
> However I'm not sure why you ran dpkg-source -b to build from an archive
> when you never finished the build - and when dpkg-buildpackage is supposed
> to do the task of building. tar's "File exists" I think means the file is
> already in the archive (filename pumped to tar twice).
I didn't. This is being run by dpkg-build package.
> You ran dpkg-buildpackage -r to do a complete rebuild. But it failed on
> the first make dependancy: clean. Nothing else happened - no build.
>
> The error on 71 is may be a sytax error that needs to be fixed. Whenever
> asking for advice it's good to attatch related files. In this case,
> debain/rules, mk/config.mk, and maybe Makefile.
It's stopping in the dh_clean called by dpkg-buildpackage. I'm ataching
debian/rules and Makefile here, mk/config.mk is a generated file in
configure.
> I don't think debain/rules or dpkg-buildpackage employs mk/common.mk and I
> wonder why it is called during make clean. Is it a makefile? Or a
> depends list (some make files use various techniques to track the need to
> build by creating files used for dependancy checking)?
This is a error from upstream make distclean. As make distclean is
called with a - before it in debian/rules, I don't think that this is a
big deal. It doesn't work before ./configure. Anyway, I'll contact the
upstream author to tell him about this.
> You did ls in debian/ directory. dh_make was apparently used to debanize
> the source the first time.
Yes.
> I might start over. Insure it all builds / rebuilds before debanizing.
> dh_make it. Then comment out things in debian/rules until at least make
> clean works from the Makefile and from debian's helper tools.
make clean alerady works. dh_clean no, and I can't get why.
Thanks.
(...)
--
Abraços,
marcot
mailto:marcot@minaslivre.org
jabber:marcott@jabber.org
UIN:50599075
MSN:marcot@ufmg.br
Tel:33346720
Cel:91844179
R. Paula Cândido 257/201
Gutierrez 30430-260
Belo Horizonte-MG
Brazil
"Trabalhe menos e mais devagar."
#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
#
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.
#
# Modified to make a template file for a multi-binary package with separated
# build-arch and build-indep targets by Bill Allombert 2001
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
# This has to be exported to make some magic below work.
export DH_OPTIONS
# These are used for cross-compiling and for saving the configure script
# from having to guess our platform (since we know it already)
DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif
config.status: configure
dh_testdir
# Add here commands to configure the package.
CFLAGS="$(CFLAGS)" ./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info
#Architecture
build: build-arch build-indep
build-arch: build-arch-stamp
build-arch-stamp: config.status
# Add here commands to compile the arch part of the package.
$(MAKE)
touch build-arch-stamp
build-indep: build-indep-stamp
build-indep-stamp: config.status
# Add here commands to compile the indep part of the package.
$(MAKE) doc
touch build-indep-stamp
clean:
dh_testdir
dh_testroot
rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP#
# Add here commands to clean up after the build process.
-$(MAKE) distclean
ifneq "$(wildcard /usr/share/misc/config.sub)" ""
cp -f /usr/share/misc/config.sub config.sub
endif
ifneq "$(wildcard /usr/share/misc/config.guess)" ""
cp -f /usr/share/misc/config.guess config.guess
endif
dh_clean
install: install-indep install-arch
install-indep:
dh_testdir
dh_testroot
dh_clean -k -i
dh_installdirs -i
# Add here commands to install the indep part of the package into
# debian/<package>-doc.
#INSTALLDOC#
dh_install -i
install-arch:
dh_testdir
dh_testroot
dh_clean -k -s
dh_installdirs -s
# Add here commands to install the arch part of the package into
# debian/tmp.
$(MAKE) install prefix=$(CURDIR)/debian/c2hs/usr
dh_install -s
# Must not depend on anything. This is to be called by
# binary-arch/binary-indep
# in another 'make' thread.
binary-common:
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
# dh_installexamples
# dh_installmenu
# dh_installdebconf
# dh_installlogrotate
# dh_installemacsen
# dh_installpam
# dh_installmime
# dh_installinit
# dh_installcron
# dh_installinfo
dh_installman
# dh_link
dh_strip
dh_compress
dh_fixperms
# dh_perl
# dh_python
dh_haskell
dh_makeshlibs
# dh_installdeb
dh_shlibdeps
dh_gencontrol
dh_md5sums
dh_builddeb
# Build architecture independant packages using the common target.
binary-indep: build-indep install-indep
$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
# Build architecture dependant packages using the common target.
binary-arch: build-arch install-arch
$(MAKE) -f debian/rules DH_OPTIONS=-a binary-common
binary: binary-arch binary-indep
.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch
# Compiler Toolkit Toplevel: root makefile
#
# Author : Manuel M T Chakravarty
# Created: 24 July 1998 (derived from HiPar root makefile)
#
# Version $Revision: 1.68 $ from $Date: 2005/05/18 03:04:02 $
#
# Copyright (c) [1995..2002] Manuel M T Chakravarty
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# = DOCU =====================================================================
#
# * This makefile handles the toplevel commands of the Compiler Toolkit.
# A new compiler can be dropped in by setting up a `<mycomp>' source
# directory plus a `<mycomp>/mk/<mycomp>.pck.mk' makefile. The makefile
# contains compiler-specific definitions for the various `make' targets and
# the source directory contains the complete set of compiler-specific
# source files.
#
# It is important that the variables and targets defined in
# `<mycomp>/mk/<mycomp>.pck.mk' are prefixed with a compiler-specific
# prefix. This allows to have multiple compiler in a single Compiler
# Toolkit tree without conflicts.
#
# The main build target and the tar target of a package are defined
# `<mycomp>/mk/<mycomp>.pck.mk'.
#
# * A build is performed below `build' in a directory named by the basename of
# the used compiler (as given by $(HC)). In this directory, shadow
# directories of the source trees are created.
#
# * Before anything can be build, a `make config' has to be executed.
# Whenever the compiler $(HC) or system $(SYS) used for the build changes,
# `make config' has to be executed again. It also has to be re-executed
# when files are added, deleted, or moved in a source tree.
#
# * GNU make is required: The makefiles use conditionals and various makefile
# functions.
#
# = TODO =====================================================================
#
# ***************************************
# !!! This makefile requires GNU make !!!
# ***************************************
# default target (must be first)
# ==============
#
.PHONY: default
default: all
include mk/common.mk
TMPDIR=/tmp
# files lists
#
# * need the `wildcard' in `BASEPARTSFILES', as the following `filter-out'
# wouldn't work otherwise
#
BASEPARTSFILES=$(wildcard base/*/Makefile base/*/*.hs\
base/*/tests/Makefile base/*/tests/*.hs)
BASEFILES =AUTHORS COPYING COPYING.LIB INSTALL Makefile README README.CTKlight\
aclocal.m4 configure configure.in config.sub config.guess\
install-sh\
mk/common.mk mk/config.mk.in\
base/ChangeLog base/Makefile \
base/base.build.conf.cabal.in base/base.build.conf.ghc-pre-6.4.in \
base/TODO\
$(filter-out %/SysDep.hs %/SysDepPosix.hs, $(BASEPARTSFILES))\
doc/base/Makefile doc/base/base.tex doc/base/base.bib
CTKLFILES =AUTHORS COPYING.LIB README.CTKlight\
base/admin/BaseVersion.hs\
base/admin/Config.hs\
base/admin/Common.hs\
base/errors/Errors.hs\
base/general/DLists.hs\
base/general/FNameOps.hs\
base/general/FiniteMaps.hs\
base/general/GetOpt.hs\
base/general/Sets.hs\
base/general/Utils.hs\
base/syntax/Lexers.hs\
base/syntax/Parsers.hs\
base/syntax/Pretty.hs
# file that contain a `versnum = "x.y.z"' line
#
BASEVERSFILE =base/admin/BaseVersion.hs
# this is far from elegant, but works for extracting the plain version number
#
BASEVERSION =$(shell $(GREP) '^versnum' $(BASEVERSFILE)\
| sed '-e s/versnum.* "//' '-e s/"//')
# base directory for tar balls and exclude patterns
#
TARBASE=ctk
TAREXCL=--exclude='*CVS' --exclude='*~' --exclude='.\#*'\
--exclude=config.log --exclude=config.status
# help target
# ===========
#
help:
@echo "*** Usage:"
@echo "*** \`make prep' -- generate parsers and compute dependencies"
@echo "*** \`make base' -- build Compiler Toolkit"
@echo "*** \`make <mycomp>' -- build compiler below <mycomp>"
@echo "*** \`make all' -- `prep', build, and all compilers"
@echo "*** \`make showconfig' -- print current configuration"
# system configuration (has to be executed before building)
# ====================
#
.PHONY: config showconfig
config:
@echo "*** Selecting system-dependent code..."
$(MAKE) -C base/sysdep $(MFLAGS) $@
$(MAKE) -C base $(MFLAGS) $@
@echo "*** Configuration successfully finished."
showconfig:
@echo "*** Current configuration:"
@echo " Compiler : $(HC)"
@echo " System : $(SYS)"
@echo " Parser generator : $(HAPPY)"
@echo " Mkdepend : $(MKDEPENDHS)"
@echo " Compiler packages: $(PCKS)"
# preparations (run parser generators and compute dependencies)
# ============
#
.PHONY: prep parsers depend
prep: config parsers depend
# Generate parsers
#
parsers:
@echo "*** Checking for the need to run a parser generator..."
@for pck in $(PCKS); do\
$(MAKE) -C $$pck $(MFLAGS) $@;\
done
# Compute dependcies within each package
#
depend:
@echo "*** Building dependency databases..."
@for pck in base $(PCKS); do\
$(MAKE) -C $$pck $(MFLAGS) $@;\
done
# building things
# ===============
#
.PHONY: all build base doc
all: prep build
build: base $(PCKS)
base:
$(MAKE) -C base $(MFLAGS) all
doc:
@echo "*** Building documentation..."
@for dir in base $(PCKS); do\
$(MAKE) -C doc/$$dir $(MFLAGS) all;\
done
# installation
# ============
#
.PHONY: install install-doc
install:
@echo "*** Installing packages..."
@for pck in $(PCKS); do\
$(MAKE) -C $$pck $(MFLAGS) $@;\
done
install-doc:
@echo "*** Installing documentation..."
@for pck in base $(PCKS); do\
$(MAKE) -C doc/$$pck $(MFLAGS) install;\
done
# auxilliary targets
# ==================
#
.PHONY: clean cleanhi spotless distclean
# Remove generated objects and executables
#
clean:
@for pck in base $(PCKS); do\
$(MAKE) -C $$pck $(MFLAGS) $@;\
$(MAKE) -C doc/$$pck $(MFLAGS) $@;\
done
# Remove generated interface files
#
cleanhi:
@for pck in base $(PCKS); do\
$(MAKE) -C $$pck $(MFLAGS) $@;\
done
# Remove all traces of a build
#
spotless:
-$(RM) -rf config.cache
# Remove everything that is not in the source tar
#
distclean: spotless
-$(RM) config.status config.log config.cache
-$(FIND) . -name \*.in | $(SED) -e 's/\.in$$//;/\/configure$$/d'\
| xargs -r $(RM)
# tar various packages
#
TARCMD=$(TAR) -c -z $(TAREXCL) -h -f
tar-base:
-ln -s . $(TARBASE)-$(BASEVERSION)
$(TARCMD) $(TARBASE)-$(BASEVERSION).tar.gz\
$(addprefix $(TARBASE)-$(BASEVERSION)/,$(BASEFILES))
-$(RM) $(TARBASE)-$(BASEVERSION)
tar-ctk: tar-base
tar-ctkl:
@[ ! -e $(TMPDIR)/ctkl-$(BASEVERSION) ]\
|| (echo "Temp file $(TMPDIR)/ctkl-$(BASEVERSION) already exsits."\
&& exit 1)
mkdir $(TMPDIR)/ctkl-$(BASEVERSION)
$(CP) $(CTKLFILES) $(TMPDIR)/ctkl-$(BASEVERSION)
cd $(TMPDIR); $(TARCMD) $(shell pwd)/ctkl-$(BASEVERSION)-src.tar.gz\
ctkl-$(BASEVERSION)
$(RM) -r $(TMPDIR)/ctkl-$(BASEVERSION)
Reply to: