Hello people, I have this directory layout:
root/ ---- subr_random.c ---- subdir/ -------- Makefile.am -------- main.c -------- gen.c -------- ulp.c My Makefile.am is this: VPATH = ../ LDADD = -lm AM_CFLAGS = -std=c99 -Wall -W bin_PROGRAMS = ulp ulp_SOURCES = main.c gen.c ulp.c subr_random.c When I type 'make' everything goes fine. 'subr_random.c' is picked up in ../ The problem presents when I want to build a distribution tarball. 'make dist' will of course fail because it can't find 'subr_random.c'. How could I workaround it ? I've tried many things, but all failed. For example, I read about dist-hook and tried to copy 'subr_random.c' from ../ to subdir/, but then I realized that this hook runs _after_ the $distdir population. Best regards, Stathis P.S. I could drop VPATH altogether and have ../subr_random.c in ulp_SOURCES but that would result in the creation of file, outside the directory where the tarball would be extracted.