🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.programmer
Article #3795

Re: automake conditional compilation technicality

#3795
From: Ian Macdonald
Date: Wed, 05 Jan 2000 00:00
44 lines
2661 bytes
On 4 Jan 2000 17:45:00 GMT, Ken Pizzini
<ken@halcyon.com> wrote:

>On 29 Dec 1999 13:36:56 GMT, Ian Macdonald <ian@caliban.org> wrote:
>>
>>I currently have a Makefile.am consisting of the following:
>>
>>bin_PROGRAMS = qrcs
>>qrcs_SOURCES = qrcs.c qrcs.h
>>EXTRA_qrcs_SOURCES = ext2fs.c ext2fs.h
>>man_MANS = qrcs.1
>>EXTRA_DIST = $(man_MANS) qrcs.spec qrcs.lsm
>>
>>The automake manual recommends assigning source files that are only
>>conditionally part of the build process to EXTRA_qrcs_SOURCES instead
>>of qrcs_SOURCES, so that is what I have done.
>>
>>The problem comes in not knowing how to inform the build process when
>>it should build the EXTRA_qrcs_SOURCES files.
>>
>>My configure.in checks for the existence of linux/ext2_fs.h and, if it
>>is found, defines HAVE_LINUX_EXT2_FS_H. That's the easy part.
>
>The configure.in should also conditionally set a configuration
>variable, say EXT2_FS, to ext2fs.o and have your Makefile.am say:
>  qrcs_SOURCES = qrcs.c qrcs.h @EXT2_FS@

So when would you use the EXTRA_qrcs_SOURCES macro then?

The automake manual recommends the usage of EXTRA_$(package)_SOURCES
for files that are to be built conditionally. Is it just a question of
using this in the same way you describe using EXT2_FS?

Obviously, what you describe would work, but is that the way automake
intends you to use the EXTRA_$(package)_SOURCES construct, or is there
a better way?

Ian
-- 
Ian Macdonald              | A chap down in Oklahoma Had a cock that    
Red Hat Certified Engineer | could sing La Paloma,  But the sweetness of
http://www.caliban.org/    | pitch  Couldn't put off the hitch Of       
Linux 2.2.13 on an i686    | impotence, size and aroma.                 
                           |                                            
Technical Details
Message-ID: <slrn8754tv.qfb.ian@caliban.xs4all.nl>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <slrn86k3jo.h30.ian@caliban.xs4all.nl> <slrn874aji.95.ken@pulsar.halcyon.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 109f73,70579a91ac9a2bf6
X-Google-Attributes: gid109f73,public
X-Google-Thread: fc89c,70579a91ac9a2bf6
X-Google-Attributes: gidfc89c,public
From: ian@caliban.org (Ian Macdonald)
Subject: Re: automake conditional compilation technicality
Date: 2000/01/05
Message-ID: <slrn8754tv.qfb.ian@caliban.xs4all.nl>
X-Deja-AN: 568403152
Sender: ianmacd@node10084.a2000.nl
References: <slrn86k3jo.h30.ian@caliban.xs4all.nl> <slrn874aji.95.ken@pulsar.halcyon.com>
Mail-Copies-To: never
X-OS: Linux 2.2.13
X-Complaints-To: abuse@xs4all.nl
X-Trace: news1.xs4all.nl 947033130 22016 24.132.0.132 (5 Jan 2000 00:45:30 GMT)
Organization: The Mighty Caliban
User-Agent: slrn/0.9.6.2 (Linux)
NNTP-Posting-Date: 5 Jan 2000 00:45:30 GMT
Newsgroups: comp.unix.programmer,gnu.utils.help