Hello Ranjith, * ranjith wrote on Tue, Feb 06, 2007 at 08:49:07AM CET: > > I want to include a condition in MAkefile.am to check the > architecture, I did some thing like this > > s := > s += # gets a space in s > ARCH := $(subst $(s),_,$(shell uname ms)) > > ifeq ($(ARCH), Linux_i686) > bin_PROGRAMS = CCap > endif > > but while running automake I am getting the error > > linux32/Makefile.am:15: endif without if > win32/Makefile.am:12: endif without if
You're mixing up GNU make-specific constructs (ifeq, and others, see <http://www.gnu.org/software/make/manual/html_node/Conditionals.html>) together with Automake. Automake only understands most of POSIX make features, and is only able to ignore some GNU make extensions. OTOH, Automake has some extra features, such as Automake conditionals: <http://sources.redhat.com/automake/automake.html#Conditionals> You need to choose to either use Automake, and thus give up some GNU make specific functionality, or use GNU make, and give up Automake (i.e., write a Makefile, not Makefile.am; or write a Makefile.in which is then treated by e.g., a configure script generated by autoconf). Hope that helps. Cheers, Ralf _______________________________________________ help-gnu-utils mailing list help-gnu-utils@gnu.org http://lists.gnu.org/mailman/listinfo/help-gnu-utils