[GRASS-SVN] r48834 - in grass/trunk/lib/python: . ctypes
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Oct 16 11:17:54 EDT 2011
Author: glynn
Date: 2011-10-16 08:17:54 -0700 (Sun, 16 Oct 2011)
New Revision: 48834
Modified:
grass/trunk/lib/python/Makefile
grass/trunk/lib/python/ctypes/Makefile
Log:
Try to keep generated files in $(OBJDIR)
Modified: grass/trunk/lib/python/Makefile
===================================================================
--- grass/trunk/lib/python/Makefile 2011-10-16 15:17:11 UTC (rev 48833)
+++ grass/trunk/lib/python/Makefile 2011-10-16 15:17:54 UTC (rev 48834)
@@ -35,7 +35,10 @@
$(DSTDIR)/%: % | $(DSTDIR)
$(INSTALL_DATA) $< $@
-setup.py: setup.py.sed
+$(DSTDIR)/setup.py: $(OBJDIR)/setup.py | $(DSTDIR)
+ $(INSTALL_DATA) $< $@
+
+$(OBJDIR)/setup.py: setup.py.sed | $(OBJDIR)
sed \
-e 's#@LD_LIBRARY_PATH_VAR@#$(LD_LIBRARY_PATH_VAR)#' \
$< > $@
Modified: grass/trunk/lib/python/ctypes/Makefile
===================================================================
--- grass/trunk/lib/python/ctypes/Makefile 2011-10-16 15:17:11 UTC (rev 48833)
+++ grass/trunk/lib/python/ctypes/Makefile 2011-10-16 15:17:54 UTC (rev 48834)
@@ -55,7 +55,7 @@
SED = sed
CTYPESGEN = ./ctypesgen.py
CTYPESFLAGS = --cpp "$(CC) -E $(CPPFLAGS) $(LFS_CFLAGS) $(EXTRA_CFLAGS) $(NLS_CFLAGS) $(DEFS) $(EXTRA_INC) $(INC) -D__GLIBC_HAVE_LONG_LONG"
-EXTRA_CLEAN_FILES := $(foreach M,$(MODULES),$(M).py) $(wildcard ctypesgencore/*.pyc) $(wildcard ctypesgencore/*/*.pyc)
+EXTRA_CLEAN_FILES := $(wildcard ctypesgencore/*.pyc) $(wildcard ctypesgencore/*/*.pyc)
ifneq ($(MINGW),)
INTLLIB = -lintl3
@@ -69,7 +69,7 @@
PYFILES := $(patsubst %,$(DSTDIR)/%.py,$(MODULES) __init__ ctypes_preamble ctypes_loader)
PYCFILES := $(patsubst %,$(DSTDIR)/%.pyc,$(MODULES) __init__ ctypes_preamble ctypes_loader)
-LPYFILES := $(patsubst %,%.py,$(MODULES))
+LPYFILES := $(patsubst %,$(OBJDIR)/%.py,$(MODULES))
ifneq ($(strip $(CTYPESGEN)),)
default:
@@ -77,7 +77,10 @@
$(MAKE) $(LPYFILES) $(PYFILES) $(PYCFILES)
endif
-$(DSTDIR)/%.py: %.py | $(DSTDIR)
+$(DSTDIR)/__init__.py: __init__.py | $(DSTDIR)
+ $(INSTALL_DATA) $< $@
+
+$(DSTDIR)/%.py: $(OBJDIR)/%.py | $(DSTDIR)
$(SED) -f fix.sed $< > $@
$(DSTDIR)/ctypes_%.py: %.py | $(DSTDIR)
@@ -85,7 +88,7 @@
define module_rule
$(1)_DEPS = $$(patsubst %.h,$(ARCH_INCDIR)/%.h,$$($(1)_HDRS))
-$(1).py: $$($(1)_DEPS)
+$(OBJDIR)/$(1).py: $$($(1)_DEPS) | $(OBJDIR)
$$(call run_grass,$(CTYPESGEN) $(CTYPESFLAGS) $$($(1)_LIBS) $$($(1)_INC) $(EXTRA_LIBS) $$($(1)_DEPS) -o $$@)
endef
$(foreach module,$(MODULES),$(eval $(call module_rule,$(module))))
More information about the grass-commit
mailing list