From: Stefano Brivio <sbrivio@redhat.com>
To: passt-dev@passt.top
Cc: KuhnChris <kuhnchris@kuhnchris.eu>
Subject: [PATCH] Revert "MAKE: Fix parallel builds; .o files; .gitignore; new makedocs"
Date: Mon, 10 Jul 2023 06:35:26 +0200 [thread overview]
Message-ID: <20230710043526.1386016-1-sbrivio@redhat.com> (raw)
This reverts commit cc2a6bec3cf2ff6ed0c043ada93d352466614373: I
applied that patch by mistake.
Fixes: cc2a6bec3cf2 ("MAKE: Fix parallel builds; .o files; .gitignore; new makedocs")
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
---
.gitignore | 1 -
Makefile | 51 ++++++++++++++++++++++++++-------------------------
makedocs.pl | 19 -------------------
3 files changed, 26 insertions(+), 45 deletions(-)
delete mode 100644 makedocs.pl
diff --git a/.gitignore b/.gitignore
index caeafa5..d3d0e2c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,4 @@
*~
-*.o
/passt
/passt.avx2
/pasta
diff --git a/Makefile b/Makefile
index 4c99771..a5256f5 100644
--- a/Makefile
+++ b/Makefile
@@ -100,41 +100,29 @@ else
BIN := passt pasta qrap
endif
-.NOTPARALLEL: seccomp.h
-all: seccomp.h $(BIN) $(MANPAGES) docs
-
-PASST_OBJS = $(PASST_SRCS:.c=.o)
-PASST_AVX2_OBJS = $(PASST_SRCS:.c=.avx2.o)
-OBJS = $(SRCS:.c=.o)
-QRAP_OBJS = $(QRAP_SRCS:.c=.o)
-AVXFLAGS += -Ofast -mavx2 -ftree-vectorize -funroll-loops
+all: $(BIN) $(MANPAGES) docs
static: FLAGS += -static -DGLIBC_NO_STATIC_NSS
-static: clean seccomp.h all
+static: clean all
seccomp.h: seccomp.sh $(PASST_SRCS) $(PASST_HEADERS)
@ EXTRA_SYSCALLS="$(EXTRA_SYSCALLS)" ARCH="$(TARGET_ARCH)" CC="$(CC)" ./seccomp.sh $(PASST_SRCS) $(PASST_HEADERS)
-.c.o:
- $(CC) $(FLAGS) $(CFLAGS) $(CPPFLAGS) -c $< -o $@
-
-$(PASST_AVX2_OBJS): seccomp.h
- $(CC) $(AVXFLAGS) $(FLAGS) $(CFLAGS) $(CPPFLAGS) -c $(@:.avx2.o=.c) -o $@
-
-passt: $(PASST_OBJS) seccomp.h
- $(CC) $(FLAGS) $(CFLAGS) $(CPPFLAGS) $(PASST_OBJS) -o passt $(LDFLAGS)
+passt: $(PASST_SRCS) $(HEADERS)
+ $(CC) $(FLAGS) $(CFLAGS) $(CPPFLAGS) $(PASST_SRCS) -o passt $(LDFLAGS)
-passt.avx2: $(PASST_AVX2_OBJS) $(HEADERS) seccomp.h
- $(CC) $(filter-out -O2,$(FLAGS)) $(CFLAGS) $(CPPFLAGS) $(AVXFLAGS) \
- $(PASST_AVX2_OBJS) -o passt.avx2 $(LDFLAGS)
+passt.avx2: FLAGS += -Ofast -mavx2 -ftree-vectorize -funroll-loops
+passt.avx2: $(PASST_SRCS) $(HEADERS)
+ $(CC) $(filter-out -O2,$(FLAGS)) $(CFLAGS) $(CPPFLAGS) \
+ $(PASST_SRCS) -o passt.avx2 $(LDFLAGS)
-passt.avx2: passt seccomp.h
+passt.avx2: passt
pasta.avx2 pasta.1 pasta: pasta%: passt%
ln -sf $< $@
-qrap: $(QRAP_OBJS) passt.h seccomp.h
- $(CC) $(FLAGS) $(CFLAGS) $(CPPFLAGS) $(QRAP_OBJS) -o qrap $(LDFLAGS)
+qrap: $(QRAP_SRCS) passt.h
+ $(CC) $(FLAGS) $(CFLAGS) $(CPPFLAGS) $(QRAP_SRCS) -o qrap $(LDFLAGS)
valgrind: EXTRA_SYSCALLS += rt_sigprocmask rt_sigtimedwait rt_sigaction \
getpid gettid kill clock_gettime mmap \
@@ -182,8 +170,21 @@ pkgs: static
# other way around: the web version should be obtained by adding HTML and
# JavaScript portions to a plain Markdown, instead. However, cgit needs to use
# a file in the git tree. Find a better way around this.
-docs:
- [ ! -e doc/ ]; mkdir docs; perl makedocs.pl > docs/README.plain.md
+docs: README.md
+ @( \
+ skip=0; \
+ while read l; do \
+ case $$l in \
+ "## Demo") exit 0 ;; \
+ "<!"*) ;; \
+ "</"*) skip=1 ;; \
+ "<"*) skip=2 ;; \
+ esac; \
+ \
+ [ $$skip -eq 0 ] && echo "$$l"; \
+ [ $$skip -eq 1 ] && skip=0; \
+ done < README.md; \
+ ) > README.plain.md
# Checkers currently disabled for clang-tidy:
# - llvmlibc-restrict-system-libc-headers
diff --git a/makedocs.pl b/makedocs.pl
deleted file mode 100644
index 295e1d9..0000000
--- a/makedocs.pl
+++ /dev/null
@@ -1,19 +0,0 @@
-use strict;
-
-my $str = '';
-my $regex = qr/(<[^\/].*?>.*?<\/.*?>\n?)|(<\/div>)|(<\/p>)/msp;
-my $subst = '';
-
-
-local $/=undef;
-open FILE, '<', 'README.md' or die "Can't open file $!";
-my $file_content = <FILE>;
-close FILE;
-#print "Source: $file_content\n";
-my $result = $file_content =~ s/$regex//rg;
-
-my $regex2 = qr/\n[ \n]{3,}\n/msp;
-$result = $result =~ s/$regex2/\n\n/rg;
-
-#print "The result of the substitution is: $result\n";
-print "$result\n";
--
2.39.2
reply other threads:[~2023-07-10 4:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230710043526.1386016-1-sbrivio@redhat.com \
--to=sbrivio@redhat.com \
--cc=kuhnchris@kuhnchris.eu \
--cc=passt-dev@passt.top \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://passt.top/passt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for IMAP folder(s).