I have a repository of projects with following structure:
repo/ configure.ac Makefile.am project1/ configure.ac Makefile.am [sources] project2/ configure.ac Makefile.am [sources] project3/ configure.ac Makefile.am [sources]
And now I need to add directory (lets say common_logic/
) into repo/
and modify somehow project1
and project2
to use sources from common_logic
.
One of the solutions that I can see is to
copy ../common_logic/
after ./configure
(or before any rule in Makefile) executed in project1/
and add in Makefile.am following lines:
project1_la_CFLAGS += -I./common_logic project1_la_SOURCES += ./common_logic/foo.h ./common_logic/foo.c
In this case neither make
nor make dist
are broken. However it is looks like a crutch to me.
Anyway, could you please tell me how should project1
and project2
be modified to use the newely created folder? Or point another solution?