Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
translations translations
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Thank You for your continued support and contributions!

+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Make files customizing
« previous next »
  • Print
Pages: [1]

Author Topic: Make files customizing  (Read 3178 times)

Offline 007quick

  • Member
  • *
  • Posts: 70
Make files customizing
« on: March 15, 2007, 04:26:19 PM »
I want to cause the make zip command to output a file with a different name than rockbox.zip I make multiple builds so having it automaticly rename the files would be great. Anyone know which line I should edit?
Logged

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3555
  • creature
Re: Make files customizing
« Reply #1 on: March 15, 2007, 04:33:03 PM »
just look for the "zip" target in the created Makefile. But I don't understand why you would want to do that, you should (read: need to) make every build in a separate folder anyway, and simply renaming the file (by a script that invokes all builds) is the easiest (and IMO cleanest) solution as it won't break on build changes in svn.
Logged

Offline 007quick

  • Member
  • *
  • Posts: 70
Re: Make files customizing
« Reply #2 on: March 15, 2007, 04:45:32 PM »
I have folders that I make the builds in but I need them to have a different name so that I can upload them onto my site. Since I use the same make files all the time I think that it makes sense to just have the make file make them as a differnt name.
EG. a build for a H10 5gb could be rockbox_H10_5gb.zip
a build for a H10 20gb could be rockbox_H10_20gb.zip
see?
zip:
   $(SILENT)$(TOOLSDIR)/buildzip.pl $(VERBOSEOPT) -t \"$(ARCHOS)\" -r "$(ROOTDIR)" $(TARGET) $(BINARY)
I beleive that that is the line which tells it what to do for zips. Also, if it could put it in a differnt directory would be amazing too.
Logged

(:@)

  • Guest
Re: Make files customizing
« Reply #3 on: March 15, 2007, 04:51:02 PM »
you can add the switch -o following by the output name e.g.:
zip:
   $(SILENT)$(TOOLSDIR)/buildzip.pl -o \"$(ARCHOS)\" $(VERBOSEOPT)...
Logged

Offline 007quick

  • Member
  • *
  • Posts: 70
Re: Make files customizing
« Reply #4 on: March 15, 2007, 05:07:30 PM »
works perfect!
Thanks!
Logged

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3555
  • creature
Re: Make files customizing
« Reply #5 on: March 15, 2007, 05:39:37 PM »
I was thinking about something like
Code: [Select]
for i in builddir1 builddir2 builddir3; do make -C $i && make -C $i zip && cp $i/rockbox.zip ./$i-rockbox.zip; done
not even the slightest modification to any Makefile needed. Will save much hassle if the Makefile changes ...
Logged

Offline 007quick

  • Member
  • *
  • Posts: 70
Re: Make files customizing
« Reply #6 on: March 15, 2007, 05:45:57 PM »
Certainly wasn't very hard to edit the make files but I don't understand what your code does. I am fairly new to this whole thing so you will have to explain a bit more. Thanks!
Logged

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3555
  • creature
Re: Make files customizing
« Reply #7 on: March 15, 2007, 05:57:52 PM »
it loops through the named folders (builddir1, builddir2 and builddir3 in my example), builds the source in that folders and copies the resulting rockbox.zip to the current folder and prefixes the files with the foldername. So you just need to adjust your folder names apropriately and are done.

Of course you can extend that to be a bit more flexible about the names of the resulting files. You could omit the rockbox.zip ending and simply use the folder name (so builddir1 will create a builddir1.zip) or add a prefix (and make builddir1 create rockbox-builddir1.zip)

It's quite straightforward bash without anything special. FYI, I'm building the whole set of manuals frequently in a similar way.
Logged

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox Development
| |-+  Starting Development and Compiling
| | |-+  Make files customizing
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.047 seconds with 16 queries.