它是在makefile中使用通配符而不是变量的正确方法吗?

时间:2015-11-17 18:27:15

标签: makefile

我当前的 CultureInfo ci=new CultureInfo("en-US"); ci.DateTimeFormat.ShortTimePattern = ""; ci.DateTimeFormat.LongTimePattern = ""; System.Threading.Thread.CurrentThread.CurrentCulture = ci; System.Threading.Thread.CurrentThread.CurrentUICulture = ci; Console.WriteLine(DateTime.Now.ToString()); 如下所示:

public class MySwipeRefreshLayout extends SwipeRefreshLayout {

    private int mTouchSlop;
    private float mPrevX;
    // Indicate if we've already declined the move event
    private boolean mDeclined;

    public MySwipeRefreshLayout(Context context, AttributeSet attrs) {
        super(context, attrs);

        mTouchSlop = ViewConfiguration.get(context).getScaledTouchSlop();
    }

    @Override
    public boolean onInterceptTouchEvent(MotionEvent event) {

        switch (event.getAction()) {
            case MotionEvent.ACTION_DOWN:
                mPrevX = MotionEvent.obtain(event).getX();
                mDeclined = false; // New action
                break;

            case MotionEvent.ACTION_MOVE:
                final float eventX = event.getX();
                float xDiff = Math.abs(eventX - mPrevX);

                if (mDeclined || xDiff > mTouchSlop) {
                    mDeclined = true; // Memorize
                    return false;
                }
        }

        return super.onInterceptTouchEvent(event);
    }

}

我觉得很奇怪,一方面Makefile被定义,而SRC_FILES := $(wildcard $(SRCDIR)/*.cpp) OBJ_FILES := $(patsubst $(SRCDIR)/%, $(BUILDDIR)/%, $(SRC_FILES:.cpp=.o)) $(TARGET): $(OBJ_FILES) $(CC) $(CFLAGS) $^ -o $@ $(BUILDDIR)/%.o: $(SRCDIR)/%.cpp # <----------- HERE mkdir -p $(BUILDDIR) $(CC) $(CFLAGS) -c -o $@ $< 确实依赖它,另一方面OBJ_FILES没有& #34;规则&#34 ;.实际上,目标文件是根据通配符匹配规则编译的,在上面的代码中由$(TARGET)标记。

有没有更好的方法来达到同样的效果?

0 个答案:

没有答案