[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Automake new features: wishes list :)
From: |
zaufi |
Subject: |
Automake new features: wishes list :) |
Date: |
Tue, 3 Dec 2002 06:22:17 +0300 |
User-agent: |
KMail/1.4.3 |
Hi all
I would like to make a little resume of my experience of automake using and
introduce a couple of features that will improve (I hope :) this tool...
I work in a project wich have a LOT of static libs and binary programs (wich
is uses this libs). So situation whan list of -I $(top_srcdir)/path/include
options have > 1000 chars length is frequently enough. To avoid such long
command lines I did the following:
1) append include directive to every Makefile.am:
include $(top_srcdir)/admin/Makefile.common
BECOUSE I DIDN'T FOUND LEGAL (or at least elegant) WAY TO MODIFY GENERATED
Makefiles (all at once)
--- Feature #1:
It would be nice to have a LEGAL way to post-process generated Makefile
Smth like 'Makefile-hook' to do per Makefile.am changes, or/and new
autoconf
macro (AM_MAKEFILE_POST_REBUILD_COMMANDS or smth else)
---
2) $(top_srcdir)/admin/Makefile.common contain INCLUDES definition:
INCLUDES = $(shell echo \`cat $(DEPDIR)/includes\`)
and rule to generate $(DEPDIR)/includes:
$(DEPDIR)/includes: Makefile.am
@echo '$(INCLUDES_LIST)' > $(DEPDIR)/includes
to start rebuilding $(DEPDIR)/inclues I'm define
BUILT_SOURCES = $(DEPDIR)/includes
in this file. The problem: what if smbd wish to define BUILT_SOURCES in its
Makefile.am?? (my script did _append_ include Makefile.common into every
Makefile.am in the project) -- Currently nobody do... but who knows what can
happens... :( I CAN'T USE BUILT_SOURCES += xxx -- 'BCOUSE OF ERROR ON
Makefile REBUILD:
admin/Makefile.common:NN: BUILT_SOURCES must be set with `=' before using `+='
make[1]: *** [Makefile.in] Error 1
... currently I have no guess how o solve this :(
Soon I'll start to write configure scripts for our next generation project...
In some (not in all) Makefiles.am BUILT_SOURCES will be used to gather some
info before build main target (bin_PROGRAMS/lt_LIBRARIES/noinst_LIBRARIES).
Moreover I need to know what will be builded in this Makefile (i.e. binary
program or library)... I don't know how to deal it with my INCLUDES_LIST
model... %(( -- Don't like to make _hacks_ -- want to use LEGAL way %)
--- Feature #2
Maybe it will be reasonable to add PRE_BUILD_xxx and/or POST_BUILD_xxx
(where xxx is a bin_PROGRAMS/lt_LIBRARIES/etc) like goal 'all' depends
on
BUILT_SOURCES??
---
3) my script also rename INCLUDES --> INCLUDES_LIST in all Makefile.am's
And using $(patsubst %, -I$(top_srcdir)/%, ...) in INCLUDES_LIST definition
helps to reduce typing :)
now compile command looks pretty short :)
g++ -DHAVE_CONFIG_H -I. -I. -I../../.. `cat .deps/includes`-g -O0 ...
---
I think it is enough for first time... :) -- I have a couple of yet another
c00l features... but will keep it for next automake release :)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Automake new features: wishes list :),
zaufi <=