---
name: "makeobj"
section: "1"
platform: "linux"
package: "kdesdk-scripts"
version: "4:18.08.0-1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/makeobj"
---

# makeobj(1)

run make from the correct directory

## NAME

makeobj - run make from the correct directory

## SYNOPSIS

**makeobj** \[ *make-argument* ... \]

## DESCRIPTION

**makeobj** is a wrapper around **make** which basically checks whether it's in the source directory or the build directory and changes to the correct directory before calling make.

The command-line arguments will (generally) be passed directly to make.

This script is useful if the source directory is different from the build directory and the Makefiles are kept in the build directory, as is common for instance when building the KDE sources.  This script can however be used in more standard scenarios (such as non-KDE projects for which the source and build directories are the same), where it will behave just like make.

One of the environment variables OBJ\_SUBDIR or OBJ\_REPLACEMENT should be set to indicate where the build directory is in relation to the source directory.

This utility is part of the KDE Software Development Kit.

## ENVIRONMENT VARIABLES

Note that only one of OBJ\_SUBDIR and OBJ\_REPLACEMENT should be used. If the build directory is simply a subdirectory of the source directory, the simpler variable OBJ\_SUBDIR should be used.

- OBJ\_SUBDIR

  Indicates that the build directory is in the given subdirectory of the source directory.  For instance, if the source directory is *kdesdk* and the build directory is *kdesdk/obj-i386-linux*, then OBJ\_SUBDIR should be set to *obj-i386-linux*.

- OBJ\_REPLACEMENT

  A **sed** expression that is used to transform the source directory into the build directory. For instance, if the source directory is *~/src/kdesdk* and the build directory is *~/src/kdesdk-obj*, then OBJ\_REPLACEMENT could be set to *s#src/kdesdk#src/kdesdk-obj#*.

## SEE ALSO

[**make**(1)](/make/1.md), [**sed**(1)](/sed/1.md).

## AUTHOR

makeobj was written by Stephan Kulow \<coolo@kde.org\>.\
 This manual page was prepared by Ben Burton \<bab@debian.org\> for the Debian GNU/Linux system (but may be used by others).
