Skip to content

Commit 688bbf5

Browse files
committed
docs: quick build instructions update
1 parent 964691a commit 688bbf5

File tree

2 files changed

+36
-15
lines changed

2 files changed

+36
-15
lines changed

debian/configure

+1-1
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

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

62-
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.
62+
GitHub is an infrastructure on its own and explained in depth elsewhere.
63+
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.
6364
GitHub refers to such an additional instance of another repository as a "fork".
6465
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.
6566
After creating your own GitHub fork of LinuxCNC, clone it to your development machine and proceed with your hacking as usual.
@@ -72,12 +73,13 @@ GitHub makes this sharing very easy: After you polish your changes and push them
7273

7374
For the impatient, try this:
7475

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

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

90-
-----
92+
[source,console]
93+
----
9194
$ sudo make setuid
92-
-----
95+
----
9396

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

99+
[source,console]
96100
-----
97101
$ source ../scripts/rip-environment
98102
$ runtests
@@ -165,10 +169,11 @@ The `src/configure` script configures how the source code will be compiled.
165169
It takes many optional arguments.
166170
List all arguments to `src/configure` by running this:
167171

168-
-----
172+
[source,console]
173+
----
169174
$ cd linuxcnc-source-dir/src
170175
$ ./configure --help
171-
-----
176+
----
172177

173178
The most commonly used arguments are:
174179

@@ -212,10 +217,11 @@ Building just a specific target::
212217
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.
213218
For example, if you are working on a component named `froboz`, you can build its executable by running:
214219
+
215-
-----
220+
[source,console]
221+
----
216222
$ cd linuxcnc-source-dir/src
217223
$ make ../bin/froboz
218-
-----
224+
----
219225

220226
=== Building Debian Packages
221227

@@ -249,6 +255,7 @@ that are detailed below:
249255

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

258+
[source,console]
252259
----
253260
$ sudo apt-get install build-essential
254261
----
@@ -257,6 +264,7 @@ Once those prerequisites are met, building the Debian packages consists of two s
257264

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

267+
[source,console]
260268
----
261269
$ cd linuxcnc-dev
262270
$ ./debian/configure
@@ -274,6 +282,7 @@ to minimize latencies.
274282

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

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

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

363+
[source,console]
353364
----
354365
sudo apt-get build-dep .
355366
----
@@ -369,9 +380,10 @@ what's missing.
369380

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

372-
-----
383+
[source,console]
384+
----
373385
$ sudo apt-get install dpkg-dev
374-
-----
386+
----
375387

376388
This generates the file `debian/control` in a user-readable yaml-format
377389
which lists the build-dependencies close to the top.
@@ -388,9 +400,10 @@ If you are new to Linux and git version management, a clean start may be prefera
388400
The `dpkg-checkbuilddeps` (also from the dpkg-dev package that is installed as part of the build-essential dependencies) program
389401
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`):
390402

391-
-----
403+
[source,console]
404+
----
392405
$ dpkg-checkbuilddeps
393-
-----
406+
----
394407

395408
It will emit a list of packages that are required to build LinuxCNC on your system but are not installed, yet.
396409
You can now install missing build-dependencies
@@ -425,6 +438,7 @@ Set it to
425438
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.
426439

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

454+
[source,console]
440455
----
441456
dpkg -c ../linuxcnc-uspace*.deb
442457
----
@@ -448,6 +463,7 @@ Quit with "q".
448463

449464
To install the packages, run
450465

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

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

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

528+
[source,console]
510529
-----
511530
~/src $ python -m venv --system-site-packages ~/src/venv
512531
~/src $ . ~/src/venv/bin/activate
@@ -516,6 +535,7 @@ the pip packages:
516535

517536
Then you can contrinue as normally:
518537

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

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

0 commit comments

Comments
 (0)