[Sheepdog] [PATCH 1/2] remove all the autoconf stuff
FUJITA Tomonori
fujita.tomonori at lab.ntt.co.jp
Wed Dec 16 00:52:45 CET 2009
Just simple makefiles should be enough.
Signed-off-by: FUJITA Tomonori <fujita.tomonori at lab.ntt.co.jp>
---
Makefile | 19 +++++++++++++++++
Makefile.in | 15 -------------
collie/Makefile | 30 +++++++++++++++++++++++++++
collie/Makefile.in | 31 ----------------------------
configure.in | 54 --------------------------------------------------
lib/Makefile | 3 ++
lib/Makefile.in | 3 --
shepherd/Makefile | 30 +++++++++++++++++++++++++++
shepherd/Makefile.in | 31 ----------------------------
9 files changed, 82 insertions(+), 134 deletions(-)
create mode 100644 Makefile
delete mode 100644 Makefile.in
create mode 100644 collie/Makefile
delete mode 100644 collie/Makefile.in
delete mode 100644 configure.in
create mode 100644 lib/Makefile
delete mode 100644 lib/Makefile.in
create mode 100644 shepherd/Makefile
delete mode 100644 shepherd/Makefile.in
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..bbe8d85
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,19 @@
+PREFIX ?= /usr
+
+export PREFIX
+
+.PHONY:all
+all:
+ $(MAKE) -C shepherd
+ $(MAKE) -C collie
+
+.PHONY:clean
+clean:
+ $(MAKE) -C shepherd clean
+ $(MAKE) -C collie clean
+ $(MAKE) -C lib clean
+
+.PHONY:install
+install:
+ $(MAKE) -C shepherd install
+ $(MAKE) -C collie install
diff --git a/Makefile.in b/Makefile.in
deleted file mode 100644
index de52b54..0000000
--- a/Makefile.in
+++ /dev/null
@@ -1,15 +0,0 @@
-.PHONY:all
-all:
- cd shepherd; make
- cd collie; make
-
-.PHONY:clean
-clean:
- cd shepherd; make clean
- cd collie; make clean
- cd lib; make clean
-
-.PHONY:install
-install:
- cd shepherd; make install
- cd collie; make install
diff --git a/collie/Makefile b/collie/Makefile
new file mode 100644
index 0000000..a3316e1
--- /dev/null
+++ b/collie/Makefile
@@ -0,0 +1,30 @@
+sbindir ?= $(PREFIX)/sbin
+
+CFLAGS += -g -O2 -Wall -Wstrict-prototypes -I../include
+CFLAGS += -D_GNU_SOURCE
+LIBS += -lpthread -lcrypto -lcpg
+
+PROGRAMS = collie
+COLLIE_OBJS = collie.o net.o vdi.o group.o store.o work.o ../lib/event.o ../lib/net.o ../lib/logger.o
+COLLIE_DEP = $(COLLIE_OBJS:.o=.d)
+
+.PHONY:all
+all: $(PROGRAMS)
+
+collie: $(COLLIE_OBJS)
+ $(CC) $^ -o $@ $(LIBS)
+
+-include $(COLLIE_DEP)
+
+%.o: %.c
+ $(CC) -c $(CFLAGS) $*.c -o $*.o
+ @$(CC) -MM $(CFLAGS) -MF $*.d -MT $*.o $*.c
+
+.PHONY:clean
+clean:
+ rm -f *.[od] $(PROGRAMS)
+
+.PHONY:install
+install: $(PROGRAMS)
+ install -d -m 755 $(DESTDIR)$(sbindir)
+ install -m 755 $(PROGRAMS) $(DESTDIR)$(sbindir)
diff --git a/collie/Makefile.in b/collie/Makefile.in
deleted file mode 100644
index 35e2e5b..0000000
--- a/collie/Makefile.in
+++ /dev/null
@@ -1,31 +0,0 @@
-CFLAGS += -g -O2 -Wall -Wstrict-prototypes -I../include
-CFLAGS += -D_GNU_SOURCE
-LIBS += -lpthread -lcrypto -lcpg
-
-PROGRAMS = collie
-COLLIE_OBJS = collie.o net.o vdi.o group.o store.o work.o ../lib/event.o ../lib/net.o ../lib/logger.o
-COLLIE_DEP = $(COLLIE_OBJS:.o=.d)
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-bindir = @bindir@
-
-.PHONY:all
-all: $(PROGRAMS)
-
-collie: $(COLLIE_OBJS)
- $(CC) $^ -o $@ $(LIBS)
-
--include $(COLLIE_DEP)
-
-%.o: %.c
- $(CC) -c $(CFLAGS) $*.c -o $*.o
- @$(CC) -MM $(CFLAGS) -MF $*.d -MT $*.o $*.c
-
-.PHONY:clean
-clean:
- rm -f *.[od] $(PROGRAMS)
-
-.PHONY:install
-install: $(PROGRAMS)
- install $< $(bindir)
diff --git a/configure.in b/configure.in
deleted file mode 100644
index bfc8d70..0000000
--- a/configure.in
+++ /dev/null
@@ -1,54 +0,0 @@
-# -*- Autoconf -*-
-# Process this file with autoconf to produce a configure script.
-
-AC_PREREQ([2.61])
-AC_INIT
-AC_CONFIG_SRCDIR([lib/net.c])
-
-# Checks for programs.
-AC_PROG_CC
-AC_PROG_MAKE_SET
-
-# Checks for libraries.
-AC_CHECK_LIB([crypto], [main], , AC_MSG_ERROR("could not find SSL development libraries"))
-AC_CHECK_LIB([ncurses], [main], , AC_MSG_ERROR("could not find ncurses libraries"))
-AC_CHECK_LIB([pthread], [main], , AC_MSG_ERROR("could not find pthread libraries"))
-AC_CHECK_LIB([cpg], [main], , AC_MSG_ERROR("could not find CPG library"))
-
-# Checks for header files.
-AC_HEADER_DIRENT
-AC_HEADER_SYS_WAIT
-AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h mntent.h netdb.h netinet/in.h stdint.h stdlib.h string.h sys/ioctl.h sys/socket.h sys/statvfs.h sys/time.h syslog.h unistd.h])
-
-# Checks for archtecture.
-AC_C_BIGENDIAN([AC_MSG_ERROR("big endian architecture is not supported")])
-
-# Checks for typedefs, structures, and compiler characteristics.
-AC_C_CONST
-AC_C_INLINE
-AC_TYPE_INT32_T
-AC_TYPE_INT64_T
-AC_TYPE_PID_T
-AC_TYPE_SIZE_T
-AC_HEADER_TIME
-AC_STRUCT_TM
-AC_TYPE_UINT16_T
-AC_TYPE_UINT32_T
-AC_TYPE_UINT64_T
-AC_TYPE_UINT8_T
-
-# Checks for library functions.
-AC_FUNC_FORK
-AC_FUNC_GETMNTENT
-AC_FUNC_MALLOC
-AC_FUNC_MEMCMP
-AC_FUNC_STAT
-AC_FUNC_STRFTIME
-AC_FUNC_VPRINTF
-AC_CHECK_FUNCS([dup2 ftruncate gethostname getmntent gettimeofday localtime_r memset mkdir socket strcasecmp strchr strdup strerror strtoul])
-
-AC_CONFIG_FILES([Makefile
- lib/Makefile
- collie/Makefile
- shepherd/Makefile])
-AC_OUTPUT
diff --git a/lib/Makefile b/lib/Makefile
new file mode 100644
index 0000000..ad4245b
--- /dev/null
+++ b/lib/Makefile
@@ -0,0 +1,3 @@
+.PHONY:clean
+clean:
+ rm -f *.[od]
diff --git a/lib/Makefile.in b/lib/Makefile.in
deleted file mode 100644
index ad4245b..0000000
--- a/lib/Makefile.in
+++ /dev/null
@@ -1,3 +0,0 @@
-.PHONY:clean
-clean:
- rm -f *.[od]
diff --git a/shepherd/Makefile b/shepherd/Makefile
new file mode 100644
index 0000000..61cafb3
--- /dev/null
+++ b/shepherd/Makefile
@@ -0,0 +1,30 @@
+sbindir ?= $(PREFIX)/sbin
+
+CFLAGS += -g -O2 -Wall -Wstrict-prototypes -I../include
+CFLAGS += -D_GNU_SOURCE
+LIBS += -lncurses -lcrypto
+
+PROGRAMS = shepherd
+SHEPHERD_OBJS = shepherd.o treeview.o ../lib/event.o ../lib/net.o ../lib/logger.o
+SHEPHERD_DEP = $(SHEPHERD_OBJS:.o=.d)
+
+.PHONY:all
+all: $(PROGRAMS)
+
+shepherd: $(SHEPHERD_OBJS)
+ $(CC) $^ -o $@ $(LIBS)
+
+-include $(SHEPHERD_DEP)
+
+%.o: %.c
+ $(CC) -c $(CFLAGS) $*.c -o $*.o
+ @$(CC) -MM $(CFLAGS) -MF $*.d -MT $*.o $*.c
+
+.PHONY:clean
+clean:
+ rm -f *.[od] $(PROGRAMS)
+
+.PHONY:install
+install: $(PROGRAMS)
+ install -d -m 755 $(DESTDIR)$(sbindir)
+ install -m 755 $(PROGRAMS) $(DESTDIR)$(sbindir)
diff --git a/shepherd/Makefile.in b/shepherd/Makefile.in
deleted file mode 100644
index d43d6fe..0000000
--- a/shepherd/Makefile.in
+++ /dev/null
@@ -1,31 +0,0 @@
-CFLAGS += -g -O2 -Wall -Wstrict-prototypes -I../include
-CFLAGS += -D_GNU_SOURCE
-LIBS += -lncurses -lcrypto
-
-PROGRAMS = shepherd
-SHEPHERD_OBJS = shepherd.o treeview.o ../lib/event.o ../lib/net.o ../lib/logger.o
-SHEPHERD_DEP = $(SHEPHERD_OBJS:.o=.d)
-
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-bindir = @bindir@
-
-.PHONY:all
-all: $(PROGRAMS)
-
-shepherd: $(SHEPHERD_OBJS)
- $(CC) $^ -o $@ $(LIBS)
-
--include $(SHEPHERD_DEP)
-
-%.o: %.c
- $(CC) -c $(CFLAGS) $*.c -o $*.o
- @$(CC) -MM $(CFLAGS) -MF $*.d -MT $*.o $*.c
-
-.PHONY:clean
-clean:
- rm -f *.[od] $(PROGRAMS)
-
-.PHONY:install
-install: $(PROGRAMS)
- install $< $(bindir)
--
1.5.6.5
More information about the sheepdog
mailing list