[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Easy way to have a make target that omits some files?
From: |
Ralf Wildenhues |
Subject: |
Re: Easy way to have a make target that omits some files? |
Date: |
Tue, 12 Apr 2005 09:13:00 +0200 |
User-agent: |
Mutt/1.4.1i |
* Harald Dunkel wrote on Tue, Apr 12, 2005 at 08:24:45AM CEST:
> Kevin Teich wrote:
> >
> > I would like to add a target to our source tree that only installs
> > certain files such 'make install' will install everything normally, but
> > 'make release' will only install certain files.
>
> I would be interested in something like this, too.
Stab in the dark:
Idea 1)
Put only everything to be installed both times in
bin_PROGRAMS
etc, the other stuff in
noinst_PROGRAMS
etc. Use install-data-local and install-exec-local for installing the
extra stuff within `make install', but only if some variable, say,
RELEASE is not set. Then make your release target like
release: release-data release-exec
release-data:
RELEASE=X $(MAKE) install-data
etc.
For your own install rules, look at how Automake writes them, they are a
bit tricky. You will have problems if you use Libtool libraries,
though, and need to adjust (hint: -rpath). Further trouble might loom
elsewhere.
Tell us how it goes (I have not tried the above at all).
Idea 2)
If you don't have to be able to do a `make release' from the same build
tree as you do `make install', you can just use Automake conditionals
and then
if RELEASE
bin_PROGRAMS = ...
else
noinst_PROGRAMS = ..
endif
and adjust configure.ac (use AM_CONDITIONAL). This path will surely be
much less error-prone if it suits your needs.
> release: install_bin install_lib install_include install_data
>
> The "old" install target could work as before.
This already exists almost like you want:
make install-data, make install-exec.
Regards,
Ralf