History log of /freebsd-current/lib/libmagic/Makefile
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 39f6f6f1 27-Mar-2024 Stephen J. Kiernan <stevek@FreeBSD.org>

libmagic: Use HOST_CC when compiling hostprog used by build

The "mkmagic" program should be built with the host compiler.

Only use BTOOLSPATH if not building for host

Obtained from: Juniper Networks, Inc.
Reviewed by: sjg
Differential Revision: https://reviews.freebsd.org/D44539


# 898496ee 10-Sep-2023 Xin LI <delphij@FreeBSD.org>

MFV: file 5.45.

MFC after: 3 days


# d0b2dbfa 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/

# ac175bd3 11-Aug-2022 Alex Richardson <arichardson@FreeBSD.org>

Install working pkgconfig .pc files for compat libraries

The default ones are install them to /usr/libdata/pkgconfig, and we can't
use this path for compat libraries, so we use /usr/lib<suffix>/pkgconfigi here.

Test Plan: grep -rn libdir= ./usr/lib32/pkgconfig/*.pc
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D34939

# 500f4659 16-Mar-2021 Emmanuel Vadot <manu@FreeBSD.org>

Convert libs with pc files to use PCFILES

Now the .pc ends up in the correct package (-dev)

Reviewed by: bapt, emaste
Differential Revision: https://reviews.freebsd.org/D29172
MFC after: 2 weeks

# e743706d 17-Jun-2020 Xin LI <delphij@FreeBSD.org>

Fix installation of magic file.

Reported by: lwhsu
MFC after: 2 weeks
X-MFC-with: r362258

# 2726a701 17-Jun-2020 Xin LI <delphij@FreeBSD.org>

MFV r362254: file 5.39.

MFC after: 2 weeks


# d38c30c0 11-Feb-2020 Xin LI <delphij@FreeBSD.org>

MFV r357712: file 5.38.

MFC after: 2 weeks


# b114e8fc 18-Dec-2019 Simon J. Gerraty <sjg@FreeBSD.org>

Tweaks for DIRDEPS_BUILD

libmagic only depend on mkmagic if not DIRDEPS_BUILD

libpmc fix -I for libpmcstat

local.dirdeps.mk be even more careful about adding gnu/lib/csu to DIRDEPS

Reviewed by: bdrewery
Differential Revision: https://reviews.freebsd.org/D22872

# 312809fe 11-Dec-2019 Simon J. Gerraty <sjg@FreeBSD.org>

Update dirdeps.mk and gendirdeps.mk

The env space consumed by exporting all libc's .meta files
left little room for command line,
so unexport when done.

Update dirdeps.mk to latest and add
dirdeps-targets.mk to simplify/update targets/Makefile

Makefile changes to go with Makefile.depend changes in D22494

Reviewed by: bdrewery
MFC after: 1 week
Sponsored by: Juniper Networks
Differential Revision: https://reviews.freebsd.org/D22495

# 48c779cd 10-Nov-2019 Xin LI <delphij@FreeBSD.org>

MFV r354582: file 5.37.

MFC after: 3 days


# c63c5ab0 15-Jun-2019 Bryan Drewery <bdrewery@FreeBSD.org>

Fix .depend files to work for build tools.

This is somewhat of a follow-up to r335746.

MFC after: 2 weeks
Sponsored by: DellEMC

# 96a0acc4 27-Jun-2018 Bryan Drewery <bdrewery@FreeBSD.org>

Don't use CCACHE for linking.

MFC after: 2 weeks
Sponsored by: Dell EMC

# 98131b3e 19-May-2018 Cy Schubert <cy@FreeBSD.org>

Style fixup:

A non-functional commit to make adjustment to an aesthetically
unpleasing long line.

# 018798be 19-May-2018 Cy Schubert <cy@FreeBSD.org>

Fix build post r333919.

This commit results in an aesthetically unpleasing long line
which will be fixed next commit.

# 7fe5130d 09-Mar-2018 Bryan Drewery <bdrewery@FreeBSD.org>

LIB32: Avoid linking in unneeded (and invalid lib32) libz for libmagic build tool.

Usually this is just ignored:
/usr/bin/ld: skipping incompatible /scratch/obj/root/git/freebsd/amd64.amd64/obj-lib32/lib/libz/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /scratch/obj/root/git/freebsd/amd64.amd64/obj-lib32/lib/libz/libz.a when searching for -lz

However some combination of newer toolchains simply fail here instead:
/usr/bin/ld: error: /home/dstolfa/obj/home/dstolfa/cadets/amd64.amd64/obj-lib32/lib/libz/libz.so is incompatible with /usr/lib/crt1.o

Libz is not needed for mkmagic so just exclude it.

Reported by: Domagoj Stolfa <domagoj.stolfa@gmail.com>
MFC after: 2 weeks
Sponsored by: Dell EMC

# 1ec0c0f5 19-Jan-2017 Enji Cooper <ngie@FreeBSD.org>

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

MFC after: 3 weeks
Sponsored by: Dell EMC Isilon

# 424340f2 27-Jun-2016 Xin LI <delphij@FreeBSD.org>

Fix build: explicitly reference the generated magic.h as dependency
of mkmagic and point its location.

Reported by: jenkins
Pointy hat to: delphij
MFC after: 2 weeks
X-MFC-With: 302221
Approved by: re (kib)

# 282e23f0 26-Jun-2016 Xin LI <delphij@FreeBSD.org>

MFV r302218: file 5.28.

Relnotes: yes
MFC after: 2 weeks
Approved by: re (gjb)


# 29df9f6b 09-May-2016 Bryan Drewery <bdrewery@FreeBSD.org>

DIRDEPS_BUILD: Run the staged bootstrap-tools version of build-tools.

This avoids running target binaries.

Sponsored by: EMC / Isilon Storage Division

# 3e41d09d 18-Apr-2016 Xin LI <delphij@FreeBSD.org>

MFV r298178:

Update file to 5.26.

MFC after: 2 weeks
Relnotes: yes


# 0edd2576 15-Apr-2016 Glen Barber <gjb@FreeBSD.org>

MFH

Sponsored by: The FreeBSD Foundation


# d1dd034d 14-Apr-2016 Bryan Drewery <bdrewery@FreeBSD.org>

META_MODE: Don't rebuild build-tools targets during normal build.

This avoids 'build command changed' due to CFLAGS/CC changes during the
normal build. Without this the build-tools targets end up rebuilding
for the *target* rather than keeping the native versions built in
build-tools.

Sponsored by: EMC / Isilon Storage Division

# a70cba95 04-Feb-2016 Glen Barber <gjb@FreeBSD.org>

First pass through library packaging.

Sponsored by: The FreeBSD Foundation

# 6b129086 25-Nov-2014 Baptiste Daroussin <bapt@FreeBSD.org>

Convert libraries to use LIBADD
While here reduce a bit overlinking

# b6cee71d 26-Jun-2014 Xin LI <delphij@FreeBSD.org>

MFV r267843: update file/libmagic to 5.19.

MFC after: 2 weeks


# 28ab4bb8 06-May-2014 Xin LI <delphij@FreeBSD.org>

Sort .ALLSRC before concatenating files together. This makes sure that the
file are always built the same.

(Note that Header and Localstuff must appear first and in that order, the
sorting does not affect as a coincident effect).

Submitted by: sjg
MFC after: 3 days

# c2774610 11-Sep-2012 David E. O'Brien <obrien@FreeBSD.org>

r235638 is not the clean way to add support for building on ancient FreeBSD
versions. Instead use Imp's good work on "legacy" and follow the outcome
of the previous TRB discussions on this topic.

Now use the libc getline() if it exists, and only where it doesn't
create a bootstraping version.

# a0ebde20 16-Aug-2012 Stephen McKay <mckay@FreeBSD.org>

Correct a regression introduced during the import of file(1) 5.11.

Magic tests containing "search" or "regex" directives were incorrectly
compiled by "mkmagic" and were effectively ignored. This caused troff
files (for example) to be detected as simply "ASCII text" instead of
as "troff or preprocessor input, ASCII text".

PR: bin/170415
Approved by: consensus on developers@
MFC after: 3 days

# aaa975e1 18-May-2012 Marcel Moolenaar <marcel@FreeBSD.org>

Don't depend on getline being on the build machine. That's
not the case for FreeBSD 7.x machines.

# 80c86c36 18-Apr-2012 David E. O'Brien <obrien@FreeBSD.org>

Update file(1) to version 5.11.


# a7c20010 31-Jul-2010 Rui Paulo <rpaulo@FreeBSD.org>

Use CFLAGS and LDFLAGS when compiling mkmagic. This ensures that all the
correct flags are being used (esp. NO_WERROR wrt clang).

Submitted by: Dimitry Andric <dimitry at andric.com>
Reviewed by: ru

# 9433144d 20-May-2010 Marius Strobl <marius@FreeBSD.org>

With r208341 in place WARNS can be increased.

# daaf5759 02-Jan-2010 Ed Schouten <ed@FreeBSD.org>

Build lib/ with WARNS=6 by default.

Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and
lower it when needed.

I'm setting WARNS?=0 for secure/. It seems secure/ includes the
Makefile.inc provided by lib/. I'm not going to touch that directory.
Most of the code there is contributed anyway.

# 3ca3047a 19-Jul-2009 Ken Smith <kensmith@FreeBSD.org>

Bump the version of all non-symbol-versioned shared libraries in
preparation for 8.0-RELEASE. Add the previous version of those
libraries to ObsoleteFiles.inc and bump __FreeBSD_Version.

Reviewed by: kib
Approved by: re (rwatson)

# 7dbb948b 03-May-2009 David E. O'Brien <obrien@FreeBSD.org>

Merge vendor/file/dist@191739, bringing FILE 5.00 to 8-CURRENT.


# 008ca870 01-Jan-2009 David E. O'Brien <obrien@FreeBSD.org>

Don't make the MIME magic any longer.

# 419ecd5d 20-May-2007 Daniel Eischen <deischen@FreeBSD.org>

Bump library versions in preparation for 7.0.

Ok'd by: kan

# b3f1b4a2 19-Jun-2006 David E. O'Brien <obrien@FreeBSD.org>

Update for the 'file' 4.17 import.

# e4a93f1e 10-Nov-2005 Ruslan Ermilov <ru@FreeBSD.org>

Add missing shared library interdependencies.

# a84020c2 22-Jul-2005 Ken Smith <kensmith@FreeBSD.org>

Bump the shared library version number of all libraries that have not
been bumped since RELENG_5.

Reviewed by: ru
Approved by: re (not needed for commit check but in principle...)

# 2bcc0b73 28-Jan-2005 Ruslan Ermilov <ru@FreeBSD.org>

Clean up makefile.

- Remove all:. It's redundant, and ${LIB} in it is just a bug.
- Remove .ORDER:. *.mgc files can safely be built in parallel.
- Remove PITA. The mkmagic tool is smart to put the binary file
into the current directory (${.OBJDIR}) even if the source file
lives somewhere else, which is just what we need.

# 8e6acec2 18-Nov-2004 David E. O'Brien <obrien@FreeBSD.org>

Install the header for libmagic.

PR: 73647
Submitted by: Uranus <uranus@it.muds.net>

# 6bd0a54a 18-Oct-2004 Ruslan Ermilov <ru@FreeBSD.org>

uniq(1) is not an install tool, and using it was causing
"uniq: not found" during the installworld.

Spotted by: Roman Neuhauser

# 7866c62a 09-Aug-2004 David E. O'Brien <obrien@FreeBSD.org>

Don't try to programatically support running file(1) w/in /usr/obj or other
non-standard install path.

Agreed with: ru

# 3dcb1ab1 09-Aug-2004 David E. O'Brien <obrien@FreeBSD.org>

Uncomment the real paths and remove the local debugging paths.

Noticed by: ru (who's faster than 'make world' on my stock src test machine)

# 20164649 09-Aug-2004 David E. O'Brien <obrien@FreeBSD.org>

Bmake the library containing and processing the magic.

# d0b2dbfa 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


# ac175bd3 11-Aug-2022 Alex Richardson <arichardson@FreeBSD.org>

Install working pkgconfig .pc files for compat libraries

The default ones are install them to /usr/libdata/pkgconfig, and we can't
use this path for compat libraries, so we use /usr/lib<suffix>/pkgconfigi here.

Test Plan: grep -rn libdir= ./usr/lib32/pkgconfig/*.pc
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D34939


# 500f4659 16-Mar-2021 Emmanuel Vadot <manu@FreeBSD.org>

Convert libs with pc files to use PCFILES

Now the .pc ends up in the correct package (-dev)

Reviewed by: bapt, emaste
Differential Revision: https://reviews.freebsd.org/D29172
MFC after: 2 weeks


# e743706d 17-Jun-2020 Xin LI <delphij@FreeBSD.org>

Fix installation of magic file.

Reported by: lwhsu
MFC after: 2 weeks
X-MFC-with: r362258


# b114e8fc 18-Dec-2019 Simon J. Gerraty <sjg@FreeBSD.org>

Tweaks for DIRDEPS_BUILD

libmagic only depend on mkmagic if not DIRDEPS_BUILD

libpmc fix -I for libpmcstat

local.dirdeps.mk be even more careful about adding gnu/lib/csu to DIRDEPS

Reviewed by: bdrewery
Differential Revision: https://reviews.freebsd.org/D22872


# 312809fe 11-Dec-2019 Simon J. Gerraty <sjg@FreeBSD.org>

Update dirdeps.mk and gendirdeps.mk

The env space consumed by exporting all libc's .meta files
left little room for command line,
so unexport when done.

Update dirdeps.mk to latest and add
dirdeps-targets.mk to simplify/update targets/Makefile

Makefile changes to go with Makefile.depend changes in D22494

Reviewed by: bdrewery
MFC after: 1 week
Sponsored by: Juniper Networks
Differential Revision: https://reviews.freebsd.org/D22495


# c63c5ab0 15-Jun-2019 Bryan Drewery <bdrewery@FreeBSD.org>

Fix .depend files to work for build tools.

This is somewhat of a follow-up to r335746.

MFC after: 2 weeks
Sponsored by: DellEMC


# 96a0acc4 27-Jun-2018 Bryan Drewery <bdrewery@FreeBSD.org>

Don't use CCACHE for linking.

MFC after: 2 weeks
Sponsored by: Dell EMC


# 98131b3e 19-May-2018 Cy Schubert <cy@FreeBSD.org>

Style fixup:

A non-functional commit to make adjustment to an aesthetically
unpleasing long line.


# 018798be 19-May-2018 Cy Schubert <cy@FreeBSD.org>

Fix build post r333919.

This commit results in an aesthetically unpleasing long line
which will be fixed next commit.


# 7fe5130d 09-Mar-2018 Bryan Drewery <bdrewery@FreeBSD.org>

LIB32: Avoid linking in unneeded (and invalid lib32) libz for libmagic build tool.

Usually this is just ignored:
/usr/bin/ld: skipping incompatible /scratch/obj/root/git/freebsd/amd64.amd64/obj-lib32/lib/libz/libz.so when searching for -lz
/usr/bin/ld: skipping incompatible /scratch/obj/root/git/freebsd/amd64.amd64/obj-lib32/lib/libz/libz.a when searching for -lz

However some combination of newer toolchains simply fail here instead:
/usr/bin/ld: error: /home/dstolfa/obj/home/dstolfa/cadets/amd64.amd64/obj-lib32/lib/libz/libz.so is incompatible with /usr/lib/crt1.o

Libz is not needed for mkmagic so just exclude it.

Reported by: Domagoj Stolfa <domagoj.stolfa@gmail.com>
MFC after: 2 weeks
Sponsored by: Dell EMC


# 1ec0c0f5 19-Jan-2017 Enji Cooper <ngie@FreeBSD.org>

Use SRCTOP-relative paths to other directories instead of .CURDIR-relative ones

This simplifies pathing in make/displayed output

MFC after: 3 weeks
Sponsored by: Dell EMC Isilon


# 424340f2 27-Jun-2016 Xin LI <delphij@FreeBSD.org>

Fix build: explicitly reference the generated magic.h as dependency
of mkmagic and point its location.

Reported by: jenkins
Pointy hat to: delphij
MFC after: 2 weeks
X-MFC-With: 302221
Approved by: re (kib)


# 29df9f6b 09-May-2016 Bryan Drewery <bdrewery@FreeBSD.org>

DIRDEPS_BUILD: Run the staged bootstrap-tools version of build-tools.

This avoids running target binaries.

Sponsored by: EMC / Isilon Storage Division


# d1dd034d 14-Apr-2016 Bryan Drewery <bdrewery@FreeBSD.org>

META_MODE: Don't rebuild build-tools targets during normal build.

This avoids 'build command changed' due to CFLAGS/CC changes during the
normal build. Without this the build-tools targets end up rebuilding
for the *target* rather than keeping the native versions built in
build-tools.

Sponsored by: EMC / Isilon Storage Division


# a70cba95 04-Feb-2016 Glen Barber <gjb@FreeBSD.org>

First pass through library packaging.

Sponsored by: The FreeBSD Foundation


# 6b129086 25-Nov-2014 Baptiste Daroussin <bapt@FreeBSD.org>

Convert libraries to use LIBADD
While here reduce a bit overlinking


# 28ab4bb8 06-May-2014 Xin LI <delphij@FreeBSD.org>

Sort .ALLSRC before concatenating files together. This makes sure that the
file are always built the same.

(Note that Header and Localstuff must appear first and in that order, the
sorting does not affect as a coincident effect).

Submitted by: sjg
MFC after: 3 days


# c2774610 11-Sep-2012 David E. O'Brien <obrien@FreeBSD.org>

r235638 is not the clean way to add support for building on ancient FreeBSD
versions. Instead use Imp's good work on "legacy" and follow the outcome
of the previous TRB discussions on this topic.

Now use the libc getline() if it exists, and only where it doesn't
create a bootstraping version.


# a0ebde20 16-Aug-2012 Stephen McKay <mckay@FreeBSD.org>

Correct a regression introduced during the import of file(1) 5.11.

Magic tests containing "search" or "regex" directives were incorrectly
compiled by "mkmagic" and were effectively ignored. This caused troff
files (for example) to be detected as simply "ASCII text" instead of
as "troff or preprocessor input, ASCII text".

PR: bin/170415
Approved by: consensus on developers@
MFC after: 3 days


# aaa975e1 18-May-2012 Marcel Moolenaar <marcel@FreeBSD.org>

Don't depend on getline being on the build machine. That's
not the case for FreeBSD 7.x machines.


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# a7c20010 31-Jul-2010 Rui Paulo <rpaulo@FreeBSD.org>

Use CFLAGS and LDFLAGS when compiling mkmagic. This ensures that all the
correct flags are being used (esp. NO_WERROR wrt clang).

Submitted by: Dimitry Andric <dimitry at andric.com>
Reviewed by: ru


# 9433144d 20-May-2010 Marius Strobl <marius@FreeBSD.org>

With r208341 in place WARNS can be increased.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# daaf5759 02-Jan-2010 Ed Schouten <ed@FreeBSD.org>

Build lib/ with WARNS=6 by default.

Similar to libexec/, do the same with lib/. Make WARNS=6 the norm and
lower it when needed.

I'm setting WARNS?=0 for secure/. It seems secure/ includes the
Makefile.inc provided by lib/. I'm not going to touch that directory.
Most of the code there is contributed anyway.


# 3ca3047a 19-Jul-2009 Ken Smith <kensmith@FreeBSD.org>

Bump the version of all non-symbol-versioned shared libraries in
preparation for 8.0-RELEASE. Add the previous version of those
libraries to ObsoleteFiles.inc and bump __FreeBSD_Version.

Reviewed by: kib
Approved by: re (rwatson)


# 008ca870 01-Jan-2009 David E. O'Brien <obrien@FreeBSD.org>

Don't make the MIME magic any longer.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# 419ecd5d 20-May-2007 Daniel Eischen <deischen@FreeBSD.org>

Bump library versions in preparation for 7.0.

Ok'd by: kan


# b3f1b4a2 19-Jun-2006 David E. O'Brien <obrien@FreeBSD.org>

Update for the 'file' 4.17 import.


# e4a93f1e 10-Nov-2005 Ruslan Ermilov <ru@FreeBSD.org>

Add missing shared library interdependencies.


# a84020c2 22-Jul-2005 Ken Smith <kensmith@FreeBSD.org>

Bump the shared library version number of all libraries that have not
been bumped since RELENG_5.

Reviewed by: ru
Approved by: re (not needed for commit check but in principle...)


# 2bcc0b73 28-Jan-2005 Ruslan Ermilov <ru@FreeBSD.org>

Clean up makefile.

- Remove all:. It's redundant, and ${LIB} in it is just a bug.
- Remove .ORDER:. *.mgc files can safely be built in parallel.
- Remove PITA. The mkmagic tool is smart to put the binary file
into the current directory (${.OBJDIR}) even if the source file
lives somewhere else, which is just what we need.


# 8e6acec2 18-Nov-2004 David E. O'Brien <obrien@FreeBSD.org>

Install the header for libmagic.

PR: 73647
Submitted by: Uranus <uranus@it.muds.net>


# 6bd0a54a 18-Oct-2004 Ruslan Ermilov <ru@FreeBSD.org>

uniq(1) is not an install tool, and using it was causing
"uniq: not found" during the installworld.

Spotted by: Roman Neuhauser


# 7866c62a 09-Aug-2004 David E. O'Brien <obrien@FreeBSD.org>

Don't try to programatically support running file(1) w/in /usr/obj or other
non-standard install path.

Agreed with: ru


# 3dcb1ab1 09-Aug-2004 David E. O'Brien <obrien@FreeBSD.org>

Uncomment the real paths and remove the local debugging paths.

Noticed by: ru (who's faster than 'make world' on my stock src test machine)


# 20164649 09-Aug-2004 David E. O'Brien <obrien@FreeBSD.org>

Bmake the library containing and processing the magic.