Hi, The project I'm working on builds in both Windows and Linux. As you may imagine, there are some conditional compilations and, in fact, sometimes full files are left out. There are also some header files, and a python script for auto-building a header file, which must be distributed too. It seemed that EXTRA_DIST was the ticket for me.
I started adding this to the Makefile.am EXTRA_DIST = path/to/prebuild.py path/to/header1.hpp path/to/header2.hpp \ path/to/header3.hpp path/to/header4.hpp This worked just fine when I did "make dist". Then, when attempting another build, I ran into the next scenario: headers not used on Linux but still part of the distribution. "No problem," I think, and add it to the EXTRA_DIST variable along with its companion code file. Well, I did so like this: EXTRA_DIST = path/to/prebuild.py path/to/header1.hpp path/to/header2.hpp \ path/to/header3.hpp path/to/header4.hpp path/to/WindowsHeader.h \ path/to/WindowsSource.cpp Then I do "autoreconf", "./configure" and finally, "make dist". Only this time, I'm greeted with this: make[1]: *** No rule to make target `path/to/WindowsHeader.cpp', needed by `distdir'. Stop. I try taking out the *.cpp file and try again with the same error but with the *.h. If I take out the *.h file, all is well again and "make dist" is happy and fine. Why is it picky with files ending with *.cpp and *.h if these things are extra to the distribution and have nothing to do with the build anyway? Andy