GithubHelp home page GithubHelp logo

Comments (5)

NobbZ avatar NobbZ commented on September 16, 2024

Do you want a huge monolithic Makefile to rule them all or a master Makefile which recursively calls another languages Makefile?

If the latter you should probably define a list of targets that are used as API.

from wordcount.

juditacs avatar juditacs commented on September 16, 2024

I'm leaning towards one monolithic Makefile (it wouldn't be that long, less than half of the solutions need compiling), but I'm open to suggestions.

from wordcount.

NobbZ avatar NobbZ commented on September 16, 2024

I'm not only concerned about compiling, but also running and cleaning.

A monolithic file which holds everything would grow into an unmaintainable state as the count of implementing languages grow.

A recursive Makefile, which does simply run some predefined targets on every Makefile in every folder except for data and scripts can be created once and might never get touched from then on. Additionally one can use all the Makefile-magic one knows in the languages Makefile without messing up with the monolith. This also means less merge-conflicts when there are several PRs open that want to add a new implementation.

As a quickshot I'd go for a language-Makefile with the following targets:

  • build: Builds if necessary, just runs true if scripted
  • run: Runs the program. If you add this rule, you can get rid of the run_commands completely.
  • clean: You should never have a Makefile without this rule ;)

Looking at those, you can also provide some small Makefile.template which would be sufficient for most scripted languages and only the run-target needs to get changed, compiled languages need to alter a little bit more, but most of their programmers will know what to do exactly, since most is just forwarding to some languages build tool.

# For scripted languages it might be unnecessary to change anything except the line below `run:`                    
# Please keep in mind, that whatever you do, <TAB> characters need to stay intact!                                  

build:                                                                                                              
        true # commands to create your binary/executable                                                            

clean:                                                                                                              
        true # commands to clean buildartifacts                                                                     

rebuild: clean build                                                                                                

run:                                                                                                                
        ./wordcount # command to start your version

from wordcount.

NobbZ avatar NobbZ commented on September 16, 2024

If you don't mind, I'd like to give it a shot during the next couple of days along with another idea I have regarding contributors.

from wordcount.

juditacs avatar juditacs commented on September 16, 2024

Not at all. Go ahead please, it would help a lot.

from wordcount.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.