mirror of
git://git.gnu.org.ua/wordsplit.git
synced 2025-04-25 16:19:54 +03:00
Modify the VPATH instructions
This commit is contained in:
parent
4cd8bec42c
commit
5742ab5a03
1 changed files with 18 additions and 8 deletions
26
README
26
README
|
@ -105,23 +105,33 @@ Modify the VPATH variable in your Makefile.am:
|
|||
|
||||
Notice the use of "+=": it is necessary for the vpath builds to work.
|
||||
|
||||
Add wordsplit.o to the name_LIBADD or name_LDADD variable, depending on
|
||||
the nature of the object being built.
|
||||
Define the nodist_program_SOURCES variable:
|
||||
|
||||
Modify AM_CPPFLAGS as shown in the previous section:
|
||||
nodist_program_SOURCES = wordsplit.c
|
||||
|
||||
AM_CPPFLAGS = -I$(srcdir)/wordsplit
|
||||
The nodist_ prefix is necessary to prevent Make from trying to
|
||||
distribute this file from the current directory (where it doesn't
|
||||
exist of course). It will find it using VPATH during compilation.
|
||||
|
||||
Add both wordsplit/wordsplit.c and wordsplit/wordsplit.h to the EXTRA_DIST
|
||||
variable.
|
||||
Finally, add both wordsplit/wordsplit.c and wordsplit/wordsplit.h to
|
||||
the EXTRA_DIST variable and modify AM_CPPFLAGS as shown in the
|
||||
previous section.
|
||||
|
||||
An example Makefile.am:
|
||||
|
||||
program_SOURCES = main.c
|
||||
LDADD = wordsplit.o
|
||||
noinst_HEADERS = wordsplit/wordsplit.h
|
||||
nodist_program_SOURCES = wordsplit.c
|
||||
VPATH += $(srcdir)/wordsplit
|
||||
EXTRA_DIST = wordsplit/wordsplit.c wordsplit/wordsplit.h
|
||||
AM_CPPFLAGS = -I$(srcdir)/wordsplit
|
||||
|
||||
It is also possible to use LDADD as shown in the example below:
|
||||
|
||||
program_SOURCES = main.c
|
||||
LDADD = wordsplit.o
|
||||
VPATH += $(srcdir)/wordsplit
|
||||
EXTRA_DIST = wordsplit/wordsplit.c wordsplit/wordsplit.h
|
||||
AM_CPPFLAGS = -I$(srcdir)/wordsplit
|
||||
|
||||
* The testsuite
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue