Pro*c Pre-Compile 후 *.c 파일의 삭제를 막으려고 합니다.

marantz의 이미지

날도 우중충한데 우중충한 질문을 스브슬쩍 올려봅니다.

Make Rule 에 다음과 같이 Build Rule 을 등록하여 Oracle Pro*c Pre-Compile 후 Linking 까지 수행합니다.

.SUFFIXES: .o .c .pc

.pc.c:
    $(PROC) $(PCCFLAGS) $(PCCINCS) iname=$*.pc oname=$*.c

.c.o:
    $(CC) -c $(CFLAGS) $(DFLAGS) $(INCS) $<

이렇게 되었을때 모든 Make Rule 작업을 마치고


rm blahblah1.c blahblah2.c blahblah3.c

을 수행해 버리면 .pc -> .c Pre-Compile 한 것이 날아가버리게 되서 디버깅하기 상당히 불편하게 되는데요.

.PRECIOUS 로 등록을 해도 결과는 마찬가지 더군요.

이참에 Make 의 Special Built-in Target Names 를 확실히 짚고 넘어가고 싶습니다.

질문의 요지를 정리하자면...

1. *.pc -> *.c 를 .SUFFIXES Rule 을 적용해 빌드후 삭제되는 것을 막으려면 어떠한 Rule 을 적용 또는 make 의 옵션을 주어야합니까?

2. 1번에 대한 방법으로써 .SUFFIXES Rule 을 정의하지 않고 .DEFAULT 나 .PRECIOUS , .INTERMEDIATE Rule 을 따로 따로 지정해 주어서 해야 합니까?

3. 추가하여 1번에 대한 해결 방법으로써 %.c : %.pc 등으로 .SUFFIXES Rule 을 재정의 해야 합니까?

참고로 HP-UX 에서 GNU Make 3.80, gcc version 3.4.3, Oracle 8.1.7 등을 사용하여 개발을 진행중에 있습니다.

우선 2, 3 번을 다시 시도해보고 그 결과를 글타래에 남기러 다시 방문하겠습니다.

marantz의 이미지

	cp *.c ./pcc/
	$(CC) -o $(LOAD_FILE) $(OBJS) $(LIBS)

빌드하기 전에 하위 디렉토리로 복사해버리면 되더군요....

이 꽁수 말고 .SUFFIXES Rule 을 고치는 방법을 연구해보겠습니다. -_-;

Too Many Sceret is in your heart.
We must break it and don't forget it.
Until no more secret remains in your soul

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.