create archive for data files separate from main binary archive

This commit is contained in:
Laurent Perron
2018-06-05 14:31:19 +02:00
parent 211e6ab93f
commit 84ee2d9467

View File

@@ -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