Giter Site home page Giter Site logo

sierdzio / gibs Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 1.0 498 KB

Experimental project: in-source build system. Just for fun ;-)

License: Other

QMake 3.09% C++ 58.69% HTML 2.57% CSS 20.78% JavaScript 1.71% Python 3.72% Shell 6.34% PowerShell 1.57% Batchfile 1.53%
build-automation build-system project-less qt

gibs's People

Contributors

sierdzio avatar

Watchers

 avatar  avatar

Forkers

fernandofvh

gibs's Issues

Add quick mode

When run with -q or --quick, ibs should only parse .h files up to Q_OBJECT (or gadget) macro, or (if none found) up to first private/protected/public declaration. In .cpp files, parsing should stop at first "real" code like a function definition.

Plus other optimisations you may find, of course.

Add ifdef support and scopes

IBS should understand #ifdef statements from C++.

The biggest problem with that are ifdefs from external libraries (like Q_OS_LINUX) - how to include them? Parse all included headers? That seems like a waste of time. This needs to be thought out.

Proposed syntax:

/*i
ifdef Q_OS_LINUX
  libs -Llinux/lib -lqzxing
else
  libs -Lwindows/lib -lqzxing
endif
*/

Or (for OSes) something like:

//i platform linux libs libs -Llinux/lib -lqzxing

Allow debug and release builds

Quite obvious, isn't it? Currently gibs only builds in debug mode.

Proposed syntax:

gibs --release main.cpp
gibs --debug main.cpp

Which should be the default? Most probably the release build.

Comments and docs

While the Readme is fairly up to date, ibs is severely lacking comments and doxygen docs.

Add module support

If, for example, a header includes something from ../other_dir/, we should be able to add that path to include paths. Much like INCLUDEPATH works in qmake.

Syntax:

//i include ../other_dir
// Or
//i module ../other_dir

Or something.

Support concurrent build

IBS should use all CPU cores / threads by default. It can be modified using the traditional -j X flag.

Hard scoping support

ibs can theoretically strictly control which -I includes and -L library includes are needed where - and not use them for every compilation and linking step. Make it a reality. This could potentially speed things up.

mkspecs parser

qmake's mkspecs are a splendid source of ready-made environment configurations. It would be cool if gibs could tap into it.

Feature support

Features are optional, compile time functionalities which can be turned on or off.

Internally they can be just subprojects of type zero: they don't produce an app or library, just provide include files and sources. Feature also adds a define for the compiler.

A feature can be turned on by passing --some-feature to ibs. Feature can be turned off with --no-some-feature.

Support incremental builds

Running ibs again on already-compiled project should run very quickly - only changed files should be parsed and updated.

Add config files

Config file (located either in current dir or $HOME/.config/) could hold useful paths, like:

  • Qt dir
  • Android SDK path
  • Android NDK path
  • Android APIs
  • etc.

Remove Qt dependency

Well, although I admit it with sadness, a proper build system should have as few dependencies as possible. So, if possible, gibs should be compilable with just standard library (plus maybe some minimal JSON lib).

Add clean step

IBS should be able to clean up after itself. Syntax:

ibs clean

It should clean all build artefacts.

ibs purge

This command should also remove all remaining ibs files (caches etc.).

Accept floating point job number

If -j 0.5 is specified, ibs will use half of available CPU cores.

The "normal" option remains the same: -j 5 will limit ibs to 5 cores.

Automatically scan include dirs

Directories below input file are likely to contain project code - we can add an option to scan them automatically (with corresponding command line flag).

Add custom LIBS support

Users need to be able to define dependencies (libaries), much like LIBS in qmake.

Proposed syntax:

//i libs -Lsome/path -lname

Subprojects

Ibs should be able to handle multiple targets.

And it should use it's system of only waiting when absolutely necessary to speed up module compilation.

Modules

Gibs could have a notion of a Module: a defined package (usually a library) that can be included easily into other C++ applications (also build using gibs). An application could specify:

//i import path/to/module.gibs
// or
//i import github.com/user/repo.git

Seeing this, gibs would automatically parse the module and include necessary headers and libraries (if any). When pointed to a remote repository, it would first clone it and then do that work. In this sense, modules could be similar to how Go language works.

The actual module would be just a regular gibs project. No special syntax is necessary. At least initially, because we would need to introduce some versioning etc.

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.