Skip to content

Commit

Permalink
Update Makefile.in to install PDF correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
caryr committed Nov 27, 2024
1 parent 361e16b commit b745119
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 13 deletions.
14 changes: 10 additions & 4 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ libdir = @libdir@
# It is a little different from the generic includedir.
includedir = @includedir@/iverilog$(suffix)
mandir = @mandir@
pdfdir = @docdir@

dllib=@DLLIB@

Expand Down Expand Up @@ -308,18 +309,22 @@ version_tag.h version:
ifeq (@MINGW32@,yes)
ifeq ($(MAN),none)
INSTALL_DOC = installman
INSTALL_PDFDIR = $(prefix)
else
ifeq ($(PS2PDF),none)
INSTALL_DOC = installman
INSTALL_PDFDIR = $(prefix)
else
INSTALL_DOC = installpdf installman
INSTALL_PDFDIR = $(pdfdir)
all: dep iverilog-vpi.pdf
endif
endif
INSTALL_DOCDIR = $(mandir)/man1
else
INSTALL_DOC = installman
INSTALL_DOCDIR = $(mandir)/man1
INSTALL_PDFDIR = $(prefix)
endif

ifeq (@MINGW32@,yes)
Expand Down Expand Up @@ -350,7 +355,7 @@ installman: iverilog-vpi.man installdirs
$(INSTALL_DATA) iverilog-vpi.man "$(DESTDIR)$(mandir)/man1/iverilog-vpi$(suffix).1"

installpdf: iverilog-vpi.pdf installdirs
$(INSTALL_DATA) iverilog-vpi.pdf "$(DESTDIR)$(prefix)/iverilog-vpi$(suffix).pdf"
$(INSTALL_DATA) iverilog-vpi.pdf "$(DESTDIR)$(pdfdir)/iverilog-vpi$(suffix).pdf"

installfiles: $(F) | installdirs
$(INSTALL_PROGRAM) ./ivl@EXEEXT@ "$(DESTDIR)$(libdir)/ivl$(suffix)/ivl@EXEEXT@"
Expand All @@ -368,8 +373,8 @@ installdirs: $(srcdir)/mkinstalldirs
"$(DESTDIR)$(includedir)" \
"$(DESTDIR)$(libdir)/ivl$(suffix)" \
"$(DESTDIR)$(libdir)/ivl$(suffix)/include" \
"$(DESTDIR)$(mandir)" \
"$(DESTDIR)$(mandir)/man1"
"$(DESTDIR)$(INSTALL_DOCDIR)" \
"$(DESTDIR)$(INSTALL_PDFDIR)"

uninstall:
$(foreach dir,$(SUBDIRS),$(MAKE) -C $(dir) $@ && ) true
Expand All @@ -382,7 +387,8 @@ uninstall:
for f in ivl_target.h vpi_user.h _pli_types.h sv_vpi_user.h acc_user.h veriuser.h; \
do rm -f "$(DESTDIR)$(includedir)/$$f"; done
-test X$(suffix) = X || rmdir "$(DESTDIR)$(includedir)"
rm -f "$(DESTDIR)$(mandir)/man1/iverilog-vpi$(suffix).1" "$(DESTDIR)$(prefix)/iverilog-vpi$(suffix).pdf"
rm -f "$(DESTDIR)$(mandir)/man1/iverilog-vpi$(suffix).1" \
"$(DESTDIR)$(pdfdir)/iverilog-vpi$(suffix).pdf"


-include $(patsubst %.o, dep/%.d, $O)
13 changes: 10 additions & 3 deletions driver/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ bindir = $(exec_prefix)/bin
libdir = $(exec_prefix)/lib
includedir = $(prefix)/include
mandir = @mandir@
pdfdir = @docdir@

dllib=@DLLIB@

Expand Down Expand Up @@ -113,18 +114,22 @@ iverilog.pdf: iverilog.ps
ifeq (@MINGW32@,yes)
ifeq ($(MAN),none)
INSTALL_DOC = installman
INSTALL_PDFDIR = $(prefix)
else
ifeq ($(PS2PDF),none)
INSTALL_DOC = installman
INSTALL_PDFDIR = $(prefix)
else
INSTALL_DOC = installpdf installman
INSTALL_PDFDIR = $(pdfdir)
all: iverilog.pdf
endif
endif
INSTALL_DOCDIR = $(mandir)/man1
else
INSTALL_DOC = installman
INSTALL_DOCDIR = $(mandir)/man1
INSTALL_PDFDIR = $(prefix)
endif

install: all installdirs installfiles
Expand All @@ -136,16 +141,18 @@ installman: iverilog.man installdirs
$(INSTALL_DATA) iverilog.man "$(DESTDIR)$(mandir)/man1/iverilog$(suffix).1"

installpdf: iverilog.pdf installdirs
$(INSTALL_DATA) iverilog.pdf "$(DESTDIR)$(prefix)/iverilog$(suffix).pdf"
$(INSTALL_DATA) iverilog.pdf "$(DESTDIR)$(pdfdir)/iverilog$(suffix).pdf"

installfiles: $(F) | installdirs
$(INSTALL_PROGRAM) ./iverilog@EXEEXT@ "$(DESTDIR)$(bindir)/iverilog$(suffix)@EXEEXT@"

installdirs: $(srcdir)/../mkinstalldirs
$(srcdir)/../mkinstalldirs "$(DESTDIR)$(bindir)" "$(DESTDIR)$(INSTALL_DOCDIR)"
$(srcdir)/../mkinstalldirs "$(DESTDIR)$(bindir)" \
"$(DESTDIR)$(INSTALL_DOCDIR)" \
"$(DESTDIR)$(INSTALL_PDFDIR)"

uninstall:
rm -f "$(DESTDIR)$(bindir)/iverilog$(suffix)@EXEEXT@"
rm -f "$(DESTDIR)$(mandir)/man1/iverilog$(suffix).1" "$(DESTDIR)$(prefix)/iverilog$(suffix).pdf"
rm -f "$(DESTDIR)$(mandir)/man1/iverilog$(suffix).1" "$(DESTDIR)$(pdfdir)/iverilog$(suffix).pdf"

-include $(patsubst %.o, dep/%.d, $O)
4 changes: 1 addition & 3 deletions msys2/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,5 @@ check() {

package() {
cd "${srcdir}"/../..
mingw32-make DESTDIR="${pkgdir}" install
mkdir -p "${pkgdir}${MINGW_PREFIX}/share/doc/${_realname}"
mv "${pkgdir}${MINGW_PREFIX}"/*.pdf "${pkgdir}${MINGW_PREFIX}/share/doc/${_realname}"
mingw32-make DESTDIR="${pkgdir}" PACKAGE="${_realname}" install
}
14 changes: 11 additions & 3 deletions vvp/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ mandir = @mandir@
# This is actually the directory where we install our own header files.
# It is a little different from the generic includedir.
includedir = @includedir@/iverilog$(suffix)
pdfdir = @docdir@

# For a cross compile these defines will need to be set accordingly.
HOSTCC = @CC@
Expand Down Expand Up @@ -203,18 +204,22 @@ vvp.pdf: vvp.ps
ifeq (@MINGW32@,yes)
ifeq ($(MAN),none)
INSTALL_DOC = installman
INSTALL_PDFDIR = $(prefix)
else
ifeq ($(PS2PDF),none)
INSTALL_DOC = installman
INSTALL_PDFDIR = $(prefix)
else
INSTALL_DOC = installpdf installman
INSTALL_PDFDIR = $(pdfdir)
all: vvp.pdf
endif
endif
INSTALL_DOCDIR = $(mandir)/man1
else
INSTALL_DOC = installman
INSTALL_DOCDIR = $(mandir)/man1
INSTALL_PDFDIR = $(prefix)
endif

stamp-config-h: $(srcdir)/config.h.in ../config.status
Expand All @@ -230,7 +235,7 @@ installman: vvp.man installdirs
$(INSTALL_DATA) vvp.man "$(DESTDIR)$(mandir)/man1/vvp$(suffix).1"

installpdf: vvp.pdf installdirs
$(INSTALL_DATA) vvp.pdf "$(DESTDIR)$(prefix)/vvp$(suffix).pdf"
$(INSTALL_DATA) vvp.pdf "$(DESTDIR)$(pdfdir)/vvp$(suffix).pdf"

installfiles: $(F) | installdirs
$(INSTALL_PROGRAM) ./vvp@EXEEXT@ "$(DESTDIR)$(bindir)/vvp$(suffix)@EXEEXT@"
Expand All @@ -240,12 +245,15 @@ ifeq (@LIBVVP@,yes)
endif

installdirs: $(srcdir)/../mkinstalldirs
$(srcdir)/../mkinstalldirs "$(DESTDIR)$(bindir)" "$(DESTDIR)$(libdir)" "$(DESTDIR)$(INSTALL_DOCDIR)"
$(srcdir)/../mkinstalldirs "$(DESTDIR)$(bindir)" \
"$(DESTDIR)$(libdir)" \
"$(DESTDIR)$(INSTALL_DOCDIR)" \
"$(DESTDIR)$(INSTALL_PDFDIR)"


uninstall: $(UNINSTALL32)
rm -f "$(DESTDIR)$(bindir)/vvp$(suffix)@EXEEXT@"
rm -f "$(DESTDIR)$(mandir)/man1/vvp$(suffix).1" "$(DESTDIR)$(prefix)/vvp$(suffix).pdf"
rm -f "$(DESTDIR)$(mandir)/man1/vvp$(suffix).1" "$(DESTDIR)$(pdfdir)/vvp$(suffix).pdf"
ifeq (@LIBVVP@,yes)
rm -f "$(DESTDIR)$(libdir)/libvvp$(suffix).$(SLEXT)"
rm -f "$(DESTDIR)$(includedir)/libvvp.h"
Expand Down

0 comments on commit b745119

Please sign in to comment.