From 84ee2d946755e777549826641d171621ee2dc67a Mon Sep 17 00:00:00 2001 From: Laurent Perron Date: Tue, 5 Jun 2018 14:31:19 +0200 Subject: [PATCH] create archive for data files separate from main binary archive --- makefiles/Makefile.archive.mk | 48 +++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/makefiles/Makefile.archive.mk b/makefiles/Makefile.archive.mk index 057514a3f0..688b50e8cd 100644 --- a/makefiles/Makefile.archive.mk +++ b/makefiles/Makefile.archive.mk @@ -1,7 +1,7 @@ archive: $(INSTALL_DIR)$(ARCHIVE_EXT) -$(INSTALL_DIR)$(ARCHIVE_EXT): $(LIB_DIR)$S$(LIB_PREFIX)ortools.$L create_dirs cc_archive dotnet_archive java_archive data_archive $(PATCHELF) +$(INSTALL_DIR)$(ARCHIVE_EXT): $(LIB_DIR)$S$(LIB_PREFIX)ortools.$L create_dirs cc_archive dotnet_archive java_archive $(PATCHELF) ifeq ($(SYSTEM),win) cd temp && ..$Stools$Szip.exe -r ..$S$(INSTALL_DIR).zip $(INSTALL_DIR) else @@ -49,35 +49,45 @@ create_dirs: $(MKDIR) temp$S$(INSTALL_DIR)$Sexamples$Scom$Sgoogle $(MKDIR) temp$S$(INSTALL_DIR)$Sexamples$Scom$Sgoogle$Sortools $(MKDIR) temp$S$(INSTALL_DIR)$Sexamples$Scom$Sgoogle$Sortools$Ssamples - $(MKDIR) temp$S$(INSTALL_DIR)$Sexamples$Sdata - $(MKDIR) temp$S$(INSTALL_DIR)$Sexamples$Sdata$Set_jobshop - $(MKDIR) temp$S$(INSTALL_DIR)$Sexamples$Sdata$Sflexible_jobshop - $(MKDIR) temp$S$(INSTALL_DIR)$Sexamples$Sdata$Sjobshop - $(MKDIR) temp$S$(INSTALL_DIR)$Sexamples$Sdata$Smultidim_knapsack - $(MKDIR) temp$S$(INSTALL_DIR)$Sexamples$Sdata$Scvrptw - $(MKDIR) temp$S$(INSTALL_DIR)$Sexamples$Sdata$Spdptw - $(MKDIR) temp$S$(INSTALL_DIR)$Sexamples$Sdata$Sfill_a_pix - $(MKDIR) temp$S$(INSTALL_DIR)$Sexamples$Sdata$Sminesweeper - $(MKDIR) temp$S$(INSTALL_DIR)$Sexamples$Sdata$Srogo - $(MKDIR) temp$S$(INSTALL_DIR)$Sexamples$Sdata$Ssurvo_puzzle - $(MKDIR) temp$S$(INSTALL_DIR)$Sexamples$Sdata$Squasigroup_completion - $(MKDIR) temp$S$(INSTALL_DIR)$Sexamples$Sdata$Sdiscrete_tomography $(MKDIR) temp$S$(INSTALL_DIR)$Sexamples$Sfsharp $(MKDIR) temp$S$(INSTALL_DIR)$Sexamples$Sfsharp$Slib $(MKDIR) temp$S$(INSTALL_DIR)$Sexamples$Snetstandard - - #credits $(COPY) LICENSE-2.0.txt temp$S$(INSTALL_DIR) $(COPY) tools$SREADME.cc.java.csharp temp$S$(INSTALL_DIR)$SREADME $(COPY) tools$SMakefile.cc temp$S$(INSTALL_DIR)$SMakefile -data_archive: +create_data_dirs: + -$(DELREC) temp_data + $(MKDIR) temp_data + $(MKDIR) temp_data$S$(INSTALL_DIR) + $(MKDIR) temp_data$S$(INSTALL_DIR)$Sexamples + $(MKDIR) temp_data$S$(INSTALL_DIR)$Sexamples$Sdata + $(MKDIR) temp_data$S$(INSTALL_DIR)$Sexamples$Sdata$Set_jobshop + $(MKDIR) temp_data$S$(INSTALL_DIR)$Sexamples$Sdata$Sflexible_jobshop + $(MKDIR) temp_data$S$(INSTALL_DIR)$Sexamples$Sdata$Sjobshop + $(MKDIR) temp_data$S$(INSTALL_DIR)$Sexamples$Sdata$Smultidim_knapsack + $(MKDIR) temp_data$S$(INSTALL_DIR)$Sexamples$Sdata$Scvrptw + $(MKDIR) temp_data$S$(INSTALL_DIR)$Sexamples$Sdata$Spdptw + $(MKDIR) temp_data$S$(INSTALL_DIR)$Sexamples$Sdata$Sfill_a_pix + $(MKDIR) temp_data$S$(INSTALL_DIR)$Sexamples$Sdata$Sminesweeper + $(MKDIR) temp_data$S$(INSTALL_DIR)$Sexamples$Sdata$Srogo + $(MKDIR) temp_data$S$(INSTALL_DIR)$Sexamples$Sdata$Ssurvo_puzzle + $(MKDIR) temp_data$S$(INSTALL_DIR)$Sexamples$Sdata$Squasigroup_completion + $(MKDIR) temp_data$S$(INSTALL_DIR)$Sexamples$Sdata$Sdiscrete_tomography + $(COPY) LICENSE-2.0.txt temp_data$S$(INSTALL_DIR) + +data_archive: $(INSTALL_DIR)_data$(ARCHIVE_EXT) + +$(INSTALL_DIR)_data$(ARCHIVE_EXT): create_data_dirs ifeq ($(SYSTEM),win) - tools$Star.exe -c -v --exclude *svn* --exclude *roadef* --exclude *vector_packing* --exclude *nsplib* examples\\data | tools$Star.exe xvm -C temp\\$(INSTALL_DIR) + tools$Star.exe -c -v --exclude *svn* --exclude *roadef* --exclude *vector_packing* --exclude *nsplib* examples\\data | tools$Star.exe xvm -C temp_data\\$(INSTALL_DIR) + cd temp_data && ..$Stools$Szip.exe -r ..$S$(INSTALL_DIR)_data.zip $(INSTALL_DIR) else - tar -c -v --exclude *svn* --exclude *roadef* --exclude *vector_packing* --exclude *nsplib* examples/data | tar xvm -C temp/$(INSTALL_DIR) + tar -c -v --exclude *svn* --exclude *roadef* --exclude *vector_packing* --exclude *nsplib* examples/data | tar xvm -C temp_data/$(INSTALL_DIR) + cd temp_data && tar -c -v -z --no-same-owner -f ..$S$(INSTALL_DIR)_data.tar.gz $(INSTALL_DIR) endif + -$(DELREC) temp_data cc_archive: cc $(COPY) $(LIB_DIR)$S$(LIB_PREFIX)cvrptw_lib.$L temp$S$(INSTALL_DIR)$Slib