diff options
author | Matúš Kukan <matus.kukan@gmail.com> | 2012-03-30 12:40:06 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@gmail.com> | 2012-03-31 22:49:31 +0200 |
commit | bd51ff439c6cecaefbd67c0871106a9bfdb13935 (patch) | |
tree | e6a873c01623de772831626386598506e1b1dad5 /clucene | |
parent | 4b30d8addc4960c65ec5d2ce1633800190d7c067 (diff) |
clucene: use CustomTarget makefile
Diffstat (limited to 'clucene')
-rw-r--r-- | clucene/CustomTarget_source.mk (renamed from clucene/source/Makefile) | 66 | ||||
-rw-r--r-- | clucene/Library_clucene.mk | 6 | ||||
-rw-r--r-- | clucene/Module_clucene.mk | 1 | ||||
-rw-r--r-- | clucene/Package_source.mk | 20 |
4 files changed, 39 insertions, 54 deletions
diff --git a/clucene/source/Makefile b/clucene/CustomTarget_source.mk index 500c3b92d9b9..f36f997d3957 100644 --- a/clucene/source/Makefile +++ b/clucene/CustomTarget_source.mk @@ -26,50 +26,56 @@ # in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable # instead of those above. -gb_PARTIALBUILD := T -include $(GBUILDDIR)/gbuild_simple.mk +$(eval $(call gb_CustomTarget_CustomTarget,clucene/source,new_style)) +CLSO := $(call gb_CustomTarget_get_workdir,clucene/source) + +$(call gb_CustomTarget_get_target,clucene/source) : $(CLSO)/done + +# FIXME: do not hardcode the path here ifeq ($(OS_FOR_BUILD),WNT) -FIXED_TARFILE_LOCATION=$(shell cygpath -u $(TARFILE_LOCATION)) +cl_FIXED_TARFILE_LOCATION := $(shell cygpath -u $(TARFILE_LOCATION))/48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3.3.4.tar.gz else -FIXED_TARFILE_LOCATION=$(TARFILE_LOCATION) +cl_FIXED_TARFILE_LOCATION := $(TARFILE_LOCATION)/48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3.3.4.tar.gz endif -done : - mkdir -p $(dir $@) - # FIXME: do not hardcode the path here - $(GNUTAR) -x -z $(STRIP_COMPONENTS)=1 -f $(FIXED_TARFILE_LOCATION)/48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3.3.4.tar.gz - $(GNUPATCH) -p0 < $(SRCDIR)/clucene/patches/clucene-internal-zlib.patch - $(GNUPATCH) -p0 < $(SRCDIR)/clucene/patches/clucene-warnings.patch - $(GNUPATCH) -p0 < $(SRCDIR)/clucene/patches/clucene-gcc-atomics.patch - $(GNUPATCH) -p0 < $(SRCDIR)/clucene/patches/clucene-debug.patch - $(GNUPATCH) -p0 < $(SRCDIR)/clucene/patches/clucene-narrowing-conversions.patch - #FIXME ?, our rules expect .cxx - for i in `find . -name "*.cpp"`; do mv $$i $${i%%cpp}cxx; done -ifneq ($(OS),WNT) - #dirent.h is a problem, move it around - mkdir -p inc/internal/CLucene/util - mv src/shared/CLucene/util/dirent.h inc/internal/CLucene/util -endif - #To generate these, run cmake for each sufficiently different platform, customize and stick into configs ifeq ($(OS),WNT) - cp $(SRCDIR)/clucene/configs/_clucene-config-MSVC.h src/shared/CLucene/_clucene-config.h +_CLUCENE_CONFIG_H := $(SRCDIR)/clucene/configs/_clucene-config-MSVC.h ifeq ($(COM),MSC) - cp $(SRCDIR)/clucene/configs/clucene-config-MSVC.h src/shared/CLucene/clucene-config.h +CLUCENE_CONFIG_H := $(SRCDIR)/clucene/configs/clucene-config-MSVC.h else - cp $(SRCDIR)/clucene/configs/clucene-config-MINGW.h src/shared/CLucene/clucene-config.h +CLUCENE_CONFIG_H := $(SRCDIR)/clucene/configs/clucene-config-MINGW.h endif else - cp $(SRCDIR)/clucene/configs/clucene-config-generic.h src/shared/CLucene/clucene-config.h +CLUCENE_CONFIG_H := $(SRCDIR)/clucene/configs/clucene-config-generic.h ifeq ($(OS),LINUX) - cp $(SRCDIR)/clucene/configs/_clucene-config-LINUX.h src/shared/CLucene/_clucene-config.h +_CLUCENE_CONFIG_H := $(SRCDIR)/clucene/configs/_clucene-config-LINUX.h else - cp $(SRCDIR)/clucene/configs/_clucene-config-generic.h src/shared/CLucene/_clucene-config.h +_CLUCENE_CONFIG_H := $(SRCDIR)/clucene/configs/_clucene-config-generic.h endif endif -.DEFAULT_GOAL := all -.PHONY : all -all : done +$(CLSO)/done : $(cl_FIXED_TARFILE_LOCATION) \ + $(_CLUCENE_CONFIG_H) $(CLUCENE_CONFIG_H) + $(call gb_Output_announce,$(subst $(WORKDIR)/,,$@),$(true),TAR,1) + $(call gb_Helper_abbreviate_dirs_native, \ + mkdir -p $(dir $@) && cd $(dir $@) && \ + $(GNUTAR) -x -z $(STRIP_COMPONENTS)=1 -f $< && \ + $(GNUPATCH) -p0 < $(SRCDIR)/clucene/patches/clucene-internal-zlib.patch && \ + $(GNUPATCH) -p0 < $(SRCDIR)/clucene/patches/clucene-warnings.patch && \ + $(GNUPATCH) -p0 < $(SRCDIR)/clucene/patches/clucene-gcc-atomics.patch && \ + $(GNUPATCH) -p0 < $(SRCDIR)/clucene/patches/clucene-debug.patch && \ + $(GNUPATCH) -p0 < $(SRCDIR)/clucene/patches/clucene-narrowing-conversions.patch && \ + for i in `find $(CLSO)/ -name "*.cpp"`; do mv $$i $${i%%cpp}cxx; done) + #FIXME ?, our rules expect .cxx +ifneq ($(OS),WNT) + #dirent.h is a problem, move it around + mkdir -p $(CLSO)/inc/internal/CLucene/util + mv $(CLSO)/src/shared/CLucene/util/dirent.h $(CLSO)/inc/internal/CLucene/util +endif + #To generate these, run cmake for each sufficiently different platform, customize and stick into configs + cp $(CLUCENE_CONFIG_H) $(CLSO)/src/shared/CLucene/clucene-config.h + cp $(_CLUCENE_CONFIG_H) $(CLSO)/src/shared/CLucene/_clucene-config.h + touch $@ # vim: set noet sw=4 ts=4: diff --git a/clucene/Library_clucene.mk b/clucene/Library_clucene.mk index 2fe7c5f6d93e..2cc9520a9175 100644 --- a/clucene/Library_clucene.mk +++ b/clucene/Library_clucene.mk @@ -48,12 +48,6 @@ $(eval $(call gb_Library_add_defs,clucene,\ $(LFS_CFLAGS) \ )) -ifeq ($(SYSTEM_ZLIB),YES) -$(eval $(call gb_Library_add_defs,clucene,\ - -DSYSTEM_ZLIB \ -)) -endif - # clucene does not depend on sal nor needs uwinapi here $(eval $(call gb_Library_add_linked_libs,clucene,\ $(filter-out uwinapi,$(gb_STDLIBS)) \ diff --git a/clucene/Module_clucene.mk b/clucene/Module_clucene.mk index 0eb79920c860..2a72ef826cd3 100644 --- a/clucene/Module_clucene.mk +++ b/clucene/Module_clucene.mk @@ -28,6 +28,7 @@ $(eval $(call gb_Module_Module,clucene)) $(eval $(call gb_Module_add_targets,clucene,\ + CustomTarget_source \ Library_clucene \ Package_source \ )) diff --git a/clucene/Package_source.mk b/clucene/Package_source.mk index c1bf7817e5a4..f6ebe3ebb3d7 100644 --- a/clucene/Package_source.mk +++ b/clucene/Package_source.mk @@ -26,25 +26,9 @@ # in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable # instead of those above. -$(eval $(call gb_Package_Package,clucene_source,$(WORKDIR)/CustomTarget/clucene/source)) +$(eval $(call gb_Package_Package,clucene_source,$(call gb_CustomTarget_get_workdir,clucene/source))) -$(eval $(call gb_Package_add_customtarget,clucene_source,clucene/source)) - -$(eval $(call gb_CustomTarget_add_dependencies,clucene/source,\ - clucene/configs/_clucene-config-generic.h \ - clucene/configs/clucene-config-generic.h \ -)) - -ifeq ($(OS_FOR_BUILD),WNT) -FIXED_TARFILE_LOCATION=$(shell cygpath -u $(TARFILE_LOCATION)) -else -FIXED_TARFILE_LOCATION=$(TARFILE_LOCATION) -endif - -# FIXME: do not hardcode the path here -$(eval $(call gb_CustomTarget_add_outdir_dependencies,clucene/source,\ - $(FIXED_TARFILE_LOCATION)/48d647fbd8ef8889e5a7f422c1bfda94-clucene-core-2.3.3.4.tar.gz \ -)) +$(call gb_Package_get_preparation_target,clucene_source) : $(call gb_CustomTarget_get_target,clucene/source) $(eval $(call gb_Package_add_file,clucene_source,inc/CLucene.h,src/core/CLucene.h)) $(eval $(call gb_Package_add_file,clucene_source,inc/CLucene/clucene-config.h,src/shared/CLucene/clucene-config.h)) |