Skip to content

Commit 3bb875f

Browse files
author
H. Peter Anvin
committed
Merge remote-tracking branch 'origin/nasm-3.00.xx'
2 parents 3472f36 + 312ea7d commit 3bb875f

File tree

23 files changed

+788
-659
lines changed

23 files changed

+788
-659
lines changed

.github/workflows/test.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: NASM CI/CD
2+
3+
on:
4+
push:
5+
branches: [ "*" ]
6+
pull_request:
7+
branches: [ "*" ]
8+
9+
jobs:
10+
build:
11+
name: Build and test
12+
runs-on: ubuntu-latest
13+
14+
container:
15+
image: ubuntu:24.04
16+
17+
steps:
18+
- name: Install dependencies
19+
run: |
20+
apt-get update && apt-get install -y automake perl python3 build-essential
21+
22+
- name: Checkout repository
23+
uses: actions/checkout@v4
24+
25+
- name: Prepare build system
26+
run: |
27+
sh autogen.sh
28+
sh configure
29+
30+
- name: Build
31+
run: |
32+
make
33+
./nasm --version
34+
35+
- name: Run travis tests
36+
run: |
37+
make travis

Makefile.in

Lines changed: 20 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,12 @@ endif
103103
.SUFFIXES:
104104
.SUFFIXES: $(X) .$(O) .$(A) .xml .1 .c .i .s .txt .time
105105

106+
# Use to mark phony targets in global lists
107+
PHONY =
108+
106109
.PHONY: all doc misc install clean distclean cleaner spotless test
107-
.PHONY: install_doc everything install_everything strip perlreq dist tags TAGS
108-
.PHONY: nothing manpages nsis editors
110+
.PHONY: install_doc everything install_everything strip perlreq warnings
111+
.PHONY: dist tags TAGS nothing manpages nsis editors
109112

110113
.c.$(O):
111114
$(CC) -c $(ALL_CFLAGS) -o $@ $<
@@ -131,7 +134,7 @@ NDISASM = disasm/ndisasm.$(O)
131134
PROGOBJ = $(NASM) $(NDISASM)
132135
PROGS = nasm$(X) ndisasm$(X)
133136

134-
# Files dependent on extracted warnings
137+
# Files dependent on warnings.dat
135138
WARNOBJ = asm/warnings.$(O)
136139
WARNFILES = asm/warnings_c.h include/warnings.h doc/warnings.src
137140

@@ -257,11 +260,8 @@ ndisasm$(X): $(NDISASM) $(MANIFEST) $(DISLIB) $(NASMLIB)
257260
$(CC) $(ALL_LDFLAGS) -o $@ $(NDISASM) $(MANIFEST) \
258261
$(DISLIB) $(NASMLIB) $(LIBS)
259262

260-
# These are specific to certain Makefile syntaxes...
261-
WARNSRCS = $(ALLOBJ_W:.$(O)=.c)
262-
263263
# Make sure we have subdirectories set up...
264-
$(LIBOBJ) $(LIBOBJ_DIS) $(WARNTIMES) $(WARNSRCS): $(DIRS)
264+
$(LIBOBJ) $(LIBOBJ_DIS): $(DIRS)
265265

266266
#-- Begin Generated File Rules --#
267267

@@ -399,58 +399,27 @@ editors/nasmtok.json: editors/nasmtok.pl asm/tokhash.c asm/pptok.c \
399399
version.mak
400400
$(RUNPERL) $(srcdir)/editors/nasmtok.pl -json $@ $(srcdir) $(objdir)
401401

402-
editors: $(EDITORS)
403-
404-
#-- End Generated File Rules --#
405-
406-
# Extract warnings from source code. This is done automatically if any
407-
# C files have changed; the script is fast enough that that is
408-
# reasonable, but doesn't update the time stamp if the files aren't
409-
# changed, to avoid rebuilding everything every time. Track the actual
410-
# dependency by the empty file asm/warnings.time.
411-
#
412-
# This doesn't seem to work for non-Unix Makefile variants, so don't
413-
# export those rules here (non-Unix Makefiles only guaranteed to build
414-
# a distribution ball anyway.)
415-
416-
WARNTIMES = $(WARNFILES:=.time)
417-
418-
.PHONY: warnings
419-
warnings:
420-
$(RM_F) $(WARNFILES) $(WARNTIMES) asm/warnings.time
421-
$(MAKE) asm/warnings.time
402+
editors: $(EDITORS) $(PHONY)
422403

423-
asm/warnings.time: $(WARNSRCS) asm/warnings.pl
424-
$(EMPTY) asm/warnings.time
425-
$(MAKE) $(WARNTIMES)
426-
427-
asm/warnings_c.h.time: asm/warnings.pl asm/warnings.time
404+
asm/warnings_c.h: asm/warnings.pl asm/warnings.dat
428405
$(RUNPERL) $(srcdir)/asm/warnings.pl c asm/warnings_c.h \
429-
$(srcdir) $(WARNSRCS)
430-
$(EMPTY) asm/warnings_c.h.time
431-
432-
asm/warnings_c.h: asm/warnings_c.h.time
433-
$(SIDE)
406+
$(srcdir)/asm/warnings.dat
434407

435-
include/warnings.h.time: asm/warnings.pl asm/warnings.time
408+
include/warnings.h: asm/warnings.pl asm/warnings.dat
436409
$(RUNPERL) $(srcdir)/asm/warnings.pl h include/warnings.h \
437-
$(srcdir) $(WARNSRCS)
438-
$(EMPTY) include/warnings.h.time
410+
$(srcdir)/asm/warnings.dat
439411

440-
include/warnings.h: include/warnings.h.time
441-
$(SIDE)
442-
443-
doc/warnings.src.time: asm/warnings.pl asm/warnings.time
412+
doc/warnings.src: asm/warnings.pl asm/warnings.dat
444413
$(RUNPERL) $(srcdir)/asm/warnings.pl doc doc/warnings.src \
445-
$(srcdir) $(WARNSRCS)
446-
$(EMPTY) doc/warnings.src.time
447-
448-
doc/warnings.src : doc/warnings.src.time
449-
$(SIDE)
414+
$(srcdir)/asm/warnings.dat
450415

451416
$(PERLREQ): $(DIRS)
452417

453-
perlreq: $(PERLREQ)
418+
perlreq: $(PERLREQ) $(PHONY)
419+
420+
warnings: $(WARNFILES) $(PHONY)
421+
422+
#-- End Generated File Rules --#
454423

455424
#-- Begin NSIS Rules --#
456425

@@ -560,7 +529,7 @@ editor_builtin: nasm$(X)
560529

561530
dist:
562531
$(MAKE) alldeps
563-
$(MAKE) perlreq warnings spec
532+
$(MAKE) perlreq spec
564533
$(MAKE) editor_builtin
565534
$(MAKE) editors $(MANPAGES)
566535
$(MAKE) distclean

Mkfiles/msvc.mak

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,25 @@ editors\nasmtok.json: editors\nasmtok.pl asm\tokhash.c asm\pptok.c \
344344
version.mak
345345
$(RUNPERL) $(srcdir)\editors\nasmtok.pl -json $@ $(srcdir) $(objdir)
346346

347-
editors: $(EDITORS)
347+
editors: $(EDITORS) $(PHONY)
348+
349+
asm\warnings_c.h: asm\warnings.pl asm\warnings.dat
350+
$(RUNPERL) $(srcdir)\asm\warnings.pl c asm\warnings_c.h \
351+
$(srcdir)\asm\warnings.dat
352+
353+
include\warnings.h: asm\warnings.pl asm\warnings.dat
354+
$(RUNPERL) $(srcdir)\asm\warnings.pl h include\warnings.h \
355+
$(srcdir)\asm\warnings.dat
356+
357+
doc\warnings.src: asm\warnings.pl asm\warnings.dat
358+
$(RUNPERL) $(srcdir)\asm\warnings.pl doc doc\warnings.src \
359+
$(srcdir)\asm\warnings.dat
360+
361+
$(PERLREQ): $(DIRS)
362+
363+
perlreq: $(PERLREQ) $(PHONY)
364+
365+
warnings: $(WARNFILES) $(PHONY)
348366

349367
#-- End Generated File Rules --#
350368

Mkfiles/openwcom.mak

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,25 @@ editors\nasmtok.json: editors\nasmtok.pl asm\tokhash.c asm\pptok.c &
353353
version.mak
354354
$(RUNPERL) $(srcdir)\editors\nasmtok.pl -json $@ $(srcdir) $(objdir)
355355

356-
editors: $(EDITORS)
356+
editors: $(EDITORS) $(PHONY)
357+
358+
asm\warnings_c.h: asm\warnings.pl asm\warnings.dat
359+
$(RUNPERL) $(srcdir)\asm\warnings.pl c asm\warnings_c.h &
360+
$(srcdir)\asm\warnings.dat
361+
362+
include\warnings.h: asm\warnings.pl asm\warnings.dat
363+
$(RUNPERL) $(srcdir)\asm\warnings.pl h include\warnings.h &
364+
$(srcdir)\asm\warnings.dat
365+
366+
doc\warnings.src: asm\warnings.pl asm\warnings.dat
367+
$(RUNPERL) $(srcdir)\asm\warnings.pl doc doc\warnings.src &
368+
$(srcdir)\asm\warnings.dat
369+
370+
$(PERLREQ): $(DIRS)
371+
372+
perlreq: $(PERLREQ) $(PHONY)
373+
374+
warnings: $(WARNFILES) $(PHONY)
357375

358376
#-- End Generated File Rules --#
359377

0 commit comments

Comments
 (0)