rosenrot-browser

A hackable browser based on Webkitgtk
Log | Files | Refs | README

commit b129954d4d2f3fcc176f3bea96110e9dfd188bd5
parent b32749aa6e495aedc286e9537a4ee664c467919c
Author: NunoSempere <nuno.sempere@protonmail.com>
Date:   Fri, 21 Apr 2023 19:19:11 -0400

feat: improve compilation a bit.

- tcc -> gcc (noticeably faster compilation)

Diffstat:
Mmakefile | 9++++++++-
Mplugins/readability/readability.c | 2+-
Mplugins/readability/readability.h | 2+-
Mplugins/readability/recompute_READABILITY_N.sh | 9+++++----
Mplugins/style/recompute_STYLE_N.sh | 9+++++----
5 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/makefile b/makefile @@ -6,7 +6,7 @@ # make uninstall ## C compiler -CC=gcc +CC=tcc # much faster compilation than gcc ## Main file SRC=rose.c @@ -53,6 +53,13 @@ DEFAULT_DIR=/home/loki/Documents/core/software/fresh/C/rose-browser/rosenrot CURRENT_DIR=`pwd` build: $(SRC) $(PLUGS) $(CONFIG) + # Recompute constants + cd /plugins/readability/ + sh recompute_READABILITY_N.sh + cd - + cd /plugins/style + sh recompute_STYLE_N.sh + cd - # Make cache mkdir -p $(CURRENT_CACHE_DIR) # Hardcode cache path diff --git a/plugins/readability/readability.c b/plugins/readability/readability.c @@ -1,7 +1,7 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#define READABILITY_N 85133 + 1000 +#define READABILITY_N 85314 + 1000 void read_readability_js(char* string) { diff --git a/plugins/readability/readability.h b/plugins/readability/readability.h @@ -1,7 +1,7 @@ #ifndef READABILITY #define READABILITY -#define READABILITY_N 85133 + 1000 +#define READABILITY_N 85314 + 1000 void read_readability_js(char* string); diff --git a/plugins/readability/recompute_READABILITY_N.sh b/plugins/readability/recompute_READABILITY_N.sh @@ -1,8 +1,9 @@ -#!/bin/bash -function sedr(){ +#!/bin/sh +sed_wrapper() +{ find ./ -type f -exec sed -i -e "$1" {} \; } ## e.g., sedr "s/target/replacement/g" -READABILITY_N=$(wc -c readability.js | cut -d " " -f 1) -sedr "s/^#define READABILITY_N .*/#define READABILITY_N $READABILITY_N + 1000/g" +READABILITY_N=`wc -c readability.js | cut -d " " -f 1` +sed_wrapper "s/^#define READABILITY_N .*/#define READABILITY_N $READABILITY_N + 1000/g" diff --git a/plugins/style/recompute_STYLE_N.sh b/plugins/style/recompute_STYLE_N.sh @@ -1,8 +1,9 @@ -#!/bin/bash -function sedr(){ +#!/bin/sh +sed_wrapper() +{ find ./ -type f -exec sed -i -e "$1" {} \; } ## e.g., sedr "s/target/replacement/g" -STYLE_N=$(wc -c style.js | cut -d " " -f 1) -sedr "s/^#define STYLE_N .*/#define STYLE_N $STYLE_N + 1/g" +STYLE_N=`wc -c style.js | cut -d " " -f 1` +sed_wrapper "s/^#define STYLE_N .*/#define STYLE_N $STYLE_N + 1/g"