diff --git a/Makefile-libostree.am b/Makefile-libostree.am new file mode 100644 index 00000000..7b8790b8 --- /dev/null +++ b/Makefile-libostree.am @@ -0,0 +1,32 @@ +# Makefile for C source code +# +# Copyright (C) 2011 Colin Walters +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# Author: Colin Walters + +noinst_LTLIBRARIES += libostree.la + +libostree_la_SOURCES = libostree/ostree.h \ + libostree/ostree-core.c \ + libostree/ostree-core.h \ + libostree/ostree-repo.c \ + libostree/ostree-repo.h \ + libostree/ostree-checkout.c \ + libostree/ostree-checkout.h \ + $(NULL) +libostree_la_CFLAGS = -I$(srcdir)/libotutil -I$(srcdir)/libostree -DLOCALEDIR=\"$(datadir)/locale\" $(OT_COREBIN_DEP_CFLAGS) +libostree_la_LIBADD = libotutil.la $(OT_COREBIN_DEP_LIBS) diff --git a/Makefile-ostree.am b/Makefile-ostree.am new file mode 100644 index 00000000..01ffbecc --- /dev/null +++ b/Makefile-ostree.am @@ -0,0 +1,38 @@ +# Makefile for C source code +# +# Copyright (C) 2011 Colin Walters +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# Author: Colin Walters + +bin_PROGRAMS += ostree + +ostree_SOURCES = ostree/main.c \ + ostree/ot-builtins.h \ + ostree/ot-builtin-checkout.c \ + ostree/ot-builtin-commit.c \ + ostree/ot-builtin-fsck.c \ + ostree/ot-builtin-init.c \ + ostree/ot-builtin-link-file.c \ + ostree/ot-builtin-log.c \ + ostree/ot-builtin-pull.c \ + ostree/ot-builtin-run-triggers.c \ + ostree/ot-builtin-remote.c \ + ostree/ot-builtin-rev-parse.c \ + ostree/ot-builtin-show.c \ + $(NULL) +ostree_CFLAGS = -I$(srcdir)/src -I$(srcdir)/libostree -I$(srcdir)/libotutil -DLOCALEDIR=\"$(datadir)/locale\" $(OT_COREBIN_DEP_CFLAGS) +ostree_LDADD = libotutil.la libostree.la $(OT_COREBIN_DEP_LIBS) diff --git a/Makefile-otutil.am b/Makefile-otutil.am new file mode 100644 index 00000000..8df7c5b4 --- /dev/null +++ b/Makefile-otutil.am @@ -0,0 +1,33 @@ +# Makefile for C source code +# +# Copyright (C) 2011 Colin Walters +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# Author: Colin Walters + +noinst_LTLIBRARIES += libotutil.la + +libotutil_la_SOURCES = \ + libotutil/ot-opt-utils.c \ + libotutil/ot-opt-utils.h \ + libotutil/ot-unix-utils.c \ + libotutil/ot-unix-utils.h \ + libotutil/ot-gio-utils.c \ + libotutil/ot-gio-utils.h \ + libotutil/otutil.h \ + $(NULL) +libotutil_la_CFLAGS = -I$(srcdir)/libotutil -DLOCALEDIR=\"$(datadir)/locale\" $(GIO_UNIX_CFLAGS) +libotutil_la_LIBADD = $(GIO_UNIX_LIBS) diff --git a/Makefile-src.am b/Makefile-src.am deleted file mode 100644 index 33657e6c..00000000 --- a/Makefile-src.am +++ /dev/null @@ -1,65 +0,0 @@ -# Makefile for C source code -# -# Copyright (C) 2011 Colin Walters -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# -# Author: Colin Walters - -noinst_LTLIBRARIES += libotutil.la - -libotutil_la_SOURCES = \ - src/libotutil/ot-opt-utils.c \ - src/libotutil/ot-opt-utils.h \ - src/libotutil/ot-unix-utils.c \ - src/libotutil/ot-unix-utils.h \ - src/libotutil/ot-gio-utils.c \ - src/libotutil/ot-gio-utils.h \ - src/libotutil/otutil.h \ - $(NULL) -libotutil_la_CFLAGS = -I$(srcdir)/src/libotutil -DLOCALEDIR=\"$(datadir)/locale\" $(GIO_UNIX_CFLAGS) -libotutil_la_LIBADD = $(GIO_UNIX_LIBS) - -noinst_LTLIBRARIES += libostree.la - -libostree_la_SOURCES = src/libostree/ostree.h \ - src/libostree/ostree-core.c \ - src/libostree/ostree-core.h \ - src/libostree/ostree-repo.c \ - src/libostree/ostree-repo.h \ - src/libostree/ostree-checkout.c \ - src/libostree/ostree-checkout.h \ - $(NULL) -libostree_la_CFLAGS = -I$(srcdir)/src/libostree -I$(srcdir)/src/libotutil -DLOCALEDIR=\"$(datadir)/locale\" $(OT_COREBIN_DEP_CFLAGS) -libostree_la_LIBADD = libotutil.la $(OT_COREBIN_DEP_LIBS) - -bin_PROGRAMS += ostree - -ostree_SOURCES = src/main.c \ - src/ot-builtins.h \ - src/ot-builtin-checkout.c \ - src/ot-builtin-commit.c \ - src/ot-builtin-fsck.c \ - src/ot-builtin-init.c \ - src/ot-builtin-link-file.c \ - src/ot-builtin-log.c \ - src/ot-builtin-pull.c \ - src/ot-builtin-run-triggers.c \ - src/ot-builtin-remote.c \ - src/ot-builtin-rev-parse.c \ - src/ot-builtin-show.c \ - $(NULL) -ostree_CFLAGS = -I$(srcdir)/src -I$(srcdir)/src/libostree -I$(srcdir)/src/libotutil -DLOCALEDIR=\"$(datadir)/locale\" $(OT_COREBIN_DEP_CFLAGS) -ostree_LDADD = libotutil.la libostree.la $(OT_COREBIN_DEP_LIBS) diff --git a/Makefile.am b/Makefile.am index 1b28adf0..3dbda721 100644 --- a/Makefile.am +++ b/Makefile.am @@ -11,5 +11,7 @@ libexec_PROGRAMS = noinst_LTLIBRARIES = noinst_PROGRAMS = -include Makefile-src.am +include Makefile-otutil.am +include Makefile-libostree.am +include Makefile-ostree.am include Makefile-triggers.am diff --git a/src/libostree/ostree-checkout.c b/libostree/ostree-checkout.c similarity index 100% rename from src/libostree/ostree-checkout.c rename to libostree/ostree-checkout.c diff --git a/src/libostree/ostree-checkout.h b/libostree/ostree-checkout.h similarity index 100% rename from src/libostree/ostree-checkout.h rename to libostree/ostree-checkout.h diff --git a/src/libostree/ostree-core.c b/libostree/ostree-core.c similarity index 100% rename from src/libostree/ostree-core.c rename to libostree/ostree-core.c diff --git a/src/libostree/ostree-core.h b/libostree/ostree-core.h similarity index 100% rename from src/libostree/ostree-core.h rename to libostree/ostree-core.h diff --git a/src/libostree/ostree-repo.c b/libostree/ostree-repo.c similarity index 100% rename from src/libostree/ostree-repo.c rename to libostree/ostree-repo.c diff --git a/src/libostree/ostree-repo.h b/libostree/ostree-repo.h similarity index 100% rename from src/libostree/ostree-repo.h rename to libostree/ostree-repo.h diff --git a/src/libostree/ostree.h b/libostree/ostree.h similarity index 100% rename from src/libostree/ostree.h rename to libostree/ostree.h diff --git a/src/libotutil/ot-gio-utils.c b/libotutil/ot-gio-utils.c similarity index 100% rename from src/libotutil/ot-gio-utils.c rename to libotutil/ot-gio-utils.c diff --git a/src/libotutil/ot-gio-utils.h b/libotutil/ot-gio-utils.h similarity index 100% rename from src/libotutil/ot-gio-utils.h rename to libotutil/ot-gio-utils.h diff --git a/src/libotutil/ot-opt-utils.c b/libotutil/ot-opt-utils.c similarity index 100% rename from src/libotutil/ot-opt-utils.c rename to libotutil/ot-opt-utils.c diff --git a/src/libotutil/ot-opt-utils.h b/libotutil/ot-opt-utils.h similarity index 100% rename from src/libotutil/ot-opt-utils.h rename to libotutil/ot-opt-utils.h diff --git a/src/libotutil/ot-unix-utils.c b/libotutil/ot-unix-utils.c similarity index 99% rename from src/libotutil/ot-unix-utils.c rename to libotutil/ot-unix-utils.c index e1e89725..78243f7c 100644 --- a/src/libotutil/ot-unix-utils.c +++ b/libotutil/ot-unix-utils.c @@ -54,7 +54,7 @@ ot_util_spawn_pager (GOutputStream **out_stream, argv[0] = (char*)pager; argv[1] = NULL; - if (!g_spawn_async_with_pipes (NULL, argv, NULL, G_SPAWN_SEARCH_PATH, + if (!g_spawn_async_with_pipes (NULL, argv, NULL, G_SPAWN_SEARCH_PATH | G_SPAWN_DO_NOT_REAP_CHILD, NULL, NULL, &pid, &stdin_fd, NULL, NULL, error)) { g_prefix_error (error, "%s", "Failed to spawn pager: "); diff --git a/src/libotutil/ot-unix-utils.h b/libotutil/ot-unix-utils.h similarity index 100% rename from src/libotutil/ot-unix-utils.h rename to libotutil/ot-unix-utils.h diff --git a/src/libotutil/otutil.h b/libotutil/otutil.h similarity index 100% rename from src/libotutil/otutil.h rename to libotutil/otutil.h diff --git a/src/main.c b/ostree/main.c similarity index 100% rename from src/main.c rename to ostree/main.c diff --git a/src/ot-builtin-checkout.c b/ostree/ot-builtin-checkout.c similarity index 100% rename from src/ot-builtin-checkout.c rename to ostree/ot-builtin-checkout.c diff --git a/src/ot-builtin-commit.c b/ostree/ot-builtin-commit.c similarity index 100% rename from src/ot-builtin-commit.c rename to ostree/ot-builtin-commit.c diff --git a/src/ot-builtin-fsck.c b/ostree/ot-builtin-fsck.c similarity index 100% rename from src/ot-builtin-fsck.c rename to ostree/ot-builtin-fsck.c diff --git a/src/ot-builtin-init.c b/ostree/ot-builtin-init.c similarity index 100% rename from src/ot-builtin-init.c rename to ostree/ot-builtin-init.c diff --git a/src/ot-builtin-link-file.c b/ostree/ot-builtin-link-file.c similarity index 100% rename from src/ot-builtin-link-file.c rename to ostree/ot-builtin-link-file.c diff --git a/src/ot-builtin-log.c b/ostree/ot-builtin-log.c similarity index 100% rename from src/ot-builtin-log.c rename to ostree/ot-builtin-log.c diff --git a/src/ot-builtin-pull.c b/ostree/ot-builtin-pull.c similarity index 100% rename from src/ot-builtin-pull.c rename to ostree/ot-builtin-pull.c diff --git a/src/ot-builtin-remote.c b/ostree/ot-builtin-remote.c similarity index 100% rename from src/ot-builtin-remote.c rename to ostree/ot-builtin-remote.c diff --git a/src/ot-builtin-rev-parse.c b/ostree/ot-builtin-rev-parse.c similarity index 100% rename from src/ot-builtin-rev-parse.c rename to ostree/ot-builtin-rev-parse.c diff --git a/src/ot-builtin-run-triggers.c b/ostree/ot-builtin-run-triggers.c similarity index 100% rename from src/ot-builtin-run-triggers.c rename to ostree/ot-builtin-run-triggers.c diff --git a/src/ot-builtin-show.c b/ostree/ot-builtin-show.c similarity index 100% rename from src/ot-builtin-show.c rename to ostree/ot-builtin-show.c diff --git a/src/ot-builtins.h b/ostree/ot-builtins.h similarity index 100% rename from src/ot-builtins.h rename to ostree/ot-builtins.h