First commit - second part

Former-commit-id: 202296404e6a70f8ae96db99faffb456104c57e9
Former-commit-id: 118417735d2055683607df9809c9b721cc1b1bab
This commit is contained in:
2015-10-02 21:12:35 +02:00
parent f44f0d8179
commit d298385685
316 changed files with 122579 additions and 0 deletions

25
config/targets/debug.targ Normal file
View File

@ -0,0 +1,25 @@
#
# $Id: help.targ 1825 2013-02-26 09:39:47Z viari $
#
# debug.targ
#
# target to print debug information (dev. only)
#
# it defines the following targets:
#
# debug :
# print debug
#
# it requires auto.conf
#
.PHONY: debug
debug::
@echo "+ PORTNAME: $(PORTNAME)"
@echo "+ CFGPRT: $(CFGPRT)"
@echo "+ CFGDIR: $(CFGDIR)"
@echo "+ PRTDIR: $(PRTDIR)"
@echo "+ MACHDEF: $(MACHDEF)"

24
config/targets/empty.targ Normal file
View File

@ -0,0 +1,24 @@
#
# $Id: $
#
# epty.targ
#
# default empty targets (defined as double colon rules)
#
#
#
# Rules
#
.PHONY: all test clean portclean help
all::
test::
clean::
portclean:: clean
test::

23
config/targets/help.targ Normal file
View File

@ -0,0 +1,23 @@
#
# $Id: help.targ 1825 2013-02-26 09:39:47Z viari $
#
# help.targ
#
# default target to print help
#
# it defines the following targets:
#
# help :
# print help
#
.PHONY: help
help::
@ echo "basic usage: make [<action>+]"
@ echo "valid <action> :"
@ echo " all : compile everything for current port [default target]"
@ echo " clean : local cleanup"
@ echo " portclean : cleanup distribution for current port"
@ echo " test : run tests on current port"
@ echo " help : print this help"

51
config/targets/lxbin.targ Normal file
View File

@ -0,0 +1,51 @@
#
# $Id: $
#
# lxbin.targ
#
# default make targets for standard lx binary
#
# you should define the 'PROGS' and 'OSRC' variables
# and optionnaly 'LIBS' if binaries have to be linked with libraries
#
# note: if main source code for binary PROG is PROG.c, there is nothing to do,
# else (e.g. if it involves several sources files) you should also add local
# file dependencies. e.g under the form:
#
# mymain: $(OBJ) mymain_base.c mymain_help.c
# $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LDLIBS)
#
#
# 'auto.conf' should have been included
#
OBJ = $(OSRC:.c=.o)
INCDIR = ../include
#
# Rules
#
.PHONY: all prelib install test clean portclean
all:: prelib $(PROGS) install
@echo "+++++++++++ binaries $(PROGS) done"
prelib::
test -d $(PRTDIR) || mkdir $(PRTDIR) # because some linker may complain
test -d $(LIBDIR) || mkdir $(LIBDIR) # if -L$(LIBDIR) does not exist
install::
test -d $(PRTDIR) || mkdir $(PRTDIR)
test -d $(BINDIR) || mkdir $(BINDIR)
-for f in $(PROGS) ; do \cp -f $$f $(BINDIR) ; done
test::
clean::
-\rm -f *.o cvstatic* *% *.bak so_loc*
-\rm -f $(PROGS)
portclean:: clean
-(! test -d $(BINDIR)) || (cd $(BINDIR) && \rm -f $(PROGS))

43
config/targets/lxlib.targ Normal file
View File

@ -0,0 +1,43 @@
#
# $Id: $
#
# lxlib.targ
#
# default make targets for standard lx library
#
# you should define the 'LOCLIB' and 'OSRC' variables
#
# 'auto.conf' should have been included
#
OBJ = $(OSRC:.c=.o)
INCDIR = ../include
#
# Rules
#
.PHONY: all lib install test clean portclean
all:: lib install
@echo "+++++++++++ library $(LOCLIB) done"
lib:: $(OBJ)
$(AR) $(ARFLAGS) $(LOCLIB) $(OBJ)
$(RANLIB) $(LOCLIB)
install::
test -d $(PRTDIR) || mkdir $(PRTDIR)
test -d $(LIBDIR) || mkdir $(LIBDIR)
\cp -f $(LOCLIB) $(LIBDIR)
$(RANLIB) $(LIBDIR)/$(LOCLIB)
test::
clean::
-\rm -f *.o cvstatic* *% *.bak so_loc*
-\rm -f $(LOCLIB)
portclean:: clean
-(! test -d $(LIBDIR)) || (cd $(LIBDIR) && \rm -f $(LOCLIB))

View File

@ -0,0 +1,48 @@
#
# $Id: package.targ 1825 2013-02-26 09:39:47Z viari $
#
# package.targ
#
# default make targets for standard package with configure
#
# you should define the 'PKG' variable
# (and optionaly 'PKGTAR', 'PKGDIR')
#
PKGTAR ?= $(PKG).tgz
PKGDIR ?= build.$(PORTNAME)
PRTPATH = $(abspath $(PRTDIR))
#
# Rules
#
.PHONY: all clean test portclean pkg pkg.expand pkg.make pkg.install
all:: pkg
pkg.expand::
test -d $(PKGDIR) || mkdir $(PKGDIR)
test -f $(PKGDIR)/configure || $(TAR) zxf $(PKGTAR) -C $(PKGDIR) --strip-components 1
pkg.make:: pkg.expand
test -f $(PKGDIR)/Makefile || (cd $(PKGDIR) && ./configure --prefix=$(PRTPATH))
$(MAKE) -C $(PKGDIR)
pkg.install:: pkg.make
$(MAKE) -C $(PKGDIR) install
pkg:: pkg.install
@echo "+++++++++++ package $(PKG) done"
test::
(! test -d $(PKGDIR)) || $(MAKE) -C $(PKGDIR) test
clean::
(! test -d $(PKGDIR)) || $(MAKE) -C $(PKGDIR) clean
portclean::
(! test -d $(PKGDIR)) || $(MAKE) -C $(PKGDIR) distclean
(! test -d $(PKGDIR)) || \rm -r $(PKGDIR)

View File

@ -0,0 +1,30 @@
#
# $Id: propagate.targ 1825 2013-02-26 09:39:47Z viari $
#
# propagate.targ
#
# default make targets for library containers
#
# you should define the 'DIRS' variable
#
# It will propagate 'MAKE <target>' to all
# directories listed in DIRS
#
#
# Rules
#
.PHONY: all _action $(DIRS)
.DEFAULT:
$(MAKE) ACTION=$@ _action
all::
$(MAKE) ACTION=all _action
_action: $(DIRS)
@echo "$(ACTION) done"
$(DIRS):
$(MAKE) -C $@ $(ACTION)