You are hereweld the (not just for) FreeBASIC build system

weld the (not just for) FreeBASIC build system


By sir_mud - Posted on 09 June 2010

weld is a simple replacement for most uses of make and similiar tools. Unlike other systems weld is not a full blown, Turing complete language, it is just a simple way to describe most software sources. weld is still a young project but is fairly stable already.

Installation:

  • Simply copy "weld.exe" to a directory that is in your PATH.
  • You will need to set an environment variable on Windows so weld can find your freebasic compiler. The variable is: fbc=C:\path\to\fbc\fbc.exe How To Manage Environment Variables in Windows XP, the process is very similar for Vista and 7.

Mercurial Source Control hosted by Google Code. Download: (new version)

Limitations:

  • Comments are specified with the character # but are only ignored at the beginning (after removal of whitespace) of a line and after a section header.
  • Several convenience functions I have planned are not implemented at this time including: glob file specifiers and others.
  • While theoretically it should work with other compilers (like gcc) that feature has not been tested. If you'd like to test it out check out how to define a new compiler in "parser.bas"
  • There currently is no "include" functionality so everything about your project must be in the same file.
  • Simplicity comes at the cost of the inability to do a lot of what other systems can do. But those don't come with a option to "automagically" generate a build file now do they :p
  • Support for other compilers is preliminary at this point, for example gcc and g++ do not support building static libraries because gcc and g++ do not natively support building them, you have to use ar. This will be fixed in a later release.

Changelog:

0.99.7

  • Fixes some errors that could cause a broken build.
  • Added build number support default FreeBASIC compiler defines __WELD_BUILDN=buildnumber, other languages can use the $buildno replacement for a similar option for that language.
  • Also, now if there is no weld.it file in the current directory but there is a src directory weld will automatically retry with src as the current directory.

.99.6

  • Mostly just bugfixes and more replacements of fake with weld.
  • Major bug involving autogeneration where it would require both -am and -ao when only one is necessary (both can be used though).
  • Major bug involving library compilation where you would get errors about main already being defined was fixed.

.99.5

  • Added Global and User (*nix and win32 only) level configuration file support. Global file is:
    • Windows: exepath\global.config
    • *nix: /etc/weld/global.config
    • DOS: exepath\weld.cfg

    User file is:

    • Windows: %APPDATA%\weld.config
    • *nix: ~/.weld.config

    Configurations are parsed in the order GLOBAL - USER - LOCAL. Only Compiler and Global sections are recognized at the GLOBAL and USER levels. Later definitions overwrite existing values. A sample global configuration file is provided in the Data directory providing support for fbc, gcc and g++.

  • Compiler definitions now support multiple file extensions.

.99d

  • Added @platform: specifiers to module parsing, supported values are win32, dos and unix
  • Changed default behaviour when a file with extension is passed to attempt to use a weld.it in that directory for IDE compatibility.
  • Added option -r/--run for IDE compatibility

Command line option listing: Located here now.

License Information: Standard 3-clause BSD License

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asm>, <bash>, <c>, <cpp>, <qt>, <csharp>, <freebasic>, <javascript>, <make>, <php>, <python>, <ruby>.
  • E-Mail addresses are hidden with reCAPTCHA Mailhide.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.