我在./src裏面有以下Makefile.am,我需要爲gtkmm應用程序生成依賴關係。在makefile.am中執行shell命令
bin_PROGRAMS = sampleapplication
sampleapplication_SOURCES = exampleapplication.cpp examplewindow.cpp main.cpp
sampleapplication_INCLUDES = ../include/exampleapplication.h ../include/examplewindow.h
sampleapplication_LDADD = $(DEPS_LIBS)
make_flags=`pkg-config gtkmm-3.0 --cflags --libs`
AM_CPPFLAGS = ${make_flags} -I$(top_srcdir)/include
然而,當我運行此命令運行此命令時,我所看到的在屏幕上顯示的是:
g++ -DHAVE_CONFIG_H -I. -I.. `pkg-config gtkmm-3.0 --cflags --libs` -I../include -g -O2 -MT exampleapplication.o -MD -MP -MF .deps/exampleapplication.Tpo -c -o exampleapplication.o exampleapplication.cpp
In file included from /usr/include/gtk-3.0/gtk/gtk.h:43:0,
from /usr/include/gtkmm-3.0/gtkmm/buildable.h:29,
這並不擴大了我想要的方式。什麼是正確的方法來做到這一點?
如果您在生成'Makefile.in'時得到標誌,它將是_your_系統特有的標誌,而不是以後將在_his_系統上使用'Makefile.in'的用戶。 – 2012-03-18 03:38:11
這是什麼正確的方法呢?我剛開始學習如何使用autotools編寫構建系統。 – 2012-03-18 03:40:49
我可能會把它放在'configure.ac'中,尤其是檢查gtkmm-3.0是否可用。 – 2012-03-18 03:48:32