cons-discuss
[Top][All Lists]
Advanced

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

Repository and link not working together


From: Nadim Khemir
Subject: Repository and link not working together
Date: Tue, 18 Dec 2001 09:25:38 +0100

Hi,

1/ I can't seem to get Repository and Link to work together.

here how things look like on my box (W2K):

D:\DEV\PROGRAM\PBYACC
¦   Construct
¦
+---source
    +---common
    ¦   ¦   defs.h
    ¦   ¦   closure.c
    ¦   ¦   # ... more c files, this directory contains the full set to
build byacc
    ¦   ¦   yymain.c
    ¦
    +---non-object
    ¦   ¦   conscript # called by the top level Construct
    ¦   ¦
    ¦   ¦   closure.c
    ¦   ¦   # ... all c files here too
    ¦   ¦   yymain.c
    ¦
    +---object-Fstream
        ¦   conscript # called by the top level Construct
        ¦
        ¦   # only 2 c files here
        ¦   reader.c
        ¦   skeleton.c

the top level Construct looks like this:
>>>>>>>>>>>>
$CONS = new cons
                (
                ENV => {%ENV}
                , CFLAGS  => '/nologo -DPROGRAM=\"Byacc\"'
                ) ;

$EXPORT          = "#release" ;
$BIN             = "$EXPORT/bin" ;
$build_directory = "$EXPORT/build" ;

Link $build_directory => 'source' ;

Repository '#source/common' ;
Export qw(CONS BIN) ;

Build
        (
          "$build_directory/non-object/conscript"
        , "$build_directory/object-Fstream/conscript"
        ) ;
<<<<<<<<<<<<<<

The conscript file looks like this:
Import qw( CONS BIN );

InstallAs $CONS "$BIN/byacc_Fs.exe", 'byacc.exe' ;

$CONS->Program
                (
                'byacc.exe'
                ,qw
                        (
                        closure.c
                        # more c files
                        error.c
                        warshall.c
                        )
                ) ;

When run from the top level this conscript generates : "don't know how to
build 'closure.c'".
I would like to use closure.c that comes from the repository .


2/ Problem for Windows users only. (unix user read too please)

Windows add types to files through the use of an extension. Construc and
conscript files being extensionless, windows can't start them automatically
(I my case in a text editor which recognizes perl) neither can they have a
specific icon. I could modify the source so it checks if it is on a windows
machine and load 'Construct.cons' instead of 'Construct'. I would like to
know what extension to give so all of use it.

In my overflow of fantasy I propose '.cons'. is that fine for the mailling
list ?

we could  add the following line after line 196:

$param::topfile .= '.cons' if $^O eq 'MSWin32' ;

which brings me to the next point. shall we write :

Build "$build_directory/non-object/Conscript.cons"
or
Build "$build_directory/non-object/Conscript" # check 'Conscript.cons' too
on Windows

I am for the second solution even if cons has to be modified, the second
solution makes it easy for Win users without forcing us to write platform
specific cons files or bothering unix users.

Nadim.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]