{"id":21214946,"url":"https://github.com/hadronized/sdb","last_synced_at":"2026-01-02T16:09:37.365Z","repository":{"id":4168605,"uuid":"5284206","full_name":"hadronized/sdb","owner":"hadronized","description":"Simple D Builder","archived":false,"fork":false,"pushed_at":"2012-12-08T09:16:35.000Z","size":316,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-21T16:26:34.864Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"D","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hadronized.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-08-03T10:42:32.000Z","updated_at":"2014-05-22T14:02:59.000Z","dependencies_parsed_at":"2022-08-25T21:11:43.234Z","dependency_job_id":null,"html_url":"https://github.com/hadronized/sdb","commit_stats":null,"previous_names":["hadronized/sdb"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadronized%2Fsdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadronized%2Fsdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadronized%2Fsdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadronized%2Fsdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hadronized","download_url":"https://codeload.github.com/hadronized/sdb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243664049,"owners_count":20327410,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T21:32:25.946Z","updated_at":"2026-01-02T16:09:37.334Z","avatar_url":"https://github.com/hadronized.png","language":"D","funding_links":[],"categories":[],"sub_categories":[],"readme":"================\nSimple D Builder\n================\nThe `Simple D Builder`, a.k.a `sdb` provides a simple solution to build your D projects.\nIt currently supports compilation and linking. Testing will be supported soon.\n\nI - Getting started\n===================\n1. Downloading\n--------------\nYou can download `sdb` on github by cloning the official repository:\n\n``$ git clone git@github.com:skypers/sdb.git``\n\nYou can also use the download section on the `sdb` github home page.\nFor the arch users, you can just install the `sdb` package I maintain in the AUR:\n\n``$ yaourt -S sdb``\n\n2. Compiling\n------------\nRun into the downloaded repo (or extract the archive into a `sdb` directory), then simply\ncompile and link all the .d files with your favourite D compiler. It is highly recommended\nto compile `sdb` with the best compilation flags.\n\nAnother important point: `sdb` lets you place its configuration where you want on your disk.\nYou just have to put the full path of the directory where you want `sdb` to look for its\nconfiguration in the ``conf_dir.dcfg`` file. Depending on your operating system, that file is\nlocated in a different directory in the ``conf/`` directory. For instance, on Windows, the file\nis ``conf/windows/conf_dir.dcfg``. On linux, it’s recommended not to change the default,\n``conf/linux/conf_dir.dcfg``, which is ``/etc/sdb/``. On Windows, you **have** to specify the\nfolder, for instance:\n\n``C:\\Users\\your_nick\\Documents\\sdb``\n\nThe name of the directory configuration doesn’t matter because `sdb` will know it once it’s been\ncompiled.\n\nYou have to pass the path of the directory where your compiler will search the ``conf_dir.dcfg``\nfile. For instance, with dmd, the path can be pass using the ``-Jpath`` flag.\n\nHere’s the complete set of commands to build `sdb` for a linux machine with a custom\nconfiguration directory (``~/.sdb.d``) using rdmd:\n\n::\n\n    $ cd sdb\n    $ mkdir ~/.sdb.d\n    $ echo \"~/.sdb.d\" \u003e conf/linux/conf_dir.dcfg\n    $ cd src\n    $ rdmd --build-only -release -w -wi -O -J../conf/linux sdb\n\nIt will generate a `sdb` binary file in ``src/``.\n\n3. Installing\n-------------\nThere is no support for install steps up to now, so you will have to place `sdb` in the\ninstallation directory on your own. On \\*nix systems, you can install it into ``/usr/local/bin/``\nor ``~/bin/`` for instance, adjusting your ``PATH`` environment variable:\n\n::\n\n    $ cd sdb/src\n    $ cp ./sdb ~/bin\n\nFor now, you can’t build anything because you don’t have any configured compilers for `sdb`. In the\n``conf/compilers/`` directory, you’ll find a lot of ``.conf`` configuration files, for instance\n``dmd.conf``. Each of those files represents the set of parameters `sdb` needs to use the given\ncompiler. Then, the ``dmd.conf`` file gathers all information `sdb` needs in order to allow you to use dmd\nwithin `sdb`.\n\nYou can just copy those files in the `sdb` configuration file you set before. Example:\n\n::\n\n    $ cd sdb/conf/compilers\n    $ cp *.conf ~/.sdb.d\n\nThat’s all!\n\nII - Using `sdb`\n================\n`sdb` has been written in order to make easy the build process of D projects. You just have to\nlearn a few keywords, then you will be able to write your applications like a boss and especially\nstart them very quickly.\n\n1. The configuration file\n-------------------------\nIn order to adapt to your projects, `sdb` uses a configuration file commonly called ``.sdb``, but you\ncan do what you want if it’s a matter for you.. That file gathers all the project’s main settings. Here is a\ncomprehensive list:\n\nTARGET:\n    Target type of the project. It can be **exec** for *executable*, **static** for *static library*\n    or **shared** for *dynamic library*.\nIMPORT_DIR:\n    List of all directories to look in when resolving imports, separated by blanks.\nLIB_DIR:\n    List of all directories to look in when resolving libs, separated by blanks. \nLIB:\n    List of all libraries to link against.\nROOT:\n    Root directory in which are located the source modules.\nENTRY_POINT:\n    Entry point module of the application.\nOUT_NAME:\n    Name of the output of the build.\n**Note: the directories' names must not include special characters like ``~`` because such\ncharacters are not correctly expanded**.\n\nEach keyword is followed by a space (or several ones), and by a value or a list of ones.\nHere is a sample:\n\n::\n\n    TARGET exec\n    ROOT ../src\n    ENTRY_POINT main\n    OUT_NAME test\n    IMPORT_DIR /usr/test\n    LIB_DIR ../lib\n    LIB DerelictUtil\n\nThe order the keywords appear does not matter, but they have to be upcase. Also, the directory\nseparator doesn’t matter, `sdb` will know what you meant when running on a specifc operating\nsystem, so choose you favourite one :).\n\n2. Default configuration\n------------------------\nBecause `sdb` is designed to be simple, it provides a default configuration for each project.\nTypically, if a particular setting isn’t set in the configuration file, `sdb` will use its\nown default. It’s really useful and powerful for two reasons: many projects look like each other,\nso the settings won’t be often changed, and it allows `sdb` to have extra settings — which make\nit not so simple as it ought to be.\n\nHere’s a comprehensive list of all current `sdb` defaults:\n\n- ``debug``\n- **TARGET**: ``exec``\n- **ROOT**: ``../src``\n- **TEST_DIR**: ``../test``\n- **OUT_NAME**: ``./out``\n- **AUTO_SCAN**: ``off``\n\nAs you may have noticed, the default root directory is placed in ``../src``. That encourages\nyou to do a *out-of-src-tree* build, in a *build-tree*. See the samples for projects examples.\n\n3. Module scan\n--------------\n`sdb` uses two short options to be able to adapt to your project and build it: the root directory\nand the entry point module. With both those information, it can compile all your files that take\npart of the final output. However, `sdb` needs to scan the entry point module to deduce what other\nmodules it has to build too. That process is called a *scan*, or *caching modules*. Moreover, `sdb`\ntracks dependencies between modules in order to update modules that ought to be.\n\n\n4. Command Line Interface\n-------------------------\n`sdb` is a CLI program. Because it aims to be simple, there are a few commands to control the build\nprocess:\n\nbuild:\n    Used to build the application.\nwith:\n    Prefix of the compiler to use, which has to follow on the command line.\nas:\n    Prefix of the build type to use, wich has to follow on the command line (``debug`` or ``release``).\nscan:\n    Used to launch a scan on the entry point.\nclean:\n    Used to clean the build tree.\n\nTo build your project, you have to:\n\n1. if you haven’t scanned it yet, scan it;\n2. once it’s scanned, build it with the compiler of your choice.\n\n5. Examples\n-----------\n\nHere are some examples with dmd:\n\n::\n\n    $ sdb scan\n    $ sdb build with dmd\n    $ sdb with dmd build # same as the line above\n    $ sdb with dmd # ditto\n    $ vim ../src/foo/bar/zoo.d # assume we edit that file\n    $ sdb with dmd # ok since ../src/foo/bar/zoo was scanned too\n    $ touch ../src/fail.d\n    $ sdb with dmd # ../src/fail.d is not compiled\n    $ sdb scan build with dmd # launch a brand new scan, then ../src/fail.d is found\n    $ ./app.bin # launch your app (debug)\n    $ sdb clean\n    $ sdb scan\n    $ sdb with gdc as release # compile the application for release\n\nIII - Support\n=============\nIf you have any problem or find any bug, do not hesitate to contact me at dimitri.sabadie@gmail.com. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhadronized%2Fsdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhadronized%2Fsdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhadronized%2Fsdb/lists"}