mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-10-10 00:25:06 -04:00
Build: update various build installation directories
Modernize and improve the handling of build directories. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -79,6 +79,7 @@ TAGS
|
|||||||
/doc/fontpath
|
/doc/fontpath
|
||||||
/doc/Fontmap
|
/doc/Fontmap
|
||||||
/editors/nasmtok.el
|
/editors/nasmtok.el
|
||||||
|
/editors/nasmtok.json
|
||||||
/include/warnings.h
|
/include/warnings.h
|
||||||
/macros/macros.c
|
/macros/macros.c
|
||||||
/misc/omfdump
|
/misc/omfdump
|
||||||
|
26
Makefile.in
26
Makefile.in
@@ -6,6 +6,9 @@
|
|||||||
|
|
||||||
@SET_MAKE@
|
@SET_MAKE@
|
||||||
|
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
|
||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
objdir = @builddir@
|
objdir = @builddir@
|
||||||
@@ -16,6 +19,11 @@ bindir = @bindir@
|
|||||||
mandir = @mandir@
|
mandir = @mandir@
|
||||||
datarootdir = @datarootdir@
|
datarootdir = @datarootdir@
|
||||||
datadir = @datadir@
|
datadir = @datadir@
|
||||||
|
pkgdatadir = $(datadir)/$(PACKAGE_TARNAME)
|
||||||
|
docdir = @docdir@
|
||||||
|
htmldir = @htmldir@
|
||||||
|
pdfdir = @pdfdir@
|
||||||
|
psdir = @psdir@
|
||||||
|
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
@@ -473,8 +481,8 @@ install: $(PROGS)
|
|||||||
$(INSTALL_DATA) $(srcdir)/ndisasm.1 $(DESTDIR)$(mandir)/man1/ndisasm.1
|
$(INSTALL_DATA) $(srcdir)/ndisasm.1 $(DESTDIR)$(mandir)/man1/ndisasm.1
|
||||||
|
|
||||||
install_editors: $(EDITORS)
|
install_editors: $(EDITORS)
|
||||||
$(MKDIR_P) $(DESTDIR)$(datadir)
|
$(MKDIR_P) $(DESTDIR)$(pkgdatadir)
|
||||||
$(INSTALL_DATA) $(EDITORS) $(DESTDIR)$(datadir)
|
$(INSTALL_DATA) $(EDITORS) $(DESTDIR)$(pkgdatadir)
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
for d in . $(SUBDIRS) $(XSUBDIRS); do \
|
for d in . $(SUBDIRS) $(XSUBDIRS); do \
|
||||||
@@ -488,11 +496,10 @@ clean:
|
|||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
for d in . $(SUBDIRS) $(XSUBDIRS); do \
|
for d in . $(SUBDIRS) $(XSUBDIRS); do \
|
||||||
$(RM_F) "$$d"/.\# "$$d"/\# "$$d"/*~ "$$d"/*.bak \
|
$(RM_F) "$$d"/.\#* "$$d"/\#* "$$d"/*~ "$$d"/*.bak \
|
||||||
"$$d"/*.lst "$$d"/*.bin ; \
|
"$$d"/*.lst "$$d"/*.bin "$$d"/*.dep ; \
|
||||||
done
|
done
|
||||||
$(RM_F) test/*.$(O)
|
$(RM_F) test/*.$(O)
|
||||||
$(RM_F) *.dep
|
|
||||||
-$(SHELL) autoconf/clean.sh || $(SHELL) $(srcdir)/autoconf/clean.sh
|
-$(SHELL) autoconf/clean.sh || $(SHELL) $(srcdir)/autoconf/clean.sh
|
||||||
|
|
||||||
cleaner:
|
cleaner:
|
||||||
@@ -546,11 +553,16 @@ everything: always_everything
|
|||||||
|
|
||||||
install_everything: everything install install_doc install_editors
|
install_everything: everything install install_doc install_editors
|
||||||
|
|
||||||
|
editor_builtin: nasm$(X)
|
||||||
|
$(SHELL) editors/dumpbuiltin.sh ./nasm$(X) > editors/builtin.mac
|
||||||
|
|
||||||
dist:
|
dist:
|
||||||
$(MAKE) alldeps
|
$(MAKE) alldeps
|
||||||
$(MAKE) perlreq warnings spec $(MANPAGES)
|
$(MAKE) perlreq warnings spec
|
||||||
|
$(MAKE) editor_builtin
|
||||||
|
$(MAKE) editors $(MANPAGES)
|
||||||
$(MAKE) distclean
|
$(MAKE) distclean
|
||||||
./autogen.sh
|
$(SHELL) autogen.sh --clearenv
|
||||||
|
|
||||||
tar: dist
|
tar: dist
|
||||||
tar -cv --exclude CVS --exclude .git -C .. -f - `basename \`pwd\`` | \
|
tar -cv --exclude CVS --exclude .git -C .. -f - `basename \`pwd\`` | \
|
||||||
|
@@ -178,8 +178,11 @@ ALLOBJ_W = $(NASM) $(LIBOBJ_W)
|
|||||||
ALLOBJ = $(PROGOBJ) $(LIBOBJ)
|
ALLOBJ = $(PROGOBJ) $(LIBOBJ)
|
||||||
SUBDIRS = stdlib nasmlib include config output asm disasm x86 \
|
SUBDIRS = stdlib nasmlib include config output asm disasm x86 \
|
||||||
common zlib macros misc
|
common zlib macros misc
|
||||||
XSUBDIRS = nsis win test doc
|
XSUBDIRS = nsis win test doc editors
|
||||||
DEPDIRS = . $(SUBDIRS)
|
DEPDIRS = . $(SUBDIRS)
|
||||||
|
|
||||||
|
EDITORS = editors\nasmtok.el editors\nasmtok.json
|
||||||
|
|
||||||
#-- End File Lists --#
|
#-- End File Lists --#
|
||||||
|
|
||||||
NASMLIB = libnasm.$(A)
|
NASMLIB = libnasm.$(A)
|
||||||
@@ -220,7 +223,6 @@ PERLREQ_CLEANABLE = \
|
|||||||
macros\macros.c \
|
macros\macros.c \
|
||||||
asm\pptok.ph asm\directbl.c asm\directiv.h \
|
asm\pptok.ph asm\directbl.c asm\directiv.h \
|
||||||
$(WARNFILES) \
|
$(WARNFILES) \
|
||||||
misc\nasmtok.el \
|
|
||||||
version.h version.mac version.mak nsis\version.nsh
|
version.h version.mac version.mak nsis\version.nsh
|
||||||
|
|
||||||
PERLREQ = $(PERLREQ_CLEANABLE)
|
PERLREQ = $(PERLREQ_CLEANABLE)
|
||||||
@@ -331,10 +333,18 @@ asm\directbl.c: asm\directiv.dat nasmlib\perfhash.pl perllib\phash.ph
|
|||||||
$(RUNPERL) $(srcdir)\nasmlib\perfhash.pl c \
|
$(RUNPERL) $(srcdir)\nasmlib\perfhash.pl c \
|
||||||
$(srcdir)\asm\directiv.dat asm\directbl.c
|
$(srcdir)\asm\directiv.dat asm\directbl.c
|
||||||
|
|
||||||
# Emacs token files
|
# Editor token files
|
||||||
misc\nasmtok.el: misc\emacstbl.pl asm\tokhash.c asm\pptok.c \
|
editors\nasmtok.el: editors\nasmtok.pl asm\tokhash.c asm\pptok.c \
|
||||||
asm\directiv.dat version
|
asm\directiv.dat macros\macros.c editors\builtin.mac \
|
||||||
$(RUNPERL) $(srcdir)\misc\emacstbl.pl $@ $(srcdir) $(objdir)
|
version.mak
|
||||||
|
$(RUNPERL) $(srcdir)\editors\nasmtok.pl -el $@ $(srcdir) $(objdir)
|
||||||
|
|
||||||
|
editors\nasmtok.json: editors\nasmtok.pl asm\tokhash.c asm\pptok.c \
|
||||||
|
asm\directiv.dat macros\macros.c editors\builtin.mac \
|
||||||
|
version.mak
|
||||||
|
$(RUNPERL) $(srcdir)\editors\nasmtok.pl -json $@ $(srcdir) $(objdir)
|
||||||
|
|
||||||
|
editors: $(EDITORS)
|
||||||
|
|
||||||
#-- End Generated File Rules --#
|
#-- End Generated File Rules --#
|
||||||
|
|
||||||
|
@@ -163,8 +163,11 @@ ALLOBJ_W = $(NASM) $(LIBOBJ_W)
|
|||||||
ALLOBJ = $(PROGOBJ) $(LIBOBJ)
|
ALLOBJ = $(PROGOBJ) $(LIBOBJ)
|
||||||
SUBDIRS = stdlib nasmlib include config output asm disasm x86 &
|
SUBDIRS = stdlib nasmlib include config output asm disasm x86 &
|
||||||
common zlib macros misc
|
common zlib macros misc
|
||||||
XSUBDIRS = nsis win test doc
|
XSUBDIRS = nsis win test doc editors
|
||||||
DEPDIRS = . $(SUBDIRS)
|
DEPDIRS = . $(SUBDIRS)
|
||||||
|
|
||||||
|
EDITORS = editors\nasmtok.el editors\nasmtok.json
|
||||||
|
|
||||||
#-- End File Lists --#
|
#-- End File Lists --#
|
||||||
|
|
||||||
what: .SYMBOLIC
|
what: .SYMBOLIC
|
||||||
@@ -229,7 +232,6 @@ PERLREQ_CLEANABLE = &
|
|||||||
macros\macros.c &
|
macros\macros.c &
|
||||||
asm\pptok.ph asm\directbl.c asm\directiv.h &
|
asm\pptok.ph asm\directbl.c asm\directiv.h &
|
||||||
$(WARNFILES) &
|
$(WARNFILES) &
|
||||||
misc\nasmtok.el &
|
|
||||||
version.h version.mac version.mak nsis\version.nsh
|
version.h version.mac version.mak nsis\version.nsh
|
||||||
|
|
||||||
PERLREQ = $(PERLREQ_CLEANABLE)
|
PERLREQ = $(PERLREQ_CLEANABLE)
|
||||||
@@ -340,10 +342,18 @@ asm\directbl.c: asm\directiv.dat nasmlib\perfhash.pl perllib\phash.ph
|
|||||||
$(RUNPERL) $(srcdir)\nasmlib\perfhash.pl c &
|
$(RUNPERL) $(srcdir)\nasmlib\perfhash.pl c &
|
||||||
$(srcdir)\asm\directiv.dat asm\directbl.c
|
$(srcdir)\asm\directiv.dat asm\directbl.c
|
||||||
|
|
||||||
# Emacs token files
|
# Editor token files
|
||||||
misc\nasmtok.el: misc\emacstbl.pl asm\tokhash.c asm\pptok.c &
|
editors\nasmtok.el: editors\nasmtok.pl asm\tokhash.c asm\pptok.c &
|
||||||
asm\directiv.dat version
|
asm\directiv.dat macros\macros.c editors\builtin.mac &
|
||||||
$(RUNPERL) $(srcdir)\misc\emacstbl.pl $@ $(srcdir) $(objdir)
|
version.mak
|
||||||
|
$(RUNPERL) $(srcdir)\editors\nasmtok.pl -el $@ $(srcdir) $(objdir)
|
||||||
|
|
||||||
|
editors\nasmtok.json: editors\nasmtok.pl asm\tokhash.c asm\pptok.c &
|
||||||
|
asm\directiv.dat macros\macros.c editors\builtin.mac &
|
||||||
|
version.mak
|
||||||
|
$(RUNPERL) $(srcdir)\editors\nasmtok.pl -json $@ $(srcdir) $(objdir)
|
||||||
|
|
||||||
|
editors: $(EDITORS)
|
||||||
|
|
||||||
#-- End Generated File Rules --#
|
#-- End Generated File Rules --#
|
||||||
|
|
||||||
|
@@ -1,7 +1,8 @@
|
|||||||
dnl Process this file with autoconf 2.71 or later to produce
|
dnl Process this file with autoconf 2.71 or later to produce
|
||||||
dnl a configure script.
|
dnl a configure script.
|
||||||
AC_PREREQ([2.71])
|
AC_PREREQ([2.71])
|
||||||
AC_INIT
|
m4_define([VERSION],m4_normalize(m4_include([version])))
|
||||||
|
AC_INIT([nasm],VERSION,[https://bugs.nasm.us/],[nasm],[https://www.nasm.us/])
|
||||||
AC_CONFIG_SRCDIR([config/config.h.in])
|
AC_CONFIG_SRCDIR([config/config.h.in])
|
||||||
AC_CONFIG_HEADERS([config/config.h])
|
AC_CONFIG_HEADERS([config/config.h])
|
||||||
AC_PREFIX_PROGRAM(nasm)
|
AC_PREFIX_PROGRAM(nasm)
|
||||||
|
@@ -8,17 +8,26 @@
|
|||||||
|
|
||||||
@SET_MAKE@
|
@SET_MAKE@
|
||||||
|
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
|
||||||
top_srcdir = @top_srcdir@
|
top_srcdir = @top_srcdir@
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
|
objdir = @builddir@
|
||||||
VPATH = @srcdir@
|
VPATH = @srcdir@
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
bindir = @bindir@
|
bindir = @bindir@
|
||||||
mandir = @mandir@
|
mandir = @mandir@
|
||||||
docdir = @docdir@
|
|
||||||
htmldir = @htmldir@
|
|
||||||
infodir = @infodir@
|
|
||||||
datarootdir = @datarootdir@
|
datarootdir = @datarootdir@
|
||||||
|
datadir = @datadir@
|
||||||
|
mydatadir = $(datadir)/$(PACKAGE_TARNAME)
|
||||||
|
docdir = @docdir@
|
||||||
|
htmldir = @htmldir@
|
||||||
|
pdfdir = @pdfdir@
|
||||||
|
psdir = @psdir@
|
||||||
|
emacsdir = $(datarootdir)/emacs/site-lisp
|
||||||
|
jsondir = $(mydatadir)
|
||||||
|
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
@@ -132,10 +141,9 @@ spotless: clean
|
|||||||
-$(RM_F) *.hlp nasmdoc.txt *.inf *.pdf *.pdf.xz *.dvi
|
-$(RM_F) *.hlp nasmdoc.txt *.inf *.pdf *.pdf.xz *.dvi
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
$(MKDIR_P) $(DESTDIR)$(htmldir)
|
$(MKDIR_P) $(DESTDIR)$(htmldir) $(DESTDIR)$(pdfdir)
|
||||||
$(INSTALL_DATA) html/* $(DESTDIR)$(htmldir)
|
$(INSTALL_DATA) html/* $(DESTDIR)$(htmldir)
|
||||||
$(MKDIR_P) $(DESTDIR)$(docdir)
|
$(INSTALL_DATA) nasmdoc.pdf $(DESTDIR)$(pdfdir)
|
||||||
$(INSTALL_DATA) nasmdoc.pdf nasmdoc.txt $(DESTDIR)$(docdir)
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Dummy rules that changes make behavior
|
# Dummy rules that changes make behavior
|
||||||
|
@@ -10,7 +10,9 @@
|
|||||||
tmp="$(mktemp -d)"
|
tmp="$(mktemp -d)"
|
||||||
[ -n "$tmp" ] || exit 1
|
[ -n "$tmp" ] || exit 1
|
||||||
|
|
||||||
NASM="${NASM:-../nasm}"
|
if [ -n "$1" ]; then
|
||||||
|
NASM="$1"
|
||||||
|
fi
|
||||||
|
|
||||||
: > "$tmp/junk.asm"
|
: > "$tmp/junk.asm"
|
||||||
"$NASM" -f bin -o "$tmp/junk.bin" -Lsb -l "$tmp/junk.lst" "$tmp/junk.asm"
|
"$NASM" -f bin -o "$tmp/junk.bin" -Lsb -l "$tmp/junk.lst" "$tmp/junk.asm"
|
||||||
|
15
nasm.spec.in
15
nasm.spec.in
@@ -20,6 +20,7 @@ BuildRequires: xmlto
|
|||||||
BuildRequires: perl
|
BuildRequires: perl
|
||||||
BuildRequires: gcc
|
BuildRequires: gcc
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
|
BuildRequires: gzip
|
||||||
BuildRequires: xz
|
BuildRequires: xz
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
Obsoletes: %{name}-rdoff
|
Obsoletes: %{name}-rdoff
|
||||||
@@ -31,7 +32,9 @@ BuildRequires: ghostscript
|
|||||||
BuildRequires: fontconfig
|
BuildRequires: fontconfig
|
||||||
BuildRequires: google-roboto-fonts
|
BuildRequires: google-roboto-fonts
|
||||||
BuildRequires: google-roboto-mono-fonts
|
BuildRequires: google-roboto-mono-fonts
|
||||||
Obsoletes: %{name}-doc < %{version}-%{release}
|
|
||||||
|
%define _pkgdatadir %{_datadir}/%{name}
|
||||||
|
%define pkgdatadir %{?buildroot:%{buildroot}}%{_datadir}/%{name}
|
||||||
|
|
||||||
%description
|
%description
|
||||||
NASM is the Netwide Assembler, a free portable assembler for the Intel
|
NASM is the Netwide Assembler, a free portable assembler for the Intel
|
||||||
@@ -52,18 +55,22 @@ make %{?_smp_mflags} everything
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf "%{buildroot}"
|
rm -rf "%{buildroot}"
|
||||||
mkdir -p "%{buildroot}"/%{_bindir}
|
make DESTDIR="%{buildroot}" install install_editors
|
||||||
mkdir -p "%{buildroot}"/%{_mandir}/man1
|
gzip -9 "%{pkgdatadir}"/nasmtok.*
|
||||||
make DESTDIR="%{buildroot}" install
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
|
%defattr(-,root,root)
|
||||||
%doc AUTHORS
|
%doc AUTHORS
|
||||||
|
%doc LICENSE
|
||||||
%{_bindir}/nasm
|
%{_bindir}/nasm
|
||||||
%{_bindir}/ndisasm
|
%{_bindir}/ndisasm
|
||||||
%{_mandir}/man1/nasm.1*
|
%{_mandir}/man1/nasm.1*
|
||||||
%{_mandir}/man1/ndisasm.1*
|
%{_mandir}/man1/ndisasm.1*
|
||||||
|
%dir %{_pkgdatadir}
|
||||||
|
%{_pkgdatadir}/nasmtok.*.gz
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
|
%defattr(-,root,root)
|
||||||
%doc doc/html doc/nasmdoc.pdf.xz
|
%doc doc/html doc/nasmdoc.pdf.xz
|
||||||
|
|
||||||
# This is the upstream spec file; the change log is in git
|
# This is the upstream spec file; the change log is in git
|
||||||
|
Reference in New Issue
Block a user