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

Re: Problems with build target



Hi,
>>"Martin" == Martin Schulze <joey@kuolema.Infodrom.North.DE> writes:

Martin> On Sat, Mar 21, 1998 at 06:09:50PM +0100, Richard Braakman
Martin> wrote:
>> > The reason is that inside of debian/rules a stamp-file is used to
>> indicate that the build process was successful.  Unfortunately this
>> stamp-file is called 'build' - similar to the target I have to use.
>> As there are normaly no depends on the build target make will
>> refuse to run the build stage.
>> 
>> But... isn't that what the 'build' stamp is _for_? It makes sure
>> that if you do "debian/rules build" again, nothing happens.

Martin> But this time - as two .c files were modified and the package
Martin> needed to be rebuild with debian's options - this is the wrong
Martin> behaviour.

	Indeed. What is a general solution?
______________________________________________________________________
build:
	blah blah
	touch stamp-build
______________________________________________________________________

	This is no good either, since blah blah is always re-done, no
 matter whether it is needed or not.

______________________________________________________________________
build: stamp-build
stamp-build:
	blah blah
	touch stamp-build
______________________________________________________________________

	Does not work either, if you have touched 2 .c files.

SRC=a.c b.c d.c e.c f.c
OBJ=$(patsubst %.c,%.o,$(SRC))
YACCSRC=$(patsubst %.y,%.c,$(SRC))
YACCOBJ= ....

	And using pattern rules shall indeed work. 
______________________________________________________________________
build: $(OBJ)
	blah blah
	touch stamp-build
______________________________________________________________________

>> What does stamp-build do?

Martin> It shows that make -f debian/rules build has run
Martin> successfully. The binary target may be issued.

	How?

	I have a make+Configure based subsystem that uses /bin/sh and
 gnu make to allow people to define SRC, and include a file, and
 compile with no changes on 23 UNIX platforms. The sources were severl
 MLOC of DCE multi-threaded distributed 4tier applications. 

	It can be done, but it is not easy.

	Please do have alook at the makefiles at the end of this
 message. 

	manoj

______________________________________________________________________


        The pilgrim make configuration file are an attempt to shield
the developer from platform and site dependencies, and to provide a
single point where sitewide options maybe set. The goal is that one
may go to the pilgrim source tree, irrespective of the product or the
particular platform one is on, and type the same command (make build,
make install, etc) and have the product compile and be installed in
the proper place for that particular platform and site. A second goal
is to simplify writing Makfiles for each product by taking out the
common/and or mundane tasks into the common configuration sites. This
also ensures some consistency in the way that source code for various
products is compiled.

        When the makefile fragment pilgrim.tmpl is included in a
makefile, the following sequence of events happen. First the fragment
determines which architecture it is being run on, and then loads the
fragment pilgrim.defaults which provides the basic default values for
various variables, and sets the values of any variable not defined in
the top level makefile to the default value. It then loads a vendor
specific fragment, which may choose to override some of the default
variables to settings valid for that machine-vendor-os combination.
After this, a site specific makefile fragment is loaded which
modifies the default variable settings for the whole site. After this,
if defined, a project specific makefile fragment is loaded. Finally,
fragments which define implicit rules and targets are loaded.

                      Notes for Makefile writers

        In order to utilize the full power of this tool, and to
simplify your makefile, certain conventions have to be followed. You
have to put the following line AFTER all your variable declarations in
your Makefile:

include  $(PILGRIMTOP)/share/install/config/make/pilgrim.tmpl

        where $(PILGRIMTOP) is defined to be the top of the pilgrim
source tree on your installation. This value may be specified in the
Makefile, as a command line argument to make, or as an environment
variable. For example, at pilgrim, we use /proj as $(PILGRIMTOP)
across the cell.

        Next, you should specify the source files in the directory in
the variable $(SRC), and this means _all_ the source files (including
the Makefile, idl files, man pages, etc), in order to use the
predefined targets depend, build, build_sources, build_objects,
build_archives, build_cbin, build_c++bin, and checkoutall.

        If you are building any binaries, you should also specify the
them as either CPROGRAMS or C++PROGRAMS. Any libraries, similarily,
should be listed in LIBRARIES. Additionally, for each such binary and
library, you have to specify the dependencies, in the form binary_BIN
or library.a variables.

        For installation files in the directory, you should list the
files to be installed in the variables idl_INSTALL, include_INSTALL,
lib_INSTALL, bin_INSTALL, etc_INSTALL, man_INSTALL, and doc_INSTALL
for installing various categories of the installed objects.

                               synopsis

        The following variables have no defaults:
SRC, CPROGRAMS, C++PROGRAMS, idl_INSTALL, include_INSTALL,
lib_INSTALL, bin_INSTALL, etc_INSTALL, man_INSTALL, and doc_INSTALL.

                            Customization

        There are a number or variables which have default values, but
maybe overridden by the Makefile. This utility defines the default
values for a variable in variables of the form DEFAULT_variable, and
if and only if the corresponding variable has not been defined in the
Makefile, sets variable = $(DEFAULT_variable). If you need to add
anything to the default value of a variable (for example, adding an
extra cpp flag), you may use the following form:

DEFAULT_variable += added value.

but it is recommended that you do not totally override the
DEFAULT_variable. If you need to discard the system defaults, you may
define the variable totally by saying variable = newvalue.

        In addition, idl, cpp, and cflags maybe specified on a per
file basis by defining a variable of the form filename.o_CPPFLAGS,
etc, if you need to change these flags for just a few files.

        This is a list of the variables currently defined by this
utility, followed by the list of default values, when run on a
decstation.

# makefile
----------
ACFFILES = $(DEFAULT_ACFFILES)
ARCHITECTURE = $(DEFAULT_ARCHITECTURE)
ARCHIVES = $(DEFAULT_ARCHIVES)
AUTO_CFLGS = ${DEFAULT_AUTO_CFLGS}
AUTO_CPP_FLGS = $(DEFAULT_AUTO_CPP_FLGS)
BIN_INSTALL_MODE = $(DEFAULT_BIN_INSTALL_MODE)
C++ = $(DEFAULT_C++)
C++BINARIES = $(DEFAULT_C++BINARIES)
C++FILES = $(DEFAULT_C++FILES)
C++FLAGS = ${DEFAULT_C++FLAGS}
C++INCLUDE = $(DEFAULT_C++INCLUDE)
C++LDFLAGS = ${DEFAULT_C++LDFLAGS}
C++LIBS = ${DEFAULT_C++LIBS}
C++PPFLAGS = ${DEFAULT_C++CPPFLAGS}
CAUX_CFLGS = ${DEFAULT_CAUX_CFLGS}
CAUX_CPP_FLGS = ${AUTO_CPP_FLGS}
CBINARIES = $(DEFAULT_CBINARIES)
CC = gcc
CDEBUG = $(DEFAULT_CDEBUG)
CFILES = $(DEFAULT_CFILES)
CI = $(DEFAULT_CI)
CIDL_FLAGS = $(DEFAULT_CIDL_FLAGS)
COMMA = ,
COPTS = $(DEFAULT_COPTS)
CPPFLAGS = ${DEFAULT_CPPFLAGS}
CSTUB_CFLGS = ${DEFAULT_CSTUB_CFLGS}
CSTUB_CPP_FLGS = ${AUTO_CPP_FLGS}
CWARNS = $(DEFAULT_CWARNS)
DCEINCLUDE = $(DEFAULT_DCEINCLUDE)
ECHO_COM = $(DEFAULT_ECHO_COM)
FilesToClean = $(DEFAULT_FilesToClean)
HEADERS = $(DEFAULT_HEADERS)
IDL = $(DEFAULT_IDL)
IDLFILES = $(DEFAULT_IDLFILES)
IDLFLAGS = ${DEFAULT_IDLFLAGS}
INCLUDELIBVPATH = $(DEFAULT_INCLUDELIBVPATH)
INCLUDEVPATH = $(DEFAULT_INCLUDEVPATH)
INSTALL = $(DEFAULT_INSTALL)
INSTALL_MODE = $(DEFAULT_INSTALL_MODE)
LDFLAGS = ${DEFAULT_LDFLAGS}
LEXDEBUG = $(DEFAULT_LEXDEBUG)
LEXFILES = $(DEFAULT_LEXFILES)
LEXFLAGS = ${DEFAULT_LEXFLAGS}
LIBS = $(DEFAULT_LIBS)
MACHINE = $(DEFAULT_MACHINE)
MAKEDEPEND = $(DEFAULT_MAKEDEPEND)
MAKEFILE = $(DEFAULT_MAKEFILE)
NORM_CFLAGS = $(DEFAULT_NORM_CFLAGS)
NORM_LEXFLAGS = $(DEFAULT_NORM_LEXFLAGS=)
OBJDIR = $(DEFAULT_OBJDIR)
OBJECTS = $(DEFAULT_OBJECTS)
PILGRIMTOP = $(DEFAULT_PILGRIMTOP)
SAUX_CFLGS = ${DEFAULT_SAUX_CFLGS}
SAUX_CPP_FLGS = ${AUTO_CPP_FLGS}
SHELL = $(DEFAULT_SHELL)
SRCDIR = $(DEFAULT_SRCDIR)
SSTUB_CFLGS = ${DEFAULT_SSTUB_CFLGS}
SSTUB_CPP_FLGS = ${AUTO_CPP_FLGS}
SUBDIR_DIRS = $(DEFAULT_SUBDIR_DIRS)
SYSTEM = $(DEFAULT_SYSTEM)
TMP := mips dec ultrix4.3
TMPOBJDIR := /proj/config/make/srivasta
VENDOR = $(DEFAULT_VENDOR)
VENDOR_CONFIG = $(DEFAULT_VENDOR_CONFIG)
VPATH = $(DEFAULT_VPATH)
YACCFILES = $(DEFAULT_YACCFILES)
YACCFLAGS = ${DEFAULT_YACCFLAGS}
bin_INSTALL_MODE = $(DEFAULT_bin_INSTALL_MODE)
bindir = $(DEFAULT_bindir)
datadir = $(DEFAULT_datadir)
docdir = $(DEFAULT_docdir)
etc_INSTALL_MODE = $(DEFAULT_etc_INSTALL_MODE)
etcdir = $(DEFAULT_etcdir)
exec_prefix = $(DEFAULT_exec_prefix)
idl_INSTALL_MODE = $(DEFAULT_idl_INSTALL_MODE)
idldir = $(DEFAULT_idldir)
include_INSTALL_MODE = $(DEFAULT_include_INSTALL_MODE)
includedir = $(DEFAULT_includedir)
infodir = $(DEFAULT_infodir)
lib_INSTALL_MODE = $(DEFAULT_lib_INSTALL_MODE)
libdir = $(DEFAULT_libdir)
man1dir = $(DEFAULT_man1dir)
man3dir = $(DEFAULT_man2dir)
mandir = $(DEFAULT_mandir)
manext = $(DEFAULT_manext)
mantop = $(DEFAULT_mantop)
oldincludedir = $(DEFAULT_oldincludedir)
prefix = $(DEFAULT_prefix)
statedir = $(DEFAULT_statedir)


                            Default values
----------------------------------------------------------------------

DEFAULT_AR := ar
DEFAULT_ARCHITECTURE := mips-dec-ultrix4.3
DEFAULT_ARFLAGS = crvs
DEFAULT_AUTO_CFLGS = ${CFLAGS} ${COPTS}
DEFAULT_AUTO_CPP_FLGS = ${DEFAULT_CPPFLAGS}
DEFAULT_BIN_INSTALL_MODE := 0755
DEFAULT_C++ := /usr/local/bin/g++
DEFAULT_C++FLAGS = ${CFLAGS} -D__cplusplus
DEFAULT_C++INCLUDE = /usr/local/lib/g++-include
DEFAULT_C++LDFLAGS = ${LDFLAGS}
DEFAULT_C++LIBS = ${LIBS} -lg++
DEFAULT_C++PPFLAGS = ${CPPFLAGS} -I${C++INCLUDE}
DEFAULT_CAUX_CFLGS = ${AUTO_CFLGS}
DEFAULT_CC = gcc
DEFAULT_CDEBUG = -g
DEFAULT_CFLAGS = ${NORM_CFLAGS} ${CWARNS}
DEFAULT_CI := ci
DEFAULT_CIDL_FLAGS = -DIDL_PROTOTYPES
DEFAULT_CO := co
DEFAULT_COPTS = -O2
DEFAULT_CPPFLAGS = -I${SRCDIR} -I${INCLUDEVPATH} -I${PILGRIMTOP}/include -I${DCE
INCLUDE}
DEFAULT_CSTUB_CFLGS = ${AUTO_CFLGS}
DEFAULT_CWARNS = -Wall -Wcast-qual -Wpointer-arith -Wshadow
DEFAULT_DCEINCLUDE = /usr/include/dce
DEFAULT_ECHO_COM := @@
DEFAULT_FilesToClean = *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a .emacs_* t
ags TAGS make.log MakeOut
DEFAULT_IDL = /usr/bin/idl
DEFAULT_IDLFLAGS = $(CIDL_FLAGS)-v -keep c_source -no_mepv ${CPPFLAGS} cc_cmd "$
{CC} ${CPPFLAGS} ${CFLAGS}"
DEFAULT_INCLUDELIBVPATH = $(subst :, -L,${VPATH})
DEFAULT_INCLUDEVPATH = $(subst :, -I,${VPATH})
DEFAULT_INSTALL := install
DEFAULT_INSTALL_MODE := 0644
DEFAULT_LDFLAGS = -L${PILGRIMTOP}/lib -L${INCLUDELIBVPATH}
DEFAULT_LEX := lex
DEFAULT_LEXDEBUG = -dpv
DEFAULT_LEXFLAGS = ${NORM_LEXFLAGS} ${LEXDEBUG}
DEFAULT_LIBS = -ldce -ldnet -li
DEFAULT_MACHINE := mips
DEFAULT_MAKECONFDIR = $(PILGRIMTOP)/share/install/config/make
DEFAULT_MAKEDEPEND := /usr/bin/X11/makedepend
DEFAULT_MAKEFILE := Makefile
DEFAULT_NLSPATH = ./%N:/opt/dcelocal/nls/msg/en_US.ASCII/%N:/usr/local/etc/%N
DEFAULT_NORM_CFLAGS = -fpcc-struct-return -c -DIDL_PROTOTYPES
DEFAULT_NORM_LEXFLAGS = -bCF
DEFAULT_OBJDIR := /proj/config/make/srivasta
DEFAULT_PATH = ".:${OBJDIR}:${PILGRIMTOP}/bin:/usr/local/bin:/usr/ucb:/bin:/usr/
bin:"
DEFAULT_PILGRIMTOP := /proj/
DEFAULT_RM := rm -f
DEFAULT_SAUX_CFLGS = ${AUTO_CFLGS}
DEFAULT_SHELL := /bin/sh5
DEFAULT_SRCDIR := /proj/config/make/srivasta
DEFAULT_SSTUB_CFLGS = ${AUTO_CFLGS}
DEFAULT_SYSTEM := ultrix4.3
DEFAULT_VENDOR := dec
DEFAULT_VENDOR_CONFIG := mips-dec-ultrix4.3.cf
DEFAULT_VPATH = ${OBJDIR}:${SRCDIR}
DEFAULT_YACC := yacc
DEFAULT_YACCFLAGS = -v -d
DEFAULT_bin_INSTALL_MODE = ${BIN_INSTALL_MODE}
DEFAULT_bindir := /proj//local/mips-dec-ultrix4.3/install/bin
DEFAULT_datadir := /proj//local/mips-dec-ultrix4.3/install/lib
DEFAULT_docdir := /proj//local/mips-dec-ultrix4.3/install/doc
DEFAULT_etc_INSTALL_MODE = ${DEFAULT_INSTALL_MODE}
DEFAULT_etcdir := /proj//local/mips-dec-ultrix4.3/install/etc
DEFAULT_exec_prefix := /proj//local/mips-dec-ultrix4.3/install
DEFAULT_idl_INSTALL_MODE = ${INSTALL_MODE}
DEFAULT_idldir := /proj//local/mips-dec-ultrix4.3/install/include
DEFAULT_include_INSTALL_MODE = ${INSTALL_MODE}
DEFAULT_includedir := /proj//local/mips-dec-ultrix4.3/install/include
DEFAULT_infodir := /proj//local/mips-dec-ultrix4.3/install/info
DEFAULT_lib_INSTALL_MODE = ${INSTALL_MODE}
DEFAULT_libdir := /proj//local/mips-dec-ultrix4.3/install/lib
DEFAULT_man1dir := /proj//local/mips-dec-ultrix4.3/install/man/man1
DEFAULT_man2dir := /proj//local/mips-dec-ultrix4.3/install/man/man2
DEFAULT_man3dir := /proj//local/mips-dec-ultrix4.3/install/man/man3
DEFAULT_mandir := /proj//local/mips-dec-ultrix4.3/install/man/man1
DEFAULT_manext := 1
DEFAULT_mantop := /proj//local/mips-dec-ultrix4.3/install/man
DEFAULT_oldincludedir := /usr/include
DEFAULT_prefix := /proj//local/mips-dec-ultrix4.3/install
DEFAULT_statedir := /proj//local/mips-dec-ultrix4.3/install/lib


-- 
 James Bond: What do you expect me to talk? A.Goldfinger: No Mr. Bond,
 I expect you to die!  Goldfinger
Manoj Srivastava  <srivasta@acm.org> <http://www.datasync.com/%7Esrivasta/>
Key C7261095 fingerprint = CB D9 F4 12 68 07 E4 05  CC 2D 27 12 1D F5 E8 6E


--
To UNSUBSCRIBE, email to debian-policy-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: