[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
how to add a dependency to destdir?
From: |
Bruno Haible |
Subject: |
how to add a dependency to destdir? |
Date: |
Mon, 24 Feb 2003 12:51:40 +0100 (CET) |
Hi,
How can I add a dependency to the 'destdir' target, as generated by automake
and as invoked by the parent directory's Makefile? I need to update some
files before a release.
Example:
========================= Makefile.am =======================
AUTOMAKE_OPTIONS = 1.5 foreign no-dependencies
subconfigure:
echo "created by autoconf" > subconfigure
distdir: subconfigure
========================= configure.ac ======================
AC_INIT(configure.ac)
AM_INIT_AUTOMAKE(foobar, 0)
AC_OUTPUT([Makefile])
=============================================================
$ aclocal
$ autoconf
$ automake -a -c
Makefile.am:6: `distdir' is a target; expected a variable
$ echo $?
0
Then look into the generated Makefile.in: The distdir dependency is there
but the normal distdir target
distdir: $(DISTFILES)
$(am__remove_distdir)
mkdir $(distdir)
$(mkinstalldirs) $(distdir)/..
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
...
is gone.
How can I achieve this? The only way I've found is to comment out the
dependency line in Makefile.am:
========================= Makefile.am =======================
AUTOMAKE_OPTIONS = 1.5 foreign no-dependencies
subconfigure:
echo "created by autoconf" > subconfigure
#distdir: subconfigure
=============================================================
and to postprocess the Makefile so as to remove the '#' mark.
This is hardly satisfactory.
Bruno
- how to add a dependency to destdir?,
Bruno Haible <=