|
|
Example output of PMK 0.10.4 release
=> Testing C binary building
-> Running pmk
PMK version 0.9.1
Loaded 44 predefinined variables.
Loaded 0 overridden switches.
Loaded 0 overridden variables.
Total : 62 variables.
Parsing '/home/mips/work/projects/premake/pmk/samples/bin_c/pmkfile'
Processing commands :
* Parsing settings
Setting global language :
Set to 'C'.
Collecting targets :
Added 'Makefile.pmk'.
Added 'config.h.pmk'.
Total 2 target(s) added.
* Parsing define
defined 'PACKAGE' variable.
defined 'VERSION' variable.
defined 'FULL_NAME' variable.
* Checking header [function_strlcat]
Use C language with CC compiler.
Store compiler flags in 'CFLAGS'.
Found header 'string.h' : yes.
Found function 'strlcpy' : yes.
Found function 'strlcat' : yes.
Process templates :
Created '/home/mips/work/projects/premake/pmk/samples/bin_c/Makefile'.
Created '/home/mips/work/projects/premake/pmk/samples/bin_c/config.h'.
End of log
-> Dumping template
Makefile.pmk:
--dump-begin----------------------------
# $Id: ex_stable.inc 1803 2005-01-27 13:48:25Z mipsator $
CC= @BIN_CC@
CFLAGS= @CFLAGS@
NAME= hello
all: show $(NAME) run_${NAME} clean
show:
@echo ""
@echo "-> Dumping template"
@echo ""
@echo "Makefile.pmk:"
@echo "--dump-begin----------------------------"
@cat Makefile.pmk
@echo "--dump-end------------------------------"
@echo "-> Dumping generated file"
@echo ""
@echo "Makefile:"
@echo "--dump-begin----------------------------"
@cat Makefile
@echo "--dump-end------------------------------"
${NAME}:
@echo ""
@echo "-> Bulding binary"
@echo ""
$(CC) $(CFLAGS) -o $(NAME) $(NAME).c
run_$(NAME):
@echo ""
@echo "-> Running program"
@echo ""
@echo "--exec-begin----------------------------"
@./${NAME}
@echo "--exec-end------------------------------"
clean:
@echo ""
@echo "-> Cleaning ..."
@echo ""
rm -f $(NAME)
rm -f *.log Makefile config.h
@echo "Done."
--dump-end------------------------------
-> Dumping generated file
Makefile:
--dump-begin----------------------------
# $Id: ex_stable.inc 1803 2005-01-27 13:48:25Z mipsator $
CC= /usr/bin/cc
CFLAGS= -O2 -I/usr/include
NAME= hello
all: show $(NAME) run_${NAME} clean
show:
@echo ""
@echo "-> Dumping template"
@echo ""
@echo "Makefile.pmk:"
@echo "--dump-begin----------------------------"
@cat Makefile.pmk
@echo "--dump-end------------------------------"
@echo "-> Dumping generated file"
@echo ""
@echo "Makefile:"
@echo "--dump-begin----------------------------"
@cat Makefile
@echo "--dump-end------------------------------"
${NAME}:
@echo ""
@echo "-> Bulding binary"
@echo ""
$(CC) $(CFLAGS) -o $(NAME) $(NAME).c
run_$(NAME):
@echo ""
@echo "-> Running program"
@echo ""
@echo "--exec-begin----------------------------"
@./${NAME}
@echo "--exec-end------------------------------"
clean:
@echo ""
@echo "-> Cleaning ..."
@echo ""
rm -f $(NAME)
rm -f *.log Makefile config.h
@echo "Done."
--dump-end------------------------------
-> Bulding binary
/usr/bin/cc -O2 -I/usr/include -o hello hello.c
-> Running program
--exec-begin----------------------------
Your system does have strlcpy() in 'string.h'.
Your system does have strlcat() in 'string.h'.
--exec-end------------------------------
-> Cleaning ...
rm -f hello
rm -f *.log Makefile config.h
Done.
=> End of test
=> Testing C++ binary building
-> Running pmk
PMK version 0.9.1
Loaded 44 predefinined variables.
Loaded 0 overridden switches.
Loaded 0 overridden variables.
Total : 62 variables.
Parsing '/home/mips/work/projects/premake/pmk/samples/bin_c++/pmkfile'
Processing commands :
* Parsing settings
Setting global language :
Set to 'C++'.
Collecting targets :
Added 'Makefile.pmk'.
Total 1 target(s) added.
* Parsing define
defined 'PACKAGE' variable.
defined 'VERSION' variable.
defined 'FULL_NAME' variable.
Process templates :
Created '/home/mips/work/projects/premake/pmk/samples/bin_c++/Makefile'.
End of log
-> Dumping template
Makefile.pmk:
--dump-begin----------------------------
# $Id: ex_stable.inc 1803 2005-01-27 13:48:25Z mipsator $
CXX= @BIN_CXX@
CFLAGS= @CXXFLAGS@
NAME= hello
all: show $(NAME) run_$(NAME) clean
show:
@echo ""
@echo "-> Dumping template"
@echo ""
@echo "Makefile.pmk:"
@echo "--dump-begin----------------------------"
@cat Makefile.pmk
@echo "--dump-end------------------------------"
@echo "-> Dumping generated file"
@echo ""
@echo "Makefile:"
@echo "--dump-begin----------------------------"
@cat Makefile
@echo "--dump-end------------------------------"
$(NAME):
@echo ""
@echo "-> Building binary"
@echo ""
$(CXX) $(CXXFLAGS) -o $(NAME) $(NAME).cc
run_$(NAME):
@echo ""
@echo "-> Running program"
@echo ""
@echo "--exec-begin----------------------------"
@./${NAME}
@echo "--exec-end------------------------------"
clean:
@echo ""
@echo "-> Cleaning ..."
@echo ""
rm -f $(NAME)
rm -f *.log Makefile
@echo "Done."
--dump-end------------------------------
-> Dumping generated file
Makefile:
--dump-begin----------------------------
# $Id: ex_stable.inc 1803 2005-01-27 13:48:25Z mipsator $
CXX= /usr/bin/c++
CFLAGS= -O2
NAME= hello
all: show $(NAME) run_$(NAME) clean
show:
@echo ""
@echo "-> Dumping template"
@echo ""
@echo "Makefile.pmk:"
@echo "--dump-begin----------------------------"
@cat Makefile.pmk
@echo "--dump-end------------------------------"
@echo "-> Dumping generated file"
@echo ""
@echo "Makefile:"
@echo "--dump-begin----------------------------"
@cat Makefile
@echo "--dump-end------------------------------"
$(NAME):
@echo ""
@echo "-> Building binary"
@echo ""
$(CXX) $(CXXFLAGS) -o $(NAME) $(NAME).cc
run_$(NAME):
@echo ""
@echo "-> Running program"
@echo ""
@echo "--exec-begin----------------------------"
@./${NAME}
@echo "--exec-end------------------------------"
clean:
@echo ""
@echo "-> Cleaning ..."
@echo ""
rm -f $(NAME)
rm -f *.log Makefile
@echo "Done."
--dump-end------------------------------
-> Building binary
/usr/bin/c++ -O2 -o hello hello.cc
-> Running program
--exec-begin----------------------------
Hello World !
--exec-end------------------------------
-> Cleaning ...
rm -f hello
rm -f *.log Makefile
Done.
=> End of test
=> Testing C library building
-> Running pmk
PMK version 0.9.1
Loaded 44 predefinined variables.
Loaded 0 overridden switches.
Loaded 0 overridden variables.
Total : 62 variables.
Parsing '/home/mips/work/projects/premake/pmk/samples/lib_c/pmkfile'
Processing commands :
* Parsing settings
Setting global language :
Set to 'C'.
Collecting targets :
Added 'Makefile.pmk'.
Total 1 target(s) added.
Detecting compilers :
Gathering data for compiler detection.
Detecting 'CC' : GNU gcc (version 303).
Setting SLCFLAGS to '-fPIC'
Setting SLLDFLAGS to '-fPIC -shared'
* Parsing define
defined 'LIBPMK_NAME' variable.
defined 'LIBPMK_MAJ' variable.
defined 'LIBPMK_MIN' variable.
* Building shared library name
Shared library support : yes.
Setting LIBNAME to 'libhello.so'
Setting LIBNAMEV to 'libhello.so.1.2'
Process templates :
Created '/home/mips/work/projects/premake/pmk/samples/lib_c/Makefile'.
End of log
-> Dumping template
Makefile.pmk:
--dump-begin----------------------------
# $Id: ex_stable.inc 1803 2005-01-27 13:48:25Z mipsator $
CC= @BIN_CC@
AR= @BIN_AR@
RANLIB= @BIN_RANLIB@
ARFLAGS= cr
SLCFLAGS= @SLCFLAGS@
SLLDFLAGS= @SLLDFLAGS@
NAME= hello
LIBNAME= lib$(NAME)
MAJOR= @LIBPMK_MAJ@
MINOR= @LIBPMK_MIN@
LIB_STATIC= $(LIBNAME).a
LIB_SHARED= @LIBNAME@
LIB_SHARED_V= @LIBNAMEV@
B_OBJS= $(NAME).o
L_OBJS= $(LIBNAME).o
all: show $(LIB_STATIC) $(LIB_SHARED) $(NAME) run_$(NAME) clean
.c.o:
@echo ""
@echo "-> Building object file"
$(CC) $(CFLAGS) $(SLCFLAGS) -c $<
show:
@echo ""
@echo "-> Dumping template"
@echo ""
@echo "Makefile.pmk:"
@echo "--dump-begin----------------------------"
@cat Makefile.pmk
@echo "--dump-end------------------------------"
@echo "-> Dumping generated file"
@echo ""
@echo "Makefile:"
@echo "--dump-begin----------------------------"
@cat Makefile
@echo "--dump-end------------------------------"
$(LIB_STATIC): $(L_OBJS)
@echo ""
@echo "-> Building static lib"
@echo ""
$(AR) $(ARFLAGS) $@ $(L_OBJS)
$(RANLIB) $@
$(LIB_SHARED): $(L_OBJS)
@echo ""
@echo "-> Building shared lib"
@echo ""
$(CC) $(SLLDFLAGS) -o $@ $(L_OBJS)
cp $(LIB_SHARED) $(LIB_SHARED_V)
$(NAME):
@echo ""
@echo "-> Building binary"
@echo ""
$(CC) -o $(NAME) -L. -l${NAME} $(NAME).c
run_$(NAME):
@echo ""
@echo "-> Running program"
@echo ""
@echo "LD_LIBRARY_PATH=.:${LD_LIBRARY_PATH} ${NAME}"
@echo ""
@echo "--exec-begin----------------------------"
@LD_LIBRARY_PATH=.:${LD_LIBRARY_PATH} ./${NAME}
@echo "--exec-end------------------------------"
clean:
@echo ""
@echo "-> Cleaning ..."
@echo ""
rm -f $(B_OBJS) $(L_OBJS)
rm -f $(LIB_STATIC) $(LIB_SHARED) $(LIB_SHARED_V)
rm -f $(NAME)
rm -f *.log Makefile
@echo "Done."
--dump-end------------------------------
-> Dumping generated file
Makefile:
--dump-begin----------------------------
# $Id: ex_stable.inc 1803 2005-01-27 13:48:25Z mipsator $
CC= /usr/bin/cc
AR= /usr/bin/ar
RANLIB= /usr/bin/ranlib
ARFLAGS= cr
SLCFLAGS= -fPIC
SLLDFLAGS= -fPIC -shared
NAME= hello
LIBNAME= lib$(NAME)
MAJOR= 1
MINOR= 2
LIB_STATIC= $(LIBNAME).a
LIB_SHARED= libhello.so
LIB_SHARED_V= libhello.so.1.2
B_OBJS= $(NAME).o
L_OBJS= $(LIBNAME).o
all: show $(LIB_STATIC) $(LIB_SHARED) $(NAME) run_$(NAME) clean
.c.o:
@echo ""
@echo "-> Building object file"
$(CC) $(CFLAGS) $(SLCFLAGS) -c $<
show:
@echo ""
@echo "-> Dumping template"
@echo ""
@echo "Makefile.pmk:"
@echo "--dump-begin----------------------------"
@cat Makefile.pmk
@echo "--dump-end------------------------------"
@echo "-> Dumping generated file"
@echo ""
@echo "Makefile:"
@echo "--dump-begin----------------------------"
@cat Makefile
@echo "--dump-end------------------------------"
$(LIB_STATIC): $(L_OBJS)
@echo ""
@echo "-> Building static lib"
@echo ""
$(AR) $(ARFLAGS) $@ $(L_OBJS)
$(RANLIB) $@
$(LIB_SHARED): $(L_OBJS)
@echo ""
@echo "-> Building shared lib"
@echo ""
$(CC) $(SLLDFLAGS) -o $@ $(L_OBJS)
cp $(LIB_SHARED) $(LIB_SHARED_V)
$(NAME):
@echo ""
@echo "-> Building binary"
@echo ""
$(CC) -o $(NAME) -L. -l${NAME} $(NAME).c
run_$(NAME):
@echo ""
@echo "-> Running program"
@echo ""
@echo "LD_LIBRARY_PATH=.:${LD_LIBRARY_PATH} ${NAME}"
@echo ""
@echo "--exec-begin----------------------------"
@LD_LIBRARY_PATH=.:${LD_LIBRARY_PATH} ./${NAME}
@echo "--exec-end------------------------------"
clean:
@echo ""
@echo "-> Cleaning ..."
@echo ""
rm -f $(B_OBJS) $(L_OBJS)
rm -f $(LIB_STATIC) $(LIB_SHARED) $(LIB_SHARED_V)
rm -f $(NAME)
rm -f *.log Makefile
@echo "Done."
--dump-end------------------------------
-> Building object file
/usr/bin/cc -O2 -pipe -fPIC -c libhello.c
-> Building static lib
/usr/bin/ar cr libhello.a libhello.o
/usr/bin/ranlib libhello.a
-> Building shared lib
/usr/bin/cc -fPIC -shared -o libhello.so libhello.o
cp libhello.so libhello.so.1.2
-> Building binary
/usr/bin/cc -o hello -L. -lhello hello.c
-> Running program
LD_LIBRARY_PATH=.: hello
--exec-begin----------------------------
Hello World !
--exec-end------------------------------
-> Cleaning ...
rm -f hello.o libhello.o
rm -f libhello.a libhello.so libhello.so.1.2
rm -f hello
rm -f *.log Makefile
Done.
=> End of test
=> Testing C++ library building
-> Running pmk
PMK version 0.9.1
Loaded 44 predefinined variables.
Loaded 0 overridden switches.
Loaded 0 overridden variables.
Total : 62 variables.
Parsing '/home/mips/work/projects/premake/pmk/samples/lib_c++/pmkfile'
Processing commands :
* Parsing settings
Setting global language :
Set to 'C++'.
Collecting targets :
Added 'Makefile.pmk'.
Total 1 target(s) added.
Detecting compilers :
Gathering data for compiler detection.
Detecting 'CXX' : GNU gcc (version 303).
Setting SLCXXFLAGS to '-fPIC'
Setting SLLDFLAGS to '-fPIC -shared'
* Parsing define
defined 'LIBPMK_NAME' variable.
defined 'LIBPMK_MAJ' variable.
defined 'LIBPMK_MIN' variable.
* Building shared library name
Shared library support : yes.
Setting LIBNAME to 'libhello++.so'
Setting LIBNAMEV to 'libhello++.so.1.2'
Process templates :
Created '/home/mips/work/projects/premake/pmk/samples/lib_c++/Makefile'.
End of log
-> Dumping template
Makefile.pmk:
--dump-begin----------------------------
# $Id: ex_stable.inc 1803 2005-01-27 13:48:25Z mipsator $
CXX= @BIN_CXX@
AR= @BIN_AR@
RANLIB= @BIN_RANLIB@
CXXFLAGS= @CXXFLAGS@
ARFLAGS= cr
SLCXXFLAGS= @SLCXXFLAGS@
SLLDFLAGS= @SLLDFLAGS@
NAME= hello
LIBNAME= lib$(NAME)
MAJOR= @LIBPMK_MAJ@
MINOR= @LIBPMK_MIN@
LIB_STATIC= $(LIBNAME).a
LIB_SHARED= @LIBNAME@
LIB_SHARED_V= @LIBNAMEV@
B_OBJS= $(NAME).o
L_OBJS= $(LIBNAME).o
all: show $(LIB_STATIC) $(LIB_SHARED) $(NAME) run_$(NAME) clean
.cc.o:
@echo ""
@echo "-> Building object file"
$(CXX) $(CXXFLAGS) $(SLCXXFLAGS) -c $<
show:
@echo ""
@echo "-> Dumping template"
@echo ""
@echo "Makefile.pmk:"
@echo "--dump-begin----------------------------"
@cat Makefile.pmk
@echo "--dump-end------------------------------"
@echo "-> Dumping generated file"
@echo ""
@echo "Makefile:"
@echo "--dump-begin----------------------------"
@cat Makefile
@echo "--dump-end------------------------------"
$(LIB_STATIC): $(L_OBJS)
@echo ""
@echo "-> Building static lib"
@echo ""
$(AR) $(ARFLAGS) $@ $(L_OBJS)
$(RANLIB) $@
$(LIB_SHARED): $(L_OBJS)
@echo ""
@echo "-> Building shared lib"
@echo ""
$(CXX) $(SLLDFLAGS) -o $@ $(L_OBJS)
cp $(LIB_SHARED) $(LIB_SHARED_V)
$(NAME):
@echo ""
@echo "-> Building binary"
@echo ""
$(CXX) -o $(NAME) -L. -l${NAME}++ $(NAME).cc
run_$(NAME):
@echo ""
@echo "-> Running program"
@echo ""
@echo "LD_LIBRARY_PATH=.:${LD_LIBRARY_PATH} ./${NAME}"
@echo ""
@echo "--exec-begin----------------------------"
@LD_LIBRARY_PATH=.:${LD_LIBRARY_PATH} ./${NAME}
@echo "--exec-end------------------------------"
clean:
@echo ""
@echo "-> Cleaning ..."
@echo ""
rm -f $(B_OBJS) $(L_OBJS)
rm -f $(LIB_STATIC) $(LIB_SHARED) $(LIB_SHARED_V)
rm -f $(NAME)
rm -f *.log Makefile
@echo "Done."
--dump-end------------------------------
-> Dumping generated file
Makefile:
--dump-begin----------------------------
# $Id: ex_stable.inc 1803 2005-01-27 13:48:25Z mipsator $
CXX= /usr/bin/c++
AR= /usr/bin/ar
RANLIB= /usr/bin/ranlib
CXXFLAGS= -O2
ARFLAGS= cr
SLCXXFLAGS= -fPIC
SLLDFLAGS= -fPIC -shared
NAME= hello
LIBNAME= lib$(NAME)
MAJOR= 1
MINOR= 2
LIB_STATIC= $(LIBNAME).a
LIB_SHARED= libhello++.so
LIB_SHARED_V= libhello++.so.1.2
B_OBJS= $(NAME).o
L_OBJS= $(LIBNAME).o
all: show $(LIB_STATIC) $(LIB_SHARED) $(NAME) run_$(NAME) clean
.cc.o:
@echo ""
@echo "-> Building object file"
$(CXX) $(CXXFLAGS) $(SLCXXFLAGS) -c $<
show:
@echo ""
@echo "-> Dumping template"
@echo ""
@echo "Makefile.pmk:"
@echo "--dump-begin----------------------------"
@cat Makefile.pmk
@echo "--dump-end------------------------------"
@echo "-> Dumping generated file"
@echo ""
@echo "Makefile:"
@echo "--dump-begin----------------------------"
@cat Makefile
@echo "--dump-end------------------------------"
$(LIB_STATIC): $(L_OBJS)
@echo ""
@echo "-> Building static lib"
@echo ""
$(AR) $(ARFLAGS) $@ $(L_OBJS)
$(RANLIB) $@
$(LIB_SHARED): $(L_OBJS)
@echo ""
@echo "-> Building shared lib"
@echo ""
$(CXX) $(SLLDFLAGS) -o $@ $(L_OBJS)
cp $(LIB_SHARED) $(LIB_SHARED_V)
$(NAME):
@echo ""
@echo "-> Building binary"
@echo ""
$(CXX) -o $(NAME) -L. -l${NAME}++ $(NAME).cc
run_$(NAME):
@echo ""
@echo "-> Running program"
@echo ""
@echo "LD_LIBRARY_PATH=.:${LD_LIBRARY_PATH} ./${NAME}"
@echo ""
@echo "--exec-begin----------------------------"
@LD_LIBRARY_PATH=.:${LD_LIBRARY_PATH} ./${NAME}
@echo "--exec-end------------------------------"
clean:
@echo ""
@echo "-> Cleaning ..."
@echo ""
rm -f $(B_OBJS) $(L_OBJS)
rm -f $(LIB_STATIC) $(LIB_SHARED) $(LIB_SHARED_V)
rm -f $(NAME)
rm -f *.log Makefile
@echo "Done."
--dump-end------------------------------
-> Building object file
/usr/bin/c++ -O2 -fPIC -c libhello.cc
-> Building static lib
/usr/bin/ar cr libhello.a libhello.o
/usr/bin/ranlib libhello.a
-> Building shared lib
/usr/bin/c++ -fPIC -shared -o libhello++.so libhello.o
cp libhello++.so libhello++.so.1.2
-> Building binary
/usr/bin/c++ -o hello -L. -lhello++ hello.cc
-> Running program
LD_LIBRARY_PATH=.: ./hello
--exec-begin----------------------------
Hello World !
--exec-end------------------------------
-> Cleaning ...
rm -f hello.o libhello.o
rm -f libhello.a libhello++.so libhello++.so.1.2
rm -f hello
rm -f *.log Makefile
Done.
=> End of test
=> Testing pmkscan
-> Dumping sample C file
hello.c:
--dump-begin----------------------------
/* $Id: ex_stable.inc 1803 2005-01-27 13:48:25Z mipsator $ */
/* public domain */
#include
#include
#define STR "hello, i am a character string :)"
int main() {
char buf[256];
strlcpy(buf, STR, sizeof(buf));
printf("%s\n", buf);
return(0);
}
--dump-end------------------------------
-> Running pmkscan
pmkscan
PMKSCAN version 0.9.1
Initializing data ...
Ok
Start parsing files :
'./hello.c'
Parsing Ok.
Generating scan result ...
Saved as 'pmkfile.scan'
PMKSCAN finished.
-> Dumping pmkfile.scan
--dump-begin----------------------------
# pmkfile generated by pmkscan
# checking strlcpy in string.h
CHECK_INCLUDE(function_strlcpy) {
REQUIRED=FALSE
LANG="C"
INCLUDE="string.h"
FUNCTION=strlcpy
}
--dump-end------------------------------
-> Cleaning ...
Removing pmkfile.scan
Done.
=> End of test
=> Testing pmkinstall
-> Creating test directory
pmkinstall -d -m 770 test_dir
-> Checking test directory
drwxrwx--- 2 mips wheel 512 Jan 26 23:38 test_dir
Directory OK.
-> Installing test data
pmkinstall -m u+rw hello.txt test_dir/test1.txt
pmkinstall -m ug+r hello.txt test_dir/test2.txt
-> Installing test program
pmkinstall -m 766 hello.sh test_dir/test3.sh
-> Checking test files
-rw------- 1 mips wheel 28 Jan 26 23:38 test_dir/test1.txt
-r--r----- 1 mips wheel 28 Jan 26 23:38 test_dir/test2.txt
-rwxrw-rw- 1 mips wheel 49 Jan 26 23:38 test_dir/test3.sh
-> Cleaning ...
Removing test_dir/test1.txt
Removing test_dir/test2.txt
Removing test_dir/test3.sh
Removing test_dir
Done.
=> End of test
|