Skip to content

Commit 207753e

Browse files
committed
docs: quick build instructions update
1 parent ca86acb commit 207753e

2 files changed

Lines changed: 36 additions & 15 deletions

File tree

debian/configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ fi
195195

196196

197197
rm -f ../build-stamp
198-
echo "successfully configured for '$DISTRIB_NAME'.."
198+
echo "I: Successfully configured for '$DISTRIB_NAME'."
199199

200200
echo "I: You can now start the build of LinuxCNC Debian packages."
201201
echo " To build and test everything: fakeroot debian/rules binary"

docs/src/code/building-linuxcnc.adoc

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ $ git clone https://github.com/LinuxCNC/linuxcnc.git linuxcnc-source-dir
6060
This is called a "clone" of the LinuxCNC repository.
6161
The advantage is that this local clone supports the communication about changes you may decide to perform on the source tree.
6262

63-
GitHub is an infrastructure on its own and explained in depth elsewhere. Just to get you motivated if you do not know it already.offers to perform a clone for you and have that instance made publicly available.
63+
GitHub is an infrastructure on its own and explained in depth elsewhere.
64+
Just to get you motivated if you do not know it already.offers to perform a clone for you and have that instance made publicly available.
6465
GitHub refers to such an additional instance of another repository as a "fork".
6566
You can easily (and at no cost) create a fork of the LinuxCNC git repository at GitHub, and use that to track and publish your changes.
6667
After creating your own GitHub fork of LinuxCNC, clone it to your development machine and proceed with your hacking as usual.
@@ -73,12 +74,13 @@ GitHub makes this sharing very easy: After you polish your changes and push them
7374

7475
For the impatient, try this:
7576

77+
[source,console]
7678
----
7779
$ git clone https://github.com/LinuxCNC/linuxcnc.git linuxcnc-source-dir
7880
$ cd linuxcnc-source-dir/src
79-
$ ./autogen.sh
80-
$ ./configure --with-realtime=uspace
81-
$ make
81+
$ ./debian/configure
82+
$ sudo apt-get build-dep .
83+
$ DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -uc -B
8284
----
8385

8486
That will probably fail! That doesn't make you a bad person,
@@ -88,12 +90,14 @@ Especially the section on <<Satisfying-Build-Dependencies,Satisfying Build Depen
8890
If you are running on a realtime-capable system (such as an install from the LinuxCNC Live/Install Image,
8991
see the <<sub:realtime,Realtime>> section below), one extra build step is needed at this time:
9092

91-
-----
93+
[source,console]
94+
----
9295
$ sudo make setuid
93-
-----
96+
----
9497

9598
After you have successfully built LinuxCNC it is time to run the tests:
9699

100+
[source,console]
97101
-----
98102
$ source ../scripts/rip-environment
99103
$ runtests
@@ -163,10 +167,11 @@ The `src/configure` script configures how the source code will be compiled.
163167
It takes many optional arguments.
164168
List all arguments to `src/configure` by running this:
165169

166-
-----
170+
[source,console]
171+
----
167172
$ cd linuxcnc-source-dir/src
168173
$ ./configure --help
169-
-----
174+
----
170175

171176
The most commonly used arguments are:
172177

@@ -210,10 +215,11 @@ Building just a specific target::
210215
If you want to build just a specific part of LinuxCNC, you can name the thing you want to build on the `make` command line.
211216
For example, if you are working on a component named `froboz`, you can build its executable by running:
212217
+
213-
-----
218+
[source,console]
219+
----
214220
$ cd linuxcnc-source-dir/src
215221
$ make ../bin/froboz
216-
-----
222+
----
217223

218224
=== Building Debian Packages
219225

@@ -247,6 +253,7 @@ that are detailed below:
247253

248254
Build tools have been gathered as a virtual package named `build-essential`. To install it, run:
249255

256+
[source,console]
250257
----
251258
$ sudo apt-get install build-essential
252259
----
@@ -255,6 +262,7 @@ Once those prerequisites are met, building the Debian packages consists of two s
255262

256263
The first step is generating the Debian package scripts and meta-data from the git repo by running this:
257264

265+
[source,console]
258266
----
259267
$ cd linuxcnc-dev
260268
$ ./debian/configure
@@ -272,6 +280,7 @@ to minimize latencies.
272280

273281
Once the Debian package scripts and meta-data are configured, build the package by running `dpkg-buildpackage`:
274282

283+
[source,console]
275284
----
276285
$ dpkg-buildpackage -b -uc
277286
----
@@ -337,6 +346,7 @@ You can use this meta-data to easily list the required packages missing from you
337346
First, go to the source tree of LinuxCNC and initiate its default self-configuration,
338347
if not already performed:
339348

349+
[source,console]
340350
-----
341351
$ cd linuxcnc-dev
342352
$ ./debian/configure
@@ -349,6 +359,7 @@ the build-dependencies for those to-be-created packages.
349359
The most straightforward way to get all build-dependencies installed is to just
350360
execute (from the same directory):
351361

362+
[source,console]
352363
----
353364
sudo apt-get build-dep .
354365
----
@@ -368,9 +379,10 @@ what's missing.
368379

369380
First, install the `dpkg-checkbuilddeps` program by running:
370381

371-
-----
382+
[source,console]
383+
----
372384
$ sudo apt-get install dpkg-dev
373-
-----
385+
----
374386

375387
This generates the file `debian/control` in a user-readable yaml-format
376388
which lists the build-dependencies close to the top.
@@ -387,9 +399,10 @@ If you are new to Linux and git version management, a clean start may be prefera
387399
The `dpkg-checkbuilddeps` (also from the dpkg-dev package that is installed as part of the build-essential dependencies) program
388400
can be asked to do its job (note that it needs to run from the `linuxcnc-source-dir` directory, *not* from `linuxcnc-source-dir/debian`):
389401

390-
-----
402+
[source,console]
403+
----
391404
$ dpkg-checkbuilddeps
392-
-----
405+
----
393406

394407
It will emit a list of packages that are required to build LinuxCNC on your system but are not installed, yet.
395408
You can now install missing build-dependencies
@@ -424,6 +437,7 @@ Set it to
424437
You should not set this option to gain some extra confidence in your build to perform as expected unless you are running into mere technical difficulties with the test-specific software dependencies.
425438

426439
An environment variable can be set together with the execution of the command, e.g.
440+
[source,console]
427441
----
428442
DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -uc -B
429443
----
@@ -436,6 +450,7 @@ The tool installing it, `dpkg` is part of every Debian installation.
436450
The .deb files created by `dpkg-buildpackage` are found in the directory above the linuxcnc-source-dir, i.e. in `..`.
437451
To see what files are provided in a package, run
438452

453+
[source,console]
439454
----
440455
dpkg -c ../linuxcnc-uspace*.deb
441456
----
@@ -447,6 +462,7 @@ Quit with "q".
447462

448463
To install the packages, run
449464

465+
[source,console]
450466
----
451467
sudo dpkg -i ../linuxcnc*.deb
452468
----
@@ -484,6 +500,7 @@ The file should contain the following line:
484500
Log out and log back in to make the changes take effect.
485501
Verify that the memory lock limit is raised using the following command:
486502

503+
[source,console]
487504
-----
488505
$ ulimit -l
489506
-----
@@ -494,6 +511,7 @@ Building on Gentoo is possible, but not supported. Be sure you are
494511
running a desktop profile. This project uses the Tk Widget Set, asciidoc,
495512
and has some other dependencies. They should be installed as root:
496513

514+
[source,console]
497515
-----
498516
~ # euse -E tk imagequant
499517
~ # emerge -uDNa world
@@ -506,6 +524,7 @@ You can switch back to being a normal user for most of the rest of the
506524
install. As that user, create a virtual environment for pip, then install
507525
the pip packages:
508526

527+
[source,console]
509528
-----
510529
~/src $ python -m venv --system-site-packages ~/src/venv
511530
~/src $ . ~/src/venv/bin/activate
@@ -515,6 +534,7 @@ the pip packages:
515534

516535
Then you can contrinue as normally:
517536

537+
[source,console]
518538
-----
519539
(venv) ~/src $ git clone https://github.com/LinuxCNC/linuxcnc.git
520540
(venv) ~/src $ cd linuxcnc
@@ -528,6 +548,7 @@ There is no need to run "make suid", just make sure your user is in
528548
the "dialout" group. To start linuxcnc, you must be in the Python
529549
Virtual Environment, and set up the linuxcnc environment:
530550

551+
[source,console]
531552
-----
532553
~ $ . ~/src/venv/bin/activate
533554
(venv) ~ $ . ~/src/linuxcnc/scripts/rip-environment

0 commit comments

Comments
 (0)