(POSTED TO dlslug-discuss TO AID DISCUSSION)] Yes, this does sound like a good application for make.
https://blog.mindlessness.life/2019/11/17/the-language-agnostic-all-purpose-incredible-makefile.html This article prompted the discussion of make at the last meeting. I had not known that you could mix shell commands into the target:dependency part of the Makefile. He does not us any make automatic variables: $^ is list of all dependencies $@ is the target https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html On Sun, 2019-12-08 at 23:56 -0500, Adam Johnson wrote: > That's amazing timing. I was just looking at Make today for the first time > in many years, then I saw your email. > > I was musing about it as a coach of a First Lego League team that just went > to States this weekend. > > This year, FIRST allowed non-Lego software, and we decided to take the > plunge. > There's an EV3Basic extension to Microsoft SmallBasic that compiles to the > same RobotBasic output by Lego's Mindstorm EV3-G Labview/Silverlight based > programming environment produces, so no change to the robot's firmware is > needed. > > However, SmallBasic is a very small language - no #include or import > mechanisms in the language. > > Since the teams main programmer had created some very handy re-usable robot > navigation routines, and we had several laptops and several kids writing > code for individual mission runs, it was hard to make any updates to the > library of navigation routines once more than one person had copy/pasted > the code into the beginning of their mission program. > > all the mission programs get pulled into one master program with a custom > menu for competition time, but usually that only happens the last week or > so (this time, the night before) competition, so it's hard to even identify > any inter-mission transition automation code that might be helpful > > So I was thinking about using Make. Each mission program could be in it's > own file, Make would be used to concat the library file and the mission > code to give the team member a stand-alone program he could send to the > robot to run during testing, and a master Make file could be used to > combine all the missions into a Master program more easily as well. > > We have been using an SVN server - with EV3-G that was mostly a file server > that could pull back previous versions, and make backups on the other > laptops as other kids did Updates. > However, now I'm thinking some type of CI system would encourage more > frequent Commits - if a code commit would build a new master program.... > hmm, gonna have to check if the FLL rules allow high school freshmen after > all, or my son at least won't have the FLL reason to go down this discovery > route. > > On Sun, Dec 8, 2019 at 7:57 PM Lloyd Kvam <pyt...@venix.com> wrote: > > > Today, I ran a Fedora update that included a new kernel. The Makefile > > worked properly! > > Remember that the indented lines need TAB characters should you copy this > > from the email. > > > > The Makefile: > > > > .SUFFIXES: > > .PHONY: all upgrade > > > > all: upgrade .make.grubenv > > > > upgrade: > > dnf upgrade > > > > ### dnf bug where a kernel upgrade changes the default boot target > > ### we need to boot with the Xen hypervisor for the guest OS > > ### > > .make.grubenv: /boot/grub2/grubenv > > grub2-editenv list > > grub2-set-default 'Fedora, with Xen hypervisor' > > touch $@ > > > > -- > > Lloyd Kvam > > Venix > > DLSLUG/GNHLUG library > > http://dlslug.org/library.html > > http://www.librarything.com/catalog/dlslug > > http://www.librarything.com/catalog/dlslug&sort=stamp > > http://www.librarything.com/rss/recent/dlslug > > > > > > > > _______________________________________________ > > DLSLUG-Announce mailing list > > dlslug-annou...@dlslug.org > > https://mail.dlslug.org/mailman/listinfo/dlslug-announce > > -- Lloyd Kvam Venix DLSLUG/GNHLUG library http://dlslug.org/library.html http://www.librarything.com/catalog/dlslug http://www.librarything.com/catalog/dlslug&sort=stamp http://www.librarything.com/rss/recent/dlslug _______________________________________________ DLSLUG-Announce mailing list dlslug-annou...@dlslug.org https://mail.dlslug.org/mailman/listinfo/dlslug-announce _______________________________________________ gnhlug-announce mailing list gnhlug-annou...@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-announce/ _______________________________________________ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/