supplierdeeply

Makefile option to ZIP folder and all its contents

  • 3 Replies
  • 2332 Views
Makefile option to ZIP folder and all its contents
« on: 01 / July / 2008, 07:44:38 »
Advertisements
I am sure that I have been able to do this previously but have lost the details.


How do I add a folder and its contents to the ZIP file ?


David

*

Offline ewavr

  • ****
  • 1057
  • A710IS
Re: Makefile option to ZIP folder and all its contents
« Reply #1 on: 01 / July / 2008, 07:56:36 »
For example, adding "lang" folder with all subfolders:

Code: (diff) [Select]
Index: Makefile
===================================================================
@@ -62,6 +62,7 @@
  rm -f $(topdir)bin/$(VER)-$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER).zip
  LANG=C echo -e "CHDK-$(VER) for $(PLATFORM) fw:$(PLATFORMSUB) build:$(BUILD_NUMBER) date:`date -R`" | \
      zip -9jz $(topdir)bin/$(VER)-$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER).zip $(topdir)bin/DISKBOOT.BIN > $(DEVNULL)
+     zip -9r $(topdir)bin/$(VER)-$(PLATFORM)-$(PLATFORMSUB)-$(BUILD_NUMBER).zip $(topdir)lang/*
 ifdef PLATFORMOS
   ifeq ($(PLATFORMOS),vxworks)
  cp $(topdir)bin/$(PLATFORM)-$(PLATFORMSUB).FIR $(topdir)bin/PS.FIR


updated!
« Last Edit: 01 / July / 2008, 08:06:40 by ewavr »

Re: Makefile option to ZIP folder and all its contents
« Reply #2 on: 01 / July / 2008, 08:20:40 »
Thanks Ewavr, I eventually worked it out  :)

I had accidentally missed a bracket.

It works fine now.


David

*

Offline PhyrePhoX

  • *****
  • 2254
  • make RAW not WAR
    • PhyreWorX
Re: Makefile option to ZIP folder and all its contents
« Reply #3 on: 01 / July / 2008, 08:22:06 »
hehe, i am preparing something like this as well, thanks for the heads up :)


 

Related Topics