automake
[Top][All Lists]
Advanced

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

Re: Building prog first


From: Russell Shaw
Subject: Re: Building prog first
Date: Tue, 23 Mar 2010 00:27:11 +1100
User-agent: Mozilla-Thunderbird 2.0.0.22 (X11/20091109)

Steffen Dettmer wrote:
* On Sun, Mar 21, 2010 at 10:27 AM, Ralf Wildenhues wrote:
noinst_PROGRAMS = unimain
unimain_SOURCES = unimain.c

unidata.tab.c: unimain$(EXEEXT) /usr/share/unicode/UnicodeData.txt
      ./unimain$(EXEEXT) $< > $@
BTW, execution of built programs like this makes your package unsuitable
for cross-compilation.  Just so you're aware of that.

Assuming unidata.tab.c is a C-code table containing the
information from UnicodeData.txt, I think it could be better to
generate it by some shell code (maybe inside the Makefile.am,
saving a tool) or to use perl (for the price of adding perl to
the build dependencies) or, if UnicodeData rarely changes, add
unidata.tab.c to the package and have some `maintainer only'
helper target to build it (with unidata.tab.c as distributed
source file). People who don't care about unidata.tab.c can build
the package even without UnicodeData.txt (if this makes any
sense, I don't know what this is for of course :))

I though of perl, but (A), i don't like slow tools, (B), unidata.tab.c
is 5.6MBytes and 450k lines long, (C), i find making build-programs
in C much more concise than scripting and i can debug it in ddd/gdb.

The size of unidata.tab.c precludes distributing it. I could do
more work on compacting it, but i have already done that to a degree.




reply via email to

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