Add pkg-config .pc file, bug919.

This commit is contained in:
Wilson Snyder 2015-05-13 21:21:29 -04:00
parent 5a747bad7d
commit 1d6bcda014
6 changed files with 29 additions and 1 deletions

1
.gitignore vendored
View File

@ -24,3 +24,4 @@ internals.txt
verilator.txt
verilator_bin*
verilator_coverage_bin*
verilator.pc

View File

@ -5,6 +5,8 @@ indicates the contributor was also the author of the fix; Thanks!
* Verilator 3.873 devel
*** Add pkg-config .pc file, bug919. [Stefan Wallentowitz]
**** Fix installing missing manpages, bug908. [Ahmed El-Mahmoudy]
**** Fix core dump in sync-async warnings, bug911. [Sebastian Dressler]

View File

@ -12,6 +12,7 @@
.*\.tex
.*\.key
.*\.vcd
.*\.1
/obj_dir/
/obj_dbg/
/obj_opt/
@ -27,6 +28,7 @@ config.cache$
config.status$
verilator.log
verilator.tex
verilator.pc$
verilator_bin.*
verilator_coverage_bin.*
.vcsmx_rebuild$

View File

@ -84,6 +84,10 @@ infodir = @infodir@
# Generally ${prefix}/share/verilator
pkgdatadir = @pkgdatadir@
# Directory in which to install pkgconfig file
# Generall ${prefix}/share/pkgconfig
pkgconfigdir = @pkgconfigdir@
# Directory in which to install data across multiple architectures
datarootdir = @datarootdir@
@ -314,6 +318,8 @@ installdata:
; for p in $(VL_INST_DATA_SRCDIR_FILES) ; do \
$(INSTALL_DATA) $$p $(DESTDIR)$(pkgdatadir)/examples/$$p; \
done
$(SHELL) ${srcdir}/mkinstalldirs $(DESTDIR)$(pkgconfigdir)
$(INSTALL_DATA) verilator.pc $(DESTDIR)$(pkgconfigdir)
# We don't trust rm -rf, so rmdir instead as it will fail if user put in other files
uninstall:
@ -323,6 +329,7 @@ uninstall:
-cd $(DESTDIR)$(pkgdatadir) && rm -f $(VL_INST_INC_BLDDIR_FILES)
-cd $(DESTDIR)$(pkgdatadir) && rm -f $(VL_INST_INC_SRCDIR_FILES)
-cd $(DESTDIR)$(pkgdatadir)/examples && rm -f $(VL_INST_DATA_SRCDIR_FILES)
-rm $(DESTDIR)$(pkgconfigdir)/verilator.pc
-rmdir $(DESTDIR)$(pkgdatadir)/bin
-rmdir $(DESTDIR)$(pkgdatadir)/include/vltstd
-rmdir $(DESTDIR)$(pkgdatadir)/include
@ -332,6 +339,7 @@ uninstall:
-rmdir $(DESTDIR)$(pkgdatadir)/examples/test_v
-rmdir $(DESTDIR)$(pkgdatadir)/examples
-rmdir $(DESTDIR)$(pkgdatadir)
-rmdir $(DESTDIR)$(pkgconfigdir)
install: all_nomsg install-all
install-all: installbin installman installdata install-msg

View File

@ -8,7 +8,7 @@
#AC_INIT([Verilator],[#.### devel])
AC_INIT([Verilator],[3.873 devel])
AC_CONFIG_HEADER(src/config_build.h)
AC_CONFIG_FILES(Makefile src/Makefile src/Makefile_obj include/verilated.mk include/verilated_config.h)
AC_CONFIG_FILES(Makefile src/Makefile src/Makefile_obj include/verilated.mk include/verilated_config.h verilator.pc)
AC_MSG_RESULT([configuring for $PACKAGE_STRING])
@ -161,6 +161,8 @@ AC_SUBST(CFG_CXXFLAGS_NO_UNUSED)
# Other install directories
pkgdatadir=${datadir}/verilator
AC_SUBST(pkgdatadir)
pkgconfigdir=${datadir}/pkgconfig
AC_SUBST(pkgconfigdir)
AC_OUTPUT

13
verilator.pc.in Normal file
View File

@ -0,0 +1,13 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
datarootdir=@datarootdir@
includedir=@pkgdatadir@/include
Name: verilator
Description: fast free Verilog simulator
URL: http://www.veripool.org/verilator
Version: @PACKAGE_VERSION@
Requires:
Libs:
Cflags: -I${includedir}