Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cpp_tools
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
We are moving to Forgejo!
You are on a read-only GitLab instance.
Show more breadcrumbs
namark
cpp_tools
Commits
33018704
Commit
33018704
authored
6 years ago
by
namark
Browse files
Options
Downloads
Patches
Plain Diff
No longer depending on /dev/null timestamps,
and finer grained uninstall targets.
parent
3cc7a13d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
make_templates/header_only_lib
+5
-4
5 additions, 4 deletions
make_templates/header_only_lib
make_templates/static_lib
+16
-8
16 additions, 8 deletions
make_templates/static_lib
with
21 additions
and
12 deletions
make_templates/header_only_lib
+
5
−
4
View file @
33018704
...
@@ -2,6 +2,7 @@ INSTALL_INCLUDE := include
...
@@ -2,6 +2,7 @@ INSTALL_INCLUDE := include
ifneq ($(shell cat COPYRIGHT 2> /dev/null),)
ifneq ($(shell cat COPYRIGHT 2> /dev/null),)
COPYRIGHT ?= COPYRIGHT
COPYRIGHT ?= COPYRIGHT
COPYRIGHT_DEP = COPYRIGHT
else
else
COPYRIGHT ?= /dev/null
COPYRIGHT ?= /dev/null
endif
endif
...
@@ -20,14 +21,14 @@ default:
...
@@ -20,14 +21,14 @@ default:
install: $(INCLUDE)
install: $(INCLUDE)
@echo Install complete!
@echo Install complete!
$(INCDIR)/%.h: $(SRCDIR)/%.h $(COPYRIGHT)
$(INCDIR)/%.h: $(SRCDIR)/%.h $(COPYRIGHT
_DEP
)
@mkdir -p $(@D)
@mkdir -p $(@D)
cat $(COPYRIGHT) >> $@
2> /dev/null || true
cat $(COPYRIGHT) >> $@
cat $< >> $@
cat $< >> $@
$(INCDIR)/%.hpp: $(SRCDIR)/%.hpp $(COPYRIGHT)
$(INCDIR)/%.hpp: $(SRCDIR)/%.hpp $(COPYRIGHT
_DEP
)
@mkdir -p $(@D)
@mkdir -p $(@D)
cat $(COPYRIGHT) >> $@
2> /dev/null || true
cat $(COPYRIGHT) >> $@
cat $< >> $@
cat $< >> $@
uninstall:
uninstall:
...
...
This diff is collapsed.
Click to expand it.
make_templates/static_lib
+
16
−
8
View file @
33018704
...
@@ -15,6 +15,7 @@ INSTALL_LIB := lib
...
@@ -15,6 +15,7 @@ INSTALL_LIB := lib
ifneq ($(shell cat COPYRIGHT 2> /dev/null),)
ifneq ($(shell cat COPYRIGHT 2> /dev/null),)
COPYRIGHT ?= COPYRIGHT
COPYRIGHT ?= COPYRIGHT
COPYRIGHT_DEP = COPYRIGHT
else
else
COPYRIGHT ?= /dev/null
COPYRIGHT ?= /dev/null
endif
endif
...
@@ -96,21 +97,21 @@ $(LIBDIR)/$(TARGET): $(OUT) | $(LIBDIR)
...
@@ -96,21 +97,21 @@ $(LIBDIR)/$(TARGET): $(OUT) | $(LIBDIR)
$(LIBDIR):
$(LIBDIR):
@mkdir -p $@
@mkdir -p $@
$(INCDIR)/%.h: $(SRCDIR)/%.h $(COPYRIGHT)
$(INCDIR)/%.h: $(SRCDIR)/%.h $(COPYRIGHT
_DEP
)
@mkdir -p $(@D)
@mkdir -p $(@D)
cat $(COPYRIGHT) >> $@
2> /dev/null || true
cat $(COPYRIGHT) >> $@
cat $< >> $@
cat $< >> $@
$(INCDIR)/%.hpp: $(SRCDIR)/%.hpp $(COPYRIGHT)
$(INCDIR)/%.hpp: $(SRCDIR)/%.hpp $(COPYRIGHT
_DEP
)
@mkdir -p $(@D)
@mkdir -p $(@D)
cat $(COPYRIGHT) >> $@
2> /dev/null || true
cat $(COPYRIGHT) >> $@
cat $< >> $@
cat $< >> $@
install_source: $(INSTALL_SOURCES)
install_source: $(INSTALL_SOURCES)
$(INSTALL_SRCDIR)/%: $(SRCDIR)/% $(COPYRIGHT)
$(INSTALL_SRCDIR)/%: $(SRCDIR)/% $(COPYRIGHT
_DEP
)
@mkdir -p $(@D)
@mkdir -p $(@D)
cat $(COPYRIGHT) >> $@
2> /dev/null || true
cat $(COPYRIGHT) >> $@
cat $< >> $@
cat $< >> $@
uninstall:
uninstall:
...
@@ -118,11 +119,18 @@ uninstall:
...
@@ -118,11 +119,18 @@ uninstall:
@rmdir -p $(INCDIRS) 2> /dev/null || true
@rmdir -p $(INCDIRS) 2> /dev/null || true
-rm $(LIBDIR)/$(TARGET)
-rm $(LIBDIR)/$(TARGET)
@rmdir -p $(LIBDIR) 2> /dev/null || true
@rmdir -p $(LIBDIR) 2> /dev/null || true
@echo Archives/includes uninstalled!
uninstall_source:
-rm $(INSTALL_SOURCES)
-rm $(INSTALL_SOURCES)
@rmdir -p $(INSTALL_SRCDIRS) 2> /dev/null || true
@rmdir -p $(INSTALL_SRCDIRS) 2> /dev/null || true
@echo Uninstall complete!
@echo Source code uninstalled!
uninstall_all: uninstall uninstall_source
@echo Everything uninstalled!
-include $(DEPENDS)
-include $(DEPENDS)
.PRECIOUS : $(OBJECTS)
.PRECIOUS : $(OBJECTS)
.PHONY : clean distclean uninstall
.PHONY : clean distclean uninstall
uninstall_source uninstall_all
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment