Permalink
Browse files

* install / uninstall targets for Makefile

* Better README
* Preparation for 0.0.1
  • Loading branch information...
halhen committed Apr 23, 2009
1 parent 1a9d715 commit fc62247910df09177551543ffc406aac8f7d9ce9
Showing with 68 additions and 9 deletions.
  1. +14 −2 Makefile
  2. +51 −6 README
  3. +2 −0 config.mk
  4. +1 −1 main.c
@@ -1,12 +1,24 @@
include config.mk

CC = gcc
CFLAGS = -O2 -Wall -W
OBJECTS = main.o xmlhelpers.o

all : $(OBJECTS)
all: $(OBJECTS)
$(CC) `pkg-config --libs fuse` `xml2-config --libs` $(OBJECTS) -o xmlfs -g

%.o : %.c
%.o: %.c
$(CC) $(CFLAGS) `pkg-config --cflags fuse` `xml2-config --cflags` -c $<

clean:
rm xmlfs $(OBJECTS)

install: all
@echo installing executable to ${DESTDIR}${PREFIX}/bin
@mkdir -p ${DESTDIR}${PREFIX}/bin
@cp -f xmlfs ${DESTDIR}${PREFIX}/bin
@chmod 755 ${DESTDIR}${PREFIX}/bin/xmlfs

uninstall:
@echo removing executable from ${DESTDIR}${PREFIX}/bin
@rm ${DESTDIR}${PREFIX}/bin/xmlfs
57 README
@@ -1,15 +1,60 @@
xmlfs - mount an xml file to a file system
xmlfs - mount xml files to file systems

Nodes become directories with an index prepended to handle duplicates.
Attribute become files with value in it.
xmlfs is an userspace application that lets you mount an xml file in the directory structure. xmlfs uses FUSE for the file system bindings and the Gnome project libxml2.

XML nodes are represented as directories with an index prepended to handle duplicates.
Attribute become files containing the attribute value.
Node content is available in the #text files.

Very early version. Currently handles simple XML, ASCII and read-only file structure.
More documentation will come.
Note that xmlfs is at a very early version. Currently handles simple XML, ASCII and read-only file structure.

Depends on: FUSE (http://fuse.sourceforge.net/) and libxml2 (http://www.xmlsoft.org/).


INSTALLATION
============

Edit config.mk to match your setup. Next, as any user:

$ make

As root:

# make install

To uninstall, as root:

# make uninstall


USAGE
=====

$ mkdir mount_dir/
$ xmlfs -o xmlfile=file.xml mount_dir/

Unmount with

$ fusermount -u mount_dir


KNOWN ERRORS
============
* valgrind reports false free()'s from using xml_rootparent


CHANGES
=======

0.0.1
* Initial version supporting ASCII, simple XML and read-only file structure


LICENSE
=======
Copyright (c) 2009 Henrik Hallberg <halhen@k2h.se>
Released under GPL 2 - see LICENSE for details.
Please report bugs or feature requests by email.
Please report bugs or feature requests by email or at github.

http://code.k2h.se
http://github.com/halhen/xmlfs/tree/master
@@ -0,0 +1,2 @@
PREFIX = /usr
MANPREFIX = /${PREFIX}/share/man
2 main.c
@@ -222,7 +222,7 @@ static int xmlfs_opt_proc(void* UNUSED(data), const char* UNUSED(arg), int key,
fuse_main(outargs->argc, outargs->argv, &fileops, NULL);
exit(1);
case KEY_VERSION:
fprintf(stderr, "xmlfs version 0.0.1a\n");
fprintf(stderr, "xmlfs version 0.0.1\n");
fuse_opt_add_arg(outargs, "--version");
fuse_main(outargs->argc, outargs->argv, &fileops, NULL);
exit(0);

0 comments on commit fc62247

Please sign in to comment.