I have written a Makefile.am and processed it with automake 1.10. Here's how the file looks. METASOURCES = AUTO
bin_PROGRAMS = pkgmaker # This rule lets GNU make create any moc_*.cpp from the equivalent *.h %.h: %.ui $(UIC) -o $@ $< %.cpp: %.ui $(UIC) -o $@ -impl $*.h $< # You have one .h file, it's called myapp.h. Therefore, here I list # its mocced name, moc_myapp.cpp. moc_%.cpp: %.h moc $< -o $@ pkgmaker_UI = sigcreatedlg.h sigcreatedlg.cpp sigcreatedlg.h: sigcreatedlg.ui sigcreatedlg.cpp: sigcreatedlg.ui sigcreatedlg.h pkgmaker_SOURCES = pkgmaker.cpp $(pkgmaker_UI) BUILT_SOURCES = $(pkgmaker_UI) # set the include path found by configure INCLUDES= $(all_includes) # the library search path. pkgmaker_LDFLAGS = $(all_libraries) pkgmaker_LDADD = ../dirlist/libdirlist.la CLEANFILES = $(BUILT_SOURCES) I get several warning when I run automake. pkgmaker/Makefile.am:6: `%'-style pattern rules are a GNU make extension pkgmaker/Makefile.am:8: `%'-style pattern rules are a GNU make extension pkgmaker/Makefile.am:12: `%'-style pattern rules are a GNU make extension How do I modernize these rules? When I try to compile my app, I get a message stating that sigcreatedlg.h does not exist, so the files in BUILT_SOURCES are not generated before the rest of my app is compiled. What's the right way to do this?