bin, make, scripts: Copy scripts to $(MODDIR)/bin

This commit is contained in:
Jan Lindemann 2002-07-02 16:04:41 +00:00 committed by Jan Lindemann
commit 5700573a46
7 changed files with 78 additions and 29 deletions

45
bin/Makefile Normal file
View file

@ -0,0 +1,45 @@
########################################################################
# #
# development utilities #
# (c) 2001 jannet it services #
# Authors: Jan Lindemann #
# contact@jannet.de #
# patches, bugfixes and comments are welcome at patch@jannet.de #
# #
# $Id$
# #
# This program is free software; permission to use, copy, modify, #
# distribute, and sell this software and its documentation under the #
# terms of the GNU Public license as published by the Free Software #
# Foundation, either version 2 or any later version of the license, is #
# hereby granted without fee, provided that (i) the above copyright #
# notices and this permission notice appear in all copies of the #
# software and related documentation, and (ii) the name of jannet may #
# not be used in any advertising or publicity relating to the software #
# without the specific, prior written permission of jannet. #
# #
# This program is distributed in the hope that it will be useful, but #
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN- #
# TABILITY 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 Founda- #
# tion, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #
# #
########################################################################
MODDIR = ..
CLEAN += $(wildcard *.sh)
include $(MODDIR)/make/scripts.mk
all:
$(INSTALL_BINDIR):
$(INSTALL) -o root -g root -m 755 -d $@
install: $(INSTALL_BINDIR) $(INSTALLED_EXE_SH)
profclean:

View file

@ -59,33 +59,34 @@ GCC_REV = $(shell gcc -v 2>&1 | grep version | awk '{ split($$3,a,"."); pri
CPP = g++
EXE_SH = $(wildcard *.sh)
MKFILES = $(wildcard *.mk)
EXE_SH = $(wildcard *.sh)
MKFILES = $(wildcard *.mk)
CFILES = $(wildcard *.c)
CPPFILES = $(wildcard *.cc *.cpp)
CALLSRC = $(CFILES) $(CPPFILES)
OBJ = $(patsubst %.cpp,%.o,$(patsubst %.cc,%.o,$(patsubst %.c,%.o,$(CALLSRC))))
SHOBJS = $(patsubst %.cpp,%.o,$(patsubst %.cc,lib%.so,$(patsubst %.c,lib%.so,$(CALLSRC))))
SHSCRIPTS = $(patsubst %.sh.tmpl,%.sh,$(wildcard *.sh.tmpl))
SCRIPTS = $(patsubst %.tmpl,%,$(wildcard *.tmpl))
INST_HDRS = $(patsubst %.h,$(TOPDIR)/include/%.h,$(wildcard *.h))
CFILES = $(wildcard *.c)
CPPFILES = $(wildcard *.cc *.cpp)
CALLSRC = $(CFILES) $(CPPFILES)
OBJ = $(patsubst %.cpp,%.o,$(patsubst %.cc,%.o,$(patsubst %.c,%.o,$(CALLSRC))))
SHOBJS = $(patsubst %.cpp,%.o,$(patsubst %.cc,lib%.so,$(patsubst %.c,lib%.so,$(CALLSRC))))
SHSCRIPTS = $(patsubst %.sh.tmpl,%.sh,$(wildcard *.sh.tmpl))
SCRIPTS = $(patsubst %.tmpl,%,$(wildcard *.tmpl))
LOCAL_HDR = $(patsubst %.h,$(TOPDIR)/include/%.h,$(wildcard *.h))
LOCAL_EXE_SH = $(patsubst %.sh,$(TOPDIR)/bin/%.sh,$(wildcard *.sh))
LOCAL_H = $(wildcard *.h)
LOCAL_C = $(wildcard *.c)
LOCAL_CPP = $(wildcard *.c *.cpp *.cc *.C)
LOCAL_CSRC = $(LOCAL_H) $(LOCAL_C) $(LOCAL_CPP)
LOCAL_H = $(wildcard *.h)
LOCAL_C = $(wildcard *.c)
LOCAL_CPP = $(wildcard *.c *.cpp *.cc *.C)
LOCAL_CSRC = $(LOCAL_H) $(LOCAL_C) $(LOCAL_CPP)
PREREQ_DIR = $(addprefix $(MODDIR)/,$(LOCAL_PREREQ))
PREREQ_DONE = $(addsuffix /all.done,$(PREREQ_DIR))
PREREQ_H = $(foreach dir,$(PREREQ_DIR),$(wildcard $(dir)/*.h))
PREREQ_C = $(foreach dir,$(PREREQ_DIR),$(wildcard $(dir)/*.c))
PREREQ_CPP = $(foreach dir,$(PREREQ_DIR),$(wildcard $(dir)/*.c)) \
PREREQ_DIR = $(addprefix $(MODDIR)/,$(LOCAL_PREREQ))
PREREQ_DONE = $(addsuffix /all.done,$(PREREQ_DIR))
PREREQ_H = $(foreach dir,$(PREREQ_DIR),$(wildcard $(dir)/*.h))
PREREQ_C = $(foreach dir,$(PREREQ_DIR),$(wildcard $(dir)/*.c))
PREREQ_CPP = $(foreach dir,$(PREREQ_DIR),$(wildcard $(dir)/*.c)) \
$(foreach dir,$(PREREQ_DIR),$(wildcard $(dir)/*.cpp))
PREREQ_CSRC = $(PREREQ_H) $(PREREQ_C) $(PREREQ_CPP)
PREREQ_CSRC = $(PREREQ_H) $(PREREQ_C) $(PREREQ_CPP)
CONTRIB_MOD = $(addprefix contrib/,$(CONTRIB_LIBS))
REQUIRED := $(CONTRIB_MOD) $(REQUIRED)
CONTRIB_MOD = $(addprefix contrib/,$(CONTRIB_LIBS))
REQUIRED := $(CONTRIB_MOD) $(REQUIRED)
REQUIRED_DIR = $(patsubst %,$(MODDIR)/%,$(REQUIRED))
REQUIRED_DONE = $(patsubst %,%/all.done,$(REQUIRED_DIR))
@ -192,7 +193,7 @@ RM = rm
AR = ar
ifneq ($(wildcard $(MODDIR)/devutil/scripts),)
MOD_SCRIPT_DIR = $(MODDIR)/devutil/scripts
MOD_SCRIPT_DIR = $(MODDIR)/bin
else
MOD_SCRIPT_DIR = $(MODDIR)/bin
endif

View file

@ -4,7 +4,7 @@
# $Id$
include $(MODDIR)/make/defs.mk
ALL += $(LIBDIR) $(PREREQ_DONE) $(INST_HDRS)
ALL += $(LIBDIR) $(PREREQ_DONE) $(LOCAL_HDR)
include $(MODDIR)/make/rules.mk
clean: objclean textclean localclean
install: $(ALL)

View file

@ -46,6 +46,9 @@ $(TOPDIR)/include:
$(TOPDIR)/include/%.h: %.h
mkdir -p $(dir $@); cp $(@F) $@
$(TOPDIR)/bin/%.sh: %.sh
mkdir -p $(dir $@); cp $(@F) $@
%.o: %.cpp
$(CPP) $(CPPFLAGS) -c $<

View file

@ -3,7 +3,7 @@
# contact@jannet.de
# $Id$
ALL += $(SCRIPTS)
ALL += $(SCRIPTS) $(LOCAL_EXE_SH)
include $(MODDIR)/make/defs.mk
include $(MODDIR)/make/rules.mk
clean:allclean localclean doneclean textclean

View file

@ -4,7 +4,7 @@
# $Id$
include $(MODDIR)/make/defs.mk
ALL += $(LIBDIR) $(PREREQ_DONE) $(INST_HDRS) $(MEMBERS)
ALL += $(LIBDIR) $(PREREQ_DONE) $(LOCAL_HDR) $(LOCAL_EXE_SH) $(MEMBERS)
include $(MODDIR)/make/rules.mk
clean: objclean textclean localclean
install: $(ALL)

View file

@ -38,8 +38,8 @@ include $(MODDIR)/make/scripts.mk
all:
$(INSTALL_BINDIR):
$(INSTALL) -o root -g root -m 755 -d $@
#$(INSTALL_BINDIR):
# $(INSTALL) -o root -g root -m 755 -d $@
#install: $(EXEDIR) $(CONFDIR)
# $(INSTALL) *.sh -m 755 $(EXEDIR)/
@ -48,6 +48,6 @@ $(INSTALL_BINDIR):
#clean distclean libclean:
# rm -rf *~ .*.swp core *.rep
install: $(INSTALL_BINDIR) $(INSTALLED_EXE_SH)
install: all $(INSTALL_BINDIR) $(INSTALLED_EXE_SH)
profclean: