Skip to content

Commit

Permalink
common: fix make clobber
Browse files Browse the repository at this point in the history
  • Loading branch information
plebioda committed Jan 26, 2015
1 parent c0640e6 commit cf5ec8e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2014, Intel Corporation
# Copyright (c) 2014-2015, Intel Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down
14 changes: 9 additions & 5 deletions src/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2014, Intel Corporation
# Copyright (c) 2014-2015, Intel Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -36,6 +36,10 @@ export CSTYLE = $(abspath ../utils/cstyle)

TARGETS = libpmem libvmem libpmemblk libpmemlog libpmemobj
ALL_TARGETS = $(TARGETS) examples benchmarks
CLEAN_TARGETS = $(ALL_TARGETS) test
CLOBBER_TARGETS = $(ALL_TARGETS) test
CSTYLE_TARGETS = $(ALL_TARGETS) test
INSTALL_TARGETS = $(TARGETS)

HEADERS_DESTDIR = $(DESTDIR)/usr/include
HEADERS_INSTALL = include/libpmem.h include/libvmem.h include/libpmemobj.h include/libpmemblk.h include/libpmemlog.h
Expand All @@ -54,10 +58,10 @@ SCOPE_HDR_FILES = $(foreach d, $(SCOPE_HDR_DIRS), $(wildcard $(D)/*.h))
SCOPEFILES = $(SCOPE_SRC_FILES) $(SCOPE_HDR_FILES)

all: $(ALL_TARGETS)
install: $(TARGETS:=-install)
clean: $(ALL_TARGETS:=-clean)
clobber: $(ALL_TARGETS:=-clobber)
cstyle: $(ALL_TARGETS:=-cstyle)
install: $(INSTALL_TARGETS:=-install)
clean: $(CLEAN_TARGETS:=-clean)
clobber: $(CLOBBER_TARGETS:=-clobber)
cstyle: $(CSTYLE_TARGETS:=-cstyle)
examples benchmarks: $(TARGETS)

custom_build = $(DEBUG)$(OBJDIR)
Expand Down
5 changes: 4 additions & 1 deletion src/test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,10 @@ clobber : TARGET = clobber
test : TARGET = test
cstyle : TARGET = cstyle

all clean clobber test cstyle: $(TEST)
all test cstyle: $(TEST)

clean clobber: $(TEST)
$(MAKE) -C unittest $@

$(TEST): unittest
$(MAKE) -C $@ $(TARGET)
Expand Down
4 changes: 2 additions & 2 deletions src/test/Makefile.inc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright (c) 2014, Intel Corporation
# Copyright (c) 2014-2015, Intel Corporation
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
Expand Down Expand Up @@ -96,7 +96,7 @@ clean:
$(RM) *.o */*.o core a.out *.log testfile*

clobber: clean
$(RM) $(TARGET) $(TARGET).static-debug $(TARGET).static-nondebug
$(RM) $(TARGET) $(TARGET_STATIC_DEBUG) $(TARGET_STATIC_NONDEBUG)

cstyle:
../../../utils/cstyle -pP *.[ch]
Expand Down

0 comments on commit cf5ec8e

Please sign in to comment.