Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix a few bugs and code smells, but mostly convert to autotools #123

Merged
merged 8 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,17 @@ doc/html
*.c~
*.h~

# autotools
autom4te.cache

#Others
mnt

# Generated files
Doxyfile
Makefile
config.log
config.status
doc
src/.deps
src/.dirstamp
3 changes: 1 addition & 2 deletions Doxyfile → Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -790,8 +790,7 @@ WARN_LOGFILE =
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
# Note: If this tag is empty the current directory is searched.

INPUT = . \
src
INPUT = @srcdir@ @srcdir@/src

# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
Expand Down
99 changes: 0 additions & 99 deletions Makefile

This file was deleted.

36 changes: 36 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
bin_PROGRAMS = httpdirfs
httpdirfs_SOURCES = src/main.c src/network.c src/fuse_local.c src/link.c \
src/cache.c src/util.c src/sonic.c src/log.c src/config.c src/memcache.c
# This has $(fuse_LIBS) in it because there's a bug in the fuse pkgconf:
# it should add -pthread to CFLAGS but doesn't.
# $(NUCLA) is explained in configure.ac.
CFLAGS = -g -O2 -Wall -Wextra -Wshadow $(NUCLA) \
-rdynamic -D_GNU_SOURCE -DVERSION=\"$(VERSION)\"\
$(pkgconf_CFLAGS) $(fuse_CFLAGS) $(fuse_LIBS)
LIBS += $(pkgconf_LIBS) $(fuse_LIBS)
man_MANS = doc/man/httpdirfs.1
CLEANFILES = doc/man/*
DISTCLEANFILES = doc/html/*

# %.o: $(srcdir)/src/%.c
# $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -c -o $@ $<

# httpdirfs: $(COBJS)
# $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)

man: doc/man/httpdirfs.1

doc/man/httpdirfs.1: httpdirfs
mkdir -p doc/man
rm -f doc/man/httpdirfs.1.tmp
help2man --name "mount HTTP directory as a virtual filesystem" \
--no-discard-stderr ./httpdirfs > doc/man/httpdirfs.1.tmp
mv doc/man/httpdirfs.1.tmp doc/man/httpdirfs.1

doc:
doxygen Doxyfile

format:
astyle --style=kr --align-pointer=name --max-code-length=80 src/*.c src/*.h

.PHONY: man doc format
Loading