ObjFW  Check-in [e817fac245]

Overview
Comment:Consistently use sed -e for multiple scripts
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: e817fac245e9ab71256080c8993180fb8824872d274fc147ea93a9442ad219e0
User & Date: js on 2022-08-15 23:38:06
Other Links: manifest | tags
Context
2022-08-17
23:18
Simplify `make release` check-in: 144a365825 user: js tags: trunk
2022-08-15
23:38
Consistently use sed -e for multiple scripts check-in: e817fac245 user: js tags: trunk
23:02
OF{LHA,Tar,ZIP}Archive: Use URL instead of path check-in: fee2316eca user: js tags: trunk
Changes

Modified utils/objfw-compile from [3a536375c5] to [ffd05ad528].

296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
	objs="$objs $obj"
	build="no"

	if test ! -f "$obj" -o "$i" -nt "$obj"; then
		build="yes"
	else
		deps=$($OBJC -E -M $CPPFLAGS $OBJCFLAGS $i |
			sed 's/.*: //' | sed 's/\\//g')
		for dep in $deps; do
			test "$dep" -nt $obj && build="yes"
		done
	fi

	if test x"$build" = x"yes"; then
		link="yes"







|







296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
	objs="$objs $obj"
	build="no"

	if test ! -f "$obj" -o "$i" -nt "$obj"; then
		build="yes"
	else
		deps=$($OBJC -E -M $CPPFLAGS $OBJCFLAGS $i |
			sed -e 's/.*: //' -e 's/\\//g')
		for dep in $deps; do
			test "$dep" -nt $obj && build="yes"
		done
	fi

	if test x"$build" = x"yes"; then
		link="yes"

Modified utils/objfw-embed from [a4ff5f4233] to [b832fbf4cf].

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <stddef.h>
#include <stdint.h>

extern void OFRegisterEmbeddedFile(const char *, const uint8_t *, size_t);

static const uint8_t bytes[] = {
EOF
od -vtx1 $1 | sed '/^[^ ][^ ]*$/d;s/  */ /g;s/ $//g;s/^[^ ][^ ]* //;s/ /, 0x/g;s/^/	0x/;s/$/,/'
cat <<EOF
};

static void __attribute__((__constructor__))
ctor(void)
{
	OFRegisterEmbeddedFile("$2", bytes, sizeof(bytes));
}
EOF







|









10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <stddef.h>
#include <stdint.h>

extern void OFRegisterEmbeddedFile(const char *, const uint8_t *, size_t);

static const uint8_t bytes[] = {
EOF
od -vtx1 $1 | sed -e '/^[^ ][^ ]*$/d;s/  */ /g' -e 's/ $//g;s/^[^ ][^ ]* //' -e 's/ /, 0x/g' -e 's/^/	0x/' -e 's/$/,/'
cat <<EOF
};

static void __attribute__((__constructor__))
ctor(void)
{
	OFRegisterEmbeddedFile("$2", bytes, sizeof(bytes));
}
EOF