summaryrefslogtreecommitdiffstats
path: root/scripts/lib/ptxd_lib_dgen.awk
Commit message (Collapse)AuthorAgeFilesLines
* ptxd_lib_dgen: fix <PKG>_CONFIG handlingptxdist-2019.10.1stable/ptxdist-2019.10.xMichael Olbrich2019-10-171-3/+4
| | | | | | | | | Don't evaluate <PKG>_CONFIG when it's not needed and only undefine it when the variable is actually empty. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> (cherry picked from commit 08f7e13bb0558eca32c5ed7a69c2b03ab30c3d34) Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: make sure the package license report is regenerated as neededMichael Olbrich2019-10-101-1/+4
| | | | | | | Add the dependency on the cfghash for <pkg>.report as well to ensure that changes to <PKG>_LICENSE* are noticed. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: make sure <PKG>_CONFIG is only evaluated onceMichael Olbrich2019-10-061-0/+3
| | | | | | | | | Packages may define <PKG>_CONFIG with '=' to avoid evaluating a complex shell call if the package is not selected. However, this means the variable is evaluated multiple time if the package _is_ selected. Avoid this by overwriting the variable with itself using ':='. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: remove unnecessary dependency on the config filesMichael Olbrich2019-10-061-9/+0
| | | | | | The config file is part of the hash. No need to depend on it. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: speed up hash generationMichael Olbrich2019-10-061-7/+9
| | | | | | | | | | To create the hash for patch files, ptxdist executes several processes for each package with patches. With many packages with patches, this creates quite a lot of startup overhead. To avoid this, collect all patch directories first and handle them with an extra awk script and one find call. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_make_world_patchin: allow specifying a custom patch directoryMichael Olbrich2019-10-031-3/+9
| | | | | | | | If <PKG>_PATCHES is set, then it is used instead of $(<PKG>) to find the patch directory. It must be a relativ directory name that can be found in the usual search path. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* rules: add PTX_PACKAGES_ALL and PTX_PACKAGES_DISABLEDMichael Olbrich2019-10-031-0/+3
| | | | | | | | | | | Note: we cannot determine PTX_PACKAGES_DISABLED using PACKAGES- etc. With the way various packages handle platform specific exceptions, this would result in missing or dplicate packages. Instead, list all packages in ptxd_lib_dgen and filter out the enabled packages. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: handle removed patches betterMichael Olbrich2019-09-081-2/+3
| | | | | | | | | | If all patches for a package are removed then the package is currently not reextracted because the .srchash dependency is just dropped and not changed. Fix this by defining a fake hash. This way the dependency changes and the package is extracted again. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* CREDITS: remove unmaintained fileRoland Hieber2019-07-031-2/+0
| | | | | | | | | | | | | | | This file has been touched 2 times in the last 7 years, and is no longer up to date. Remove it to carry less unmaintained stuff around. Also remove all references to it from file headers using for file in `g grep -l 'See CREDITS for details about who has'`; do sed -i '/See CREDITS for details about who has/,+1d' $file done as well as the different wording from rules/other/Toplevel.make. Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: error out for targetinstall stages in host/cross/image packagesRoland Hieber2019-06-121-0/+14
| | | | | | | | | | This point came up multiple times in the past and the special handling of targetinstall stages lead to confusion when trying to depend on image packages. Document it to prevent further confusion in that matter, and warn the user if such a make target exists. Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: fix typosRoland Hieber2019-06-121-1/+1
| | | | | Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: add line counterRoland Hieber2019-06-121-1/+4
| | | | | | | | | We cannot simply use NR for line counting because RS is changed in function dump_file. Add an extra variable to count lines, and reset it on each new file. Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: fix dependencies with --progressMichael Olbrich2019-06-051-2/+3
| | | | | | | | | | With --progress, 'make' is called twice so extra handling is needed to only add the patches and config files to the hash files once. This is broken for packages with patches but no config file: The stamp file is never created. Fix this by creating separate stamp files. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: improve formating a bitMichael Olbrich2019-06-041-2/+4
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* detect patch changes and reextract when neededMichael Olbrich2019-06-041-0/+15
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: handle --progress correctlyMichael Olbrich2019-05-231-1/+4
| | | | | | | | In that case make is called twice. Append the <PKG>_CONFIG file to the hash file only once. Otherwise a incorrect hash is generated when --progress is used. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: handle config changes when using devpkgsMichael Olbrich2019-05-201-0/+3
| | | | | | | | | | Then devpkgs exist for two different configurations, then switching between them then the .install.unpack stage will not be triggered again, because the tarball is older. Fix this by adding a extra dependency on .cfghash to handle this the same way as the normal build. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: fix order of generated outputMichael Olbrich2019-05-201-5/+15
| | | | | | Without this <PKG>_CFGHASH is used in dependencies before it is set. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: include content of <PKG>_CONFIG in <PKG>_CFGHASHMichael Olbrich2019-05-171-7/+7
| | | | | | | To do this, append the <PKG>_CONFIG files to the pkghash-<PKG> files in ptx_dgen_deps.post and delay the md5 generation until that is done. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: fix warningChristian Hermann2019-05-101-1/+1
| | | | | | | As experienced with gawk 5.0.0, `#` is needlessly escaped. Signed-off-by: Christian Hermann <christian.hermann@hytera.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: fix pkghash for manually included menu filesMichael Olbrich2018-12-061-3/+8
| | | | | | | | | | | Manual includes are relative to the temporary kconfig file tree. The current working directory for ptxd_lib_dgen.awk is the workspace, so these relative files are not found. Add the correct absolute prefix for these files to fix this. Also, make 'tmp' und dump_file() a local variable to ensure that it does not contain old contents. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: add --dirty optionMichael Olbrich2018-10-171-7/+11
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: make sure the source -> package mapping is definedMichael Olbrich2018-10-121-4/+3
| | | | | | | | | | | For all active packages "$(<PKG>_SOURCE): <PKG>" is defined. Host and cross packages are skipped if the target package has the same source. As a result, the mapping is missing if the host package is enabled but not the target package. Fix this by defining the mapping for host and cross packages if the target package is disabled. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: let packages depend on config filesMichael Olbrich2018-10-071-0/+7
| | | | | | | | | | | | | | For kconfig based packages, the prepare stage should depend on the config file to ensure that the package is rebuilt when the config changes. Just do it for all packages. It's a noop if no config is defined. Also add the equivalent dependency for image packages. Only add dependencies if <PKG>_CONFIG seems to be an absolute path. This is necessary to avoid problems with genimage packages: The config file is a relative path to config/images/ and a dependency is generated at built-time. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: make sure $(<PKG>_SOURCE) refers to the primary packageMichael Olbrich2018-09-301-0/+6
| | | | | | | | | | | | | To get the package for a source archive we define for each package: $(<PKG>_SOURCE) := <PKG> With host and cross packages that share the source with the target package, the same variable may be defined multiple times. Which one 'wins' is undefined. Avoid this by only defining the variable for the target package. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: define variables for each pakage rule and menu file pathsMichael Olbrich2018-09-191-7/+11
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: detect config/rules changes for image packagesMichael Olbrich2018-09-181-0/+2
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: don't add options to the hash files twiceMichael Olbrich2018-07-311-1/+4
| | | | | | | Otherwise, enabling a host package in the platformconfig that is already enabled in the ptxconfig will trigger a rebuild of the package. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* improve dependency handlingMichael Olbrich2018-07-101-0/+27
| | | | | | | Check the content of make and in files for packages in addition to the package options to trigger the prepare stage. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: make sure fakeroot is available when generating imagesMichael Olbrich2018-06-061-0/+1
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: images that use ipkgs should depend on ipkg-push if ↵Michael Olbrich2018-05-311-0/+5
| | | | | | PTXCONF_IMAGE_INSTALL_FROM_IPKG_REPOSITORY is set Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* License report: provide package version for host toolsJuergen Borleis2017-12-041-0/+1
| | | | | | | For host packages sharing the archive information with a target package the version must be transformed for the host part as well. Signed-off-by: Juergen Borleis <jbe@pengutronix.de>
* ptxd_lib_dgen: options that select 'VIRTUAL' are packagesMichael Olbrich2017-11-161-9/+9
| | | | | | | | | | This way, virtual packages don't need a makefile. Note: filtering out non-package options from the depencencies must happen later now, because virtual packages are only known when all dependencies are parsed. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* cleanup package creationMichael Olbrich2017-06-211-1/+1
| | | | | | Remove indirection now, that only one package tool remains. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: generate tarball -> package mappings with the dependenciesMichael Olbrich2016-11-291-0/+1
| | | | | | | This avoids "error: empty parameter to 'ptxd_make_get'" errors ptxdist tries to download a package that is not selected. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* License report: prevent unintended buildptxdist-2016.11.0Juergen Borleis2016-11-091-2/+3
| | | | | | | | | | | Independently from the PTXCONF_PROJECT_CHECK_LICENSES setting the license was extracted from each package due to this '='/'==' mismatch. Also, move the check before the loop that modifies 'this_PKG'. Otherwise the check always fails. Signed-off-by: Juergen Borleis <jbe@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: make sure makefiles are only included onceMichael Olbrich2016-08-011-2/+7
| | | | | | | | There are usecases where more than on 'PACKAGES-... += ...' in one makefile is useful. This ensures that the makefile is only included once in this case. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxdist: implement image specific nfsrootMichael Olbrich2016-08-011-0/+4
| | | | | | | | | | | | For the simple use-case (the rootfs contains all packages) the normal nfsroot works well. However, this is not useful to work with root filesystems that contain only a subset of all packages. With this change, if <IMAGE>_NFSROOT can be set to 'YES' then <platformdir>/nfsroot/<image> will be filled with the files from only the packages that are part of this image. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* host-dummy-install-info: new packageMichael Olbrich2016-07-011-0/+2
| | | | | | | | | | | For each package with info pages, install-info creates '<pkgdir>/<prefix>/share/info/dir'. If packages are built in parallel, then multiple install.post stages may try to create this file in <sysroot> at exactly the same time and fail. This fake install-info does nothing, so to avoid this race condition. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: merge dependencies of virtual packagesMichael Olbrich2016-05-191-0/+22
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: handle dependencies from ptxconfig and platformconfig for the ↵Michael Olbrich2016-05-011-9/+31
| | | | | | same package Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* project-name: add option to check license information when building the packagesMichael Olbrich2015-12-111-0/+9
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* improve PTXdist release for license reporting mechanismMichael Olbrich2015-10-271-0/+1
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: add order-only dependency to extractMichael Olbrich2015-05-261-0/+5
| | | | | | | | | This is not stictly necessary but useful to avoid extracting all packages first when building with '-je*'. Only do it for parallel building, so that 'ptxdist extract <pkg>' works like before. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen.awk: Fix warningBernhard Walle2015-04-301-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | After upgrading my gawk to 4.1.2 (which Arch Linux did today), I get tons of warnings like gawk: /usr/lib/ptxdist-2015.04.0/scripts/lib/ptxd_lib_dgen.awk:386: (FILENAME=/tmp/ptxdist.p1sg2M/dgen/platformconfig FNR=233) warning: gensub: third argument `' treated as 1 This patch fixes the warnings. According to the documentation https://www.gnu.org/software/gawk/manual/gawk.html#String-Functions: | gensub(regexp, replacement, how [, target]) # | ... | | If the how argument is a string that does not begin with ‘g’ or ‘G’, or | if it is a number that is less than or equal to zero, only one | substitution is performed. If how is zero, gawk issues a warning | message. So the fix should be safe. Signed-off-by: Bernhard Walle <bernhard@bwalle.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: let host packages inherit license variables as wellMichael Olbrich2015-02-061-0/+3
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* new command create a license report of all the selected packagesMichael Olbrich2015-02-061-0/+1
| | | | Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: strip white spaces from this_pkgMichael Olbrich2014-09-051-1/+1
| | | | | | | This is necessary to e.g. handle files with dos line breaks. Otherwise this_pkg is '<pkg>\r' which causes all kinds of problems. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: fix dependencies for image packagesMichael Olbrich2014-08-111-1/+2
| | | | | | | the prefix of the dependency must be checked to determine if the image depends on install or targetinstall. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
* ptxd_lib_dgen: be more clever about tarball dependenciesMichael Olbrich2014-07-221-1/+3
| | | | | | | | | | | | | New package versions have always been problematic. If the old version is built and the tarball for the new version is older than the get stage then ptxdist didn't build the new version. To improve the situation we now do the following: - create a dummy state file with the tarball name as part of the filename. - let the get stage depend on this. For a new version the file does not exist and the package is rebuilt. Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>